[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
Fri, 23 May 2003 18:37:07 -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 bmaurer@users.sf.net.
http://bugzilla.ximian.com/show_bug.cgi?id=43597
--- shadow/43597 Fri May 23 17:02:40 2003
+++ shadow/43597.tmp.607 Fri May 23 18:37:07 2003
@@ -1,22 +1,22 @@
Bug#: 43597
Product: Mono/Class Libraries
Version: unspecified
-OS: Red Hat 9.0
+OS: All
OS Details:
Status: NEW
Resolution:
-Severity:
+Severity: 001 One hour
Priority: Wishlist
-Component: System
+Component: CORLIB
AssignedTo: mono-bugs@ximian.com
ReportedBy: giuseppe.greco@agamura.com
QAContact: mono-bugs@ximian.com
TargetMilestone: ---
URL:
-Summary: Random.Next(int min, int may) always returns min
+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
min... No random number is generated.
@@ -35,6 +35,15 @@
help to get the help message
current to get the current temperature (this shoul be just a random
value between -273 (absolute zero) and 100
average to get the average of the last detected temperatures
As you will see, typing 'current' always returns -273...
+
+------- Additional Comments From bmaurer@users.sf.net 2003-05-23 18:37 -------
+Ok, here is your problem
+
+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.