Message Boards Message Boards

0
|
5498 Views
|
1 Reply
|
0 Total Likes
View groups...
Share
Share this post:
GROUPS:

PrimeQ: Possible Bug in version 10

Posted 10 years ago

This was done in version 10.0.1 on a 4-year-old iMac running Yosemite:

s = {27168, 27240, 27252, 27360}; Do[
 Print[s[[i]], "  ", Timing[PrimeQ[(10^s[[i]]*78880 - 1)/3]]], {i, 4}]

27168  {92.583833,False}
27240  {91.982271,False}
27252  {89.086203,False}
27360  {90.995002,False}

Primality testing of 4 good-sized numbers using PrimeQ, taking about 90 seconds each. Same code in 9.0.1 yields:

27168  {0.020205,False}
27240  {98.540874,False}
27252  {99.802669,False}
27360  {0.001561,False}

The middle two numbers are marginally slower but the big surprise is that the outer ones solve immediately. This is likely because some small factors were caught in the built-in, small-factor subroutine. I've spent many weeks doing this type of testing in Mathematica 10 and I imagine that I would have saved many days of computation had I used Mathematica 9 instead.

POSTED BY: Hans Havermann

Thank you for the feedback. The appropriate developers will be looking into this slowdown.

POSTED BY: Ilian Gachevski
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract