up previous next
random(X: INT, Y: INT): INT |
This function returns a random integer between
X and
Y, inclusive.
The distribution is uniform.
NOTE: every time you restart CoCoA the sequence of random numbers will
be the same (as happens in many programming languages). You can change
this by using
reseed
.
/**/ random(1,100);
6
/**/ random(-10^4,0);
-3263
|