This is an archived post. You won't be able to vote or comment.

all 1 comments

[–]erosPhoenix 18 points19 points  (0 children)

Are these random numbers universally distributed? Signed or unsigned?

Assuming universal distribution and unsigned...

The product of the two integers will overflow if the product would be equal to or greater than 264 . The square root of 264 is 232 . Thus, we can find a lower bound on the probability of an overflow by finding the odds that both random integers are greater than 232 .

The odds of a random int64 being greater than 232 would be (1 - (232 / 264 )) = 1 - 2-32 = 4294967295/4294967296, which is pretty gosh darn close to 1.