[Python-Dev] Expert floats (original) (raw)

Greg Ewing greg at cosc.canterbury.ac.nz
Wed Mar 31 23:19:56 EST 2004


Andrew Koenig <ark-mlist at att.net>:

Decimal floating-point has almost all the pitfalls of binary floating-point, yet I do not see anyone arguing against decimal floating-point on the basis that it makes the pitfalls less apparent.

But they're not the pitfalls at issue here. The pitfalls at issue are the ones due to binary floating point behaving differently from decimal floating point.

Most people's mental model of arithmetic, including floating point, works in decimal. They can reason about it based on their experience with pocket calculators. They don't have any experience with binary floating point, though, so any additional oddities due to that are truly surprising and mysterious to them.

Greg Ewing, Computer Science Dept, +--------------------------------------+ University of Canterbury, | A citizen of NewZealandCorp, a | Christchurch, New Zealand | wholly-owned subsidiary of USA Inc. | greg at cosc.canterbury.ac.nz +--------------------------------------+



More information about the Python-Dev mailing list