Template:Random number/testcases

Sandbox notes
This version uses fmod builtin operator (no longer need of Template:Mod) and the largest Mersenne prime (231−1) that fits in 32 bits.

This Mersenne prime is chosen to offer equal distribution when reducing the number of digits (better than bitmasking by an exact power of 2).

The next Mersenne prime (261−1) is too large to fit in 64-bit integers for computing products by reasonable primes (we could only use 2, 3, 5 or 7), or even just in the 52 bits of precision of a double float (used by #expr).