logoalt Hacker News

ExoticPearTreetoday at 10:22 AM4 repliesview on 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.


Replies

blensortoday at 10:28 AM

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

zygentomatoday at 10:32 AM

This also seems to happen for 16 and 32 bit numbers, so you should be able to see zeros easily.

They also write:

> Running the same programs on an Intel processor, and the 0's are there with no problem.

matjatoday at 10:25 AM

Why would it be a normal distribution?

show 1 reply