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).
........
This commit is contained in:
Mark Dickinson 2009-12-27 19:03:31 +00:00
parent cbb62745ac
commit a4e1506e7f
1 changed files with 1 additions and 1 deletions

View File

@ -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