[Mono-bugs] [Bug 43597][Wis] Changed - When Random () is started with a seed 0, it always returns 0 for NextValue

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
Wed, 28 May 2003 22:43:38 -0400 (EDT)


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by spouliot@videotron.ca.

http://bugzilla.ximian.com/show_bug.cgi?id=43597

--- shadow/43597	Fri May 23 18:37:07 2003
+++ shadow/43597.tmp.11071	Wed May 28 22:43:38 2003
@@ -10,12 +10,13 @@
 Component: CORLIB
 AssignedTo: mono-bugs@ximian.com                            
 ReportedBy: giuseppe.greco@agamura.com               
 QAContact: mono-bugs@ximian.com
 TargetMilestone: ---
 URL: 
+Cc: giuseppe.greco@agamura.com,spouliot@videotron.ca
 Summary: When Random () is started with a seed 0, it always returns 0 for NextValue
 
 Class Random
 ------------
 
 The Random.Next(int min, int max) always returns
@@ -44,6 +45,11 @@
 
 You are creating Random () with a seed of 0. The problem is that the
 way our RNG is made, it will _only_ return 0 if given that seed. You
 should remove the 0 from the constructor, and your program will work fine.
 
 We need to re-think the method we use on the RNG.
+
+------- Additional Comments From spouliot@videotron.ca  2003-05-28 22:43 -------
+Current algorithm is standard but as a "small type" clause:
+"Set *idum (to be modified) to any nonzero integer value to 
+initialize the sequence."