changed: #documentation
authorClaus Gittinger <cg@exept.de>
Sat, 06 Mar 2010 12:29:21 +0100
changeset 2427 ea26fd4ce3f2
parent 2426 5348d3922323
child 2428 b283e32a8db5
changed: #documentation
RandomParkMiller.st
--- a/RandomParkMiller.st	Fri Mar 05 15:57:14 2010 +0100
+++ b/RandomParkMiller.st	Sat Mar 06 12:29:21 2010 +0100
@@ -15,6 +15,16 @@
 
     Another pseudo-random number generator
 
+    The ParkMiller random generator (although better than the old Random), is not recommended 
+    when a high quality random is required (for example, for cryptographic work). 
+    Applications should use either the OS-random generator or a LaggedFibonacci generator.
+    This is because the random values provided by the Park-Miller generator are double precision 
+    floating point numbers which have up to 53 significant bits. Since only the first 31 bits 
+    of their mantissa are known to have good random properties, the behavior of the remaining 
+    22 bits is undefined. 
+    In particular, bit aliasing occurs during the calculation of the next random value, 
+    and bit 22 of the mantissa is always 1.
+
     Please read:
         Standard reference by Park and Miller in 
             'Random Number Generators: Good Ones Are Hard to Find',
@@ -119,7 +129,11 @@
 !RandomParkMiller class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic2/RandomParkMiller.st,v 1.3 2008-12-16 22:40:21 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic2/RandomParkMiller.st,v 1.4 2010-03-06 11:29:21 cg Exp $'
+!
+
+version_CVS
+    ^ '$Header: /cvs/stx/stx/libbasic2/RandomParkMiller.st,v 1.4 2010-03-06 11:29:21 cg Exp $'
 ! !
 
 RandomParkMiller initialize!