[issue1580] Use shorter float repr when possible
Guido van Rossum
report at bugs.python.org
Wed Dec 12 01:06:46 CET 2007
Guido van Rossum added the comment:
> If I were in that situation I would prefer to store the binary
> representation. But if someone really needs to store decimal floats,
> we can add a method "fast_repr" which always calculates 17 decimal
> digits.
They can just use "%.17g" % x
> Decimal to binary conversion, in any case, shouldn't be slower than it
> is now, since on Gnu it is done anyway, and I don't think that our
> implementation should be much slower.
Sure.
__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue1580>
__________________________________
More information about the Python-bugs-list
mailing list