osdir.com


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Sorting NaNs


On Fri, Jun 8, 2018 at 12:15 PM, Steven D'Aprano
<steve+comp.lang.python at pearwood.info> wrote:
> If you truly were limited to 2**32 different values (we're not), then it
> would be exactly right and proper to expect a collision in 2**16 samples.
> Actually, a lot less than that: more like 78000.
>
> https://en.wikipedia.org/wiki/Birthday_problem

2**16 is 65536, so the figure you give is pretty close to the
rule-of-thumb estimate that the square root of your pool is where
you're likely to have collisions.

ChrisA