This math scares me

John W. Baxter jwbnews at
Tue Mar 13 22:31:34 CET 2001

In article <984518199.127140 at>,
 "Werner Schiendl" <ws-news at> wrote:

> True, but even 0.1 and 0.2 need not necessarily be exact values.

Of the single decimal digit numbers, 20% are exact (x.0 and x.5, for not 
huge x).  For two decimal places, it's down to 4% (x.00, x.25, x.50, 
x.75) and it spirals quickly downward from there.

Bill Gates got this right in the early days, delivering two Basic 
interpreters:  binary floating point for speed, and decimal floating 
point for money and such.  (I never looked at how well his interpreters 
did...I just used them.)


John W. Baxter   Port Ludlow, WA USA  jwbnews at

More information about the Python-list mailing list