Re: Random??

From: Ken Anderson <kanderso_at_bbn.com>
Date: Tue, 14 Nov 1995 08:46:02 +0000

  Posted-Date: Tue, 14 Nov 1995 11:16:40 +0100
  Received-Date: Tue, 14 Nov 1995 11:16:40 +0100
  Date: Tue, 14 Nov 95 11:25:15 +0100
  From: Angelo Saccomano <angelo_at_artu.usr.dsi.unimi.it>
  To: stk_at_kaolin.unice.fr
  Subject: Random??
  X-Mailing-List: <stk_at_kaolin.unice.fr> archive/latest/936
  X-Loop: stk_at_kaolin.unice.fr
  Precedence: list
  
  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 see nothing wrong with this sequence. Are you saying it repeats after 4
calls to random? I don't see that behavior in STk 2.2.

k
Received on Tue Nov 14 1995 - 14:48:50 CET

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