commands → randominteger

randominteger(n)

The random command generates a random integer x with 0 <= x < n.

Examples

random(2^50);
	98545737684606

Algorithm

The random number generator uses the xorshift algorithm of Marsaglia.

References

Link to the xorshift algorithm on Wikipedia