[Python-Dev] Expert floats
Aahz
aahz at pythoncraft.com
Tue Mar 30 20:28:12 EST 2004
On Tue, Mar 30, 2004, Andrew Koenig wrote:
>
> I wish that Python would use the same conversion rules as Scheme:
>
> string->float yields the closest rounded approximation to the
> infinite-precision number represented by the string
>
> float->string yields the string with the fewest significant
> digits that, when converted as above, yields exactly the same
> floating-point value
I've read the whole thread, and I wanted to repeat a critical point for
emphasis:
This doesn't help
No matter what you do to improve conversion issues, you're still dealing
with the underlying floating-point problems, and having watched the
changing discussions in c.l.py since we moved to the different conversion
system, it seems clear to me that we've improved the nature of the
discussion by forcing people to get bitten earlier.
Facundo's Decimal module is the only way to improve the current
situation.
--
Aahz (aahz at pythoncraft.com) <*> http://www.pythoncraft.com/
"usenet imitates usenet" --Darkhawk
More information about the Python-Dev
mailing list