@@ -59,18 +59,13 @@ class FastRand32( BaseLCG ):
5959
6060 Furthermore this class is callable:
6161 rand = FastRand32()
62- print( rand() ) # prints a pseudo-random value within [0.0, 1.0)
63- print( rand(a) ) # prints a pseudo-random value within [0.0, a)
64- print( rand(a,b ) ) # prints a pseudo-random value within [a , b )
62+ print( rand() ) # prints a pseudo-random value within [0.0, 1.0)
63+ print( rand(a) ) # prints a pseudo-random value within [0, a) or [0 .0, a) depending on the type of a
64+ print( rand(a, n ) ) # prints a list of n pseudo-random values each within [0, a )
6565
6666 Notice that for simulating the roll of a dice you should program:
6767 diceRoll = FastRand32()
68- print( int(diceRoll(1, 7)) ) # prints a uniform roll within set {1, 2, 3, 4, 5, 6}
69-
70- Such a programming is an accelerated while still robust emulation of the
71- inherited methods:
72- - random.Random.randint(self,1,6) and
73- - random.Random.randrange(self,1,7,1)
68+ print( int(diceRoll.randint(1, 6)) ) # prints a uniform roll within set {1, 2, 3, 4, 5, 6}
7469
7570 Reminder:
7671 We give you here below a copy of the table of tests for the LCGs that have
0 commit comments