chickadee » random-bsd » random-fixnum

random-fixnum Nprocedure

Return a fixnum in the range 0 .. N-1, where N is an exact integer.

On a 32-bit system, the range is 0 .. 2^30-2.

On a 64-bit system, the range is 0 .. 2^62-2. There are at most 53 bits of precision, so when N >= 2^53 there will be gaps in the range.