Random??

From: Angelo Saccomano <angelo_at_artu.usr.dsi.unimi.it>
Date: Tue, 14 Nov 95 11:25:15 +0100

Hi!

I have some problem with the use of Scheme function
"Random". It seems that for n=power of 2 the value returned is not
so random...

Ex:

STk> (random 4)
->2
STk> (random 4)
->3
STk> (random 4)
->0
STk> (random 4)
->1
STk> (random 4)
->2
STk> (random 4)
->3

...and so on!

I used also the initialization function (set-random-see! num) but it doesn't change...
Tahnks!

Angelo, State University of Milan, Department of Computer Science
Received on Tue Nov 14 1995 - 11:18:05 CET

This archive was generated by hypermail 2.3.0 : Mon Jul 21 2014 - 19:38:59 CEST