JDK 9 RFR of 8042478: Include Mersenne primes in BigInteger primality testing

Joe Darcy joe.darcy at oracle.com
Thu May 8 22:42:33 UTC 2014

On 05/08/2014 03:28 PM, Brian Burkhalter wrote:
> Hello,
> This follows from a prior discussion thread http://mail.openjdk.java.net/pipermail/core-libs-dev/2014-May/026771.html.
> Issue:	https://bugs.openjdk.java.net/browse/JDK-8042478
> Patch:	http://cr.openjdk.java.net/~bpb/8042478/webrev.00/
> Adds a test of the first 19 Mersenne primes. The remainder of the exponent list is commented out as it takes too long to run. The value 19 appears to give a reasonable execution time. The largest Mersenne prime tested is 285542542228902608580607.
> Thanks,
> Brian

Hi Brian,

Generally looks good. However, I think it would be better structured if 
the array of Mersenne exponents was with the Mersenne testing method.



More information about the core-libs-dev mailing list