Against PEP 240
Aahz Maruch
aahz at panix.com
Thu May 31 13:28:32 EDT 2001
In article <3B1674D8.67690A5A at san.rr.com>, Darren New <dnew at san.rr.com> wrote:
>
>BCD is good for high precision small range. Float is good for lower
>precision wider range. Science is generally limited by the number of
>significant digits in your real measurements. You can't know how close
>that star is down to the inch. Hence, using binary for FP gives you more
>precision in the same number of bits.
One can have floating-point BCD, which is what I'm currently working on.
It's a real pleasure to write
1.2e2346257231235019862340987162305961293865 * 2.0
and get
2.40e2346257231235019862340987162305961293865
Note carefully the mantissa with its trailing zero.
--
--- Aahz <*> (Copyright 2001 by aahz at pobox.com)
Androgynous poly kinky vanilla queer het Pythonista http://www.rahul.net/aahz/
Hugs and backrubs -- I break Rule 6
"Characters exist to suffer, you know. An author needs a little sadism
in her makeup." --Brenda Clough
More information about the Python-list
mailing list