[Mono-bugs] [Bug 51229][Nor] New - PrimalityTests.SmallPrimeSppTest doesn't work...

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Fri, 6 Feb 2004 16:19:35 -0500 (EST)


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=51229

--- shadow/51229	2004-02-06 16:19:35.000000000 -0500
+++ shadow/51229.tmp.11273	2004-02-06 16:19:35.000000000 -0500
@@ -0,0 +1,52 @@
+Bug#: 51229
+Product: Mono/Class Libraries
+Version: unspecified
+OS: All
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: Unknown
+Priority: Normal
+Component: CORLIB
+AssignedTo: bmaurer@users.sf.net                            
+ReportedBy: pieter@mentalis.org               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Summary: PrimalityTests.SmallPrimeSppTest doesn't work...
+
+The SmallPrimeSppTest method in the Mono.Math.Prime.PrimalityTests class 
+doesn't work properly. It returns false even though I know the number in 
+question is a prime number. SmallPrimeSppTest is the method that is used 
+in BigInteger.isProbablePrime, so this method won't work either.
+
+I used the three large primes described in RFC2412 
+[http://www.faqs.org/rfcs/rfc2412.html] appendix E. When I use the 
+RabinMillerTest to test the primality of these primes, it returns true -- 
+as expected.
+
+------- Additional Comments From bmaurer@users.sf.net  2003-11-20 14:54 -------
+Hello,
+
+Can you provide some incite into why it is not working correctly. Am 
+stumped on this one.
+
+Thanks,
+Ben
+
+------- Additional Comments From pieter@mentalis.org  2003-11-20 16:13 -------
+I've posted a a more detailed description about this bug on mono-
+devel-list. You can find my posts at:
+
+http://lists.ximian.com/archives/public/mono-devel-list/2003-
+November/003026.html
+
+and
+
+http://lists.ximian.com/archives/public/mono-devel-list/2003-
+November/003027.html
+
+I don't know why exactly the SmallPrimeSppTest doesn't work -- it 
+simply returns the wrong results [ie, if you give it a prime number, 
+SmallPrimeSppTest says it isn't prime]. The Rabin-Miller test returns 
+the correct results.