Sorting NaNs

Gregory Ewing greg.ewing at canterbury.ac.nz
Thu Jun 7 03:02:42 EDT 2018


Steven D'Aprano wrote:
> But if it were (let's say) 1 ULP greater or less 
> than one half, would we even know?

In practice it's probably somewhat bigger than 1 ULP.
A typical PRNG will first generate a 32-bit integer and
then map it to a float, giving a resolution coarser than
the 52 bits of an IEEE double.

But even then, the probability of getting exactly 0.5
is only 1/2^32, which you're not likely to notice.

-- 
Greg



More information about the Python-list mailing list