[issue3166] Make conversions from long to float correctly rounded.

Alexander Belopolsky report at bugs.python.org
Tue Dec 9 18:31:24 CET 2008


Alexander Belopolsky <belopolsky at users.sourceforge.net> added the comment:

..
> The idea's attractive.  The problem is finding an integer type that's
> guaranteed to have enough bits to store the mantissa for the float
> (probably plus one or two bits more for comfort);  for IEEE 754 this
> means a 64-bit integer type, and there aren't any of those in C89.

But Python already has an arbitrary precision integer type, why not
use it?  Performance may suffer, but optimization can be considered
later possibly first on the most popular platforms.

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue3166>
_______________________________________


More information about the Python-bugs-list mailing list