Synopsis:
random n -- yields a random integer in the range 0 .. n-1.
Warning: doesn't correctly handle the case when n an integer is larger than 2^31-1.
i1 : tally apply(100, i -> random 10) |
See also:
Code:
-- ../../../Macaulay2/m2/integers.m2:68-70 random ZZ := ZZ => x -> ( if x <= 0 then error "expected a positive number"; randomint() % x)