random 64-bit int

Tim Peters tim at zope.com
Thu Jul 25 18:37:00 EDT 2002


[Tim]
> A Python float is a C double, which on most boxes has 53 bits of
> precision.  That means, e.g., that there are 2**53 distinct Python floats
> in the range [0.5, 1.0) alone. ...

[Bengt Richter]
> It's a lot of floats, but I think your number should be 52, for
> bits representing the fraction bits below the single implicit bit that
> represents 0.5 or 0.25 etc.

Right you are!  If you exhaust those 2**52, feel free to sue me for the
other 2**52 I claimed were there <wink>.





More information about the Python-list mailing list