ciao
ciao copied to clipboard
Feature request random/3 that works with bigint
I guess random/3 always generates zero, for a large M:
/* Ciao 1.22.0 */
?- M is (1<<101), random(0,M,X).
X = 0
?- M is (1<<101), random(0,M,X).
X = 0
Doesn’t happen for a smallint argument:
?- random(0,77,X).
X = 62
?- random(0,77,X).
X = 71
What about a random/3 that could deal with bigints, like random_between/3 from SWI-Prolog?