Mercurial > cpython-lru_cache-weakref
diff Lib/test/test_long_future.py @ 57945:eb0bbaba0361 legacy-trunk
Use ldexp(q, exp) instead of q*2.**exp in true division test, to avoid bogus failures on platforms with broken pow (e.g., Ubuntu/ia64).
| author | Mark Dickinson <dickinsm@gmail.com> |
|---|---|
| date | Sun, 27 Dec 2009 16:16:02 +0000 |
| parents | c4e60988834d |
| children | ad7e4141a3eb |
line wrap: on
line diff
--- a/Lib/test/test_long_future.py Sun Dec 27 14:55:57 2009 +0000 +++ b/Lib/test/test_long_future.py Sun Dec 27 16:16:02 2009 +0000 @@ -5,6 +5,7 @@ import sys import random +import math import unittest from test.test_support import run_unittest @@ -46,7 +47,7 @@ if 2*r > b or 2*r == b and q % 2 == 1: q += 1 - result = float(q) * 2.**exp + result = math.ldexp(float(q), exp) return -result if negative else result class TrueDivisionTests(unittest.TestCase):
