‹ BackHN Continuity

Thread

AMD's random number generator can't generate a 0?

288 points · 220 comments · BruceEel

  1. ExoticPearTree · · focus · HN ↗
    The probability of generating a zero is incredibly low if you use the normal distribution curve.

    So it is not necessarily that it doesn't generate zero, they did not run enough times to increase the probability of actually generating a zero.

    1. blensor · · focus · HN ↗
      From what I can see they were trying to generate 16bit integers, so the probability is 1 in 65536 and they were running the test for 11 hours.

      You definitely would expect a roughly equal number of 0s as any other of those numbers since it's uniformly distributed. And definitely not 0

      1. ExoticPearTree · · focus · HN ↗
        > You definitely would expect a roughly equal number of 0s as any other of those numbers since it's uniformly distributed.

        How would random numbers be uniformly distributed?

        1. Hugsbox · · focus · HN ↗
          Because each number is equally as likely as every other number. If you know you're more likely to get certain numbers, or in this case have no chance of getting certain other numbers, it is by definition _less random_.
          1. ExoticPearTree · · focus · HN ↗
            Ah. My reasoning, with the normal distribution, was that zero was at the left most end of the curve and with a pretty much non-existent chance of appearing.
Open on Hacker News to reply ↗

Unofficial Hacker News client; not affiliated with Y Combinator.