Does python suck or I am just stupid?

Jp Calderone exarkun at intarweb.us
Tue Feb 25 17:10:38 EST 2003


On Tue, Feb 25, 2003 at 01:32:30PM -0800, Ian Terrell wrote:
> More on floating point:  floats *can* store exact values if they are
> combinations of 1/(2^n), n=0,1,2,...
> 
> Your program runs "as expected" if you substitute
> u_inc = 1.0/1024 for
> u_inc = 0.001
> 
> (just for fun)
> 

  Just as a broken clock will tell the correct time twice a day. ;)

  Jp

-- 
A sad spectacle.  If they be inhabited, what a scope for misery 
and folly.  If they be not inhabited, what a waste of space.
                -- Thomas Carlyle, looking at the stars
-- 
 up 17 days, 2:29, 5 users, load average: 0.17, 0.25, 0.26
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-list/attachments/20030225/8b8dc339/attachment.sig>


More information about the Python-list mailing list