floating point in 2.0

Kurt B. Kaiser kbk at shore.net
Wed Jun 6 13:42:07 EDT 2001


Aahz Maruch wrote:
> Quite the contrary!  The sooner people realize that floating point is
> broken, the better off they are!

What we're talking about is the unformatted output representation. Until
Python computes (with reasonable speed) in BCD or some such, I think
most people would want good old "print". Precision is not the issue
for 99.9% of the users, it's comparison, if there is an issue at all.
The cognoscenti can always displayhook whatever output method they want. 

As I recollect from my APL days, there was a FUZZ factor which could
be set to control the comparison. It would be nice if Python could
overload == with something like that when comparing floats.

My mom used to make me eat my spinach with cod liver oil....maybe we
should output in binary to *really* show the problem...;)
Regards, KBK



More information about the Python-list mailing list