[Mono-bugs] [Bug 629376] New: Random.Next(minValue, maxValue) never returns maxValue
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Sun Aug 8 00:59:38 EDT 2010
http://bugzilla.novell.com/show_bug.cgi?id=629376
http://bugzilla.novell.com/show_bug.cgi?id=629376#c0
Summary: Random.Next(minValue,maxValue) never returns maxValue
Classification: Mono
Product: MonoTouch
Version: unspecified
Platform: Other
OS/Version: Other
Status: NEW
Severity: Normal
Priority: P5 - None
Component: Runtime
AssignedTo: gnorton at novell.com
ReportedBy: jbehren at gmail.com
QAContact: mono-bugs at lists.ximian.com
Found By: ---
Blocker: ---
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US)
AppleWebKit/534.3 (KHTML, like Gecko) Chrome/6.0.472.25 Safari/534.3
Not easily testable using large numbers, but when using Random.Next(int
minValue, int maxValue) the return value is never the maxValue.
Tested with (0,8) which returned 0-7 regularly and (0,9) which returned 0-8
regularly.
Definitely displays in debug + release mode on device (3gs v3.1.3 and 4
v4.0.1), and I believe it is also problematic in the simulator.
Reproducible: Always
Steps to Reproduce:
1.initialize application with a single random instance
2.call random.Next(0,9) repeatedly using single instance.
3.verify random.Next(0,9) does not return 9
Actual Results:
pseudo-random return values of 0-8
Expected Results:
pseudo-random return values of 0-9, including 9.
--
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
More information about the mono-bugs
mailing list