[Python-checkins] r77067 - in python/branches/py3k: Lib/test/test_long.py
mark.dickinson
python-checkins at python.org
Sun Dec 27 20:03:31 CET 2009
Author: mark.dickinson
Date: Sun Dec 27 20:03:31 2009
New Revision: 77067
Log:
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).
........
Modified:
python/branches/py3k/ (props changed)
python/branches/py3k/Lib/test/test_long.py
Modified: python/branches/py3k/Lib/test/test_long.py
==============================================================================
--- python/branches/py3k/Lib/test/test_long.py (original)
+++ python/branches/py3k/Lib/test/test_long.py Sun Dec 27 20:03:31 2009
@@ -73,7 +73,7 @@
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
More information about the Python-checkins
mailing list