]> granicus.if.org Git - python/commit
Take advantage of the math library's ldexp for assembling a float by
authorRaymond Hettinger <python@rcn.com>
Tue, 31 Aug 2004 01:05:15 +0000 (01:05 +0000)
committerRaymond Hettinger <python@rcn.com>
Tue, 31 Aug 2004 01:05:15 +0000 (01:05 +0000)
commit3fa19d7ff89be87139e2864fb9186b424d180a58
tree1bae30d89763729e548907895cb89c8ca995b69a
parentdaec961e091b76b1329077f505aa8db92a027002
Take advantage of the math library's ldexp for assembling a float by
components without division and without roundoff error for properly
sized mantissas (i.e. on systems with 53 or more mantissa bits per
float).  Eliminates the previous implementation's rounding bias as
aptly demonstrated by Tim Peters.
Lib/random.py