From: Mark Dickinson Date: Sun, 27 Dec 2009 19:03:31 +0000 (+0000) Subject: Merged revisions 77066 via svnmerge from X-Git-Tag: v3.2a1~1963 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a4e1506e7f6a39c5226f08847d041568be1140e2;p=python Merged revisions 77066 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r77066 | mark.dickinson | 2009-12-27 16:16:02 +0000 (Sun, 27 Dec 2009) | 1 line 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). ........ --- diff --git a/Lib/test/test_long.py b/Lib/test/test_long.py index 98221e625c..4096f1fadb 100644 --- a/Lib/test/test_long.py +++ b/Lib/test/test_long.py @@ -73,7 +73,7 @@ def truediv(a, b): if 2*r > b or 2*r == b and q % 2 == 1: q += 1 - result = float(q) * 2.**exp + result = math.ldexp(q, exp) return -result if negative else result