Numbers in python

Sybren Stuvel sybrenUSE at YOURthirdtower.com.imagination
Fri Mar 10 10:11:37 EST 2006


brainy_muppet at hotmail.com enlightened us with:
> if I put 'THE' = float(0.965) it returns 0.96555555549 or something
> similar.

That's for the same reasons as you can't write 1/3rd in decimal
notation. Computers can't write 1/10th in binary notation.

Sybren
-- 
The problem with the world is stupidity. Not saying there should be a
capital punishment for stupidity, but why don't we just take the
safety labels off of everything and let the problem solve itself? 
                                             Frank Zappa



More information about the Python-list mailing list