up previous next
random integer
The function returns a random integer between X and Y, inclusive. (Note:
|X-Y| should be less than
2^33 to assure a more random distribution.)
NB: every time you restart CoCoA the sequence of random numbers will
be the same (as happens in many programming languages). If you want better
randomness, see
Seed
.
/**/ random(1,100);
6
/**/ random(-10^4,0);
-3263
|