Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^4: is it prime?

by danaj (Friar)
on Jun 09, 2014 at 08:57 UTC ( #1089242=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/env perl
    use 5.010;
    ...
      "Module:MPXS" => sub { Math::Prime::XS::is_prime($_) for @large },
      "Module:Pari" => sub { Math::Pari::isprime($_) for @large },
    });
    
  2. or download this
    Validating tests on small primes
    Validating tests on small composites
    ...
           75640351 :  Y 0.000554  Y 0.000311  Y 0.000246  Y 0.000001
       760149189769 :  Y 0.056347  Y 0.031018  Y 0.024714  Y 0.000011
    635921898906263 :  Y 1.605829  Y 0.904163  Y 0.721130  Y 0.000004
    
  3. or download this
    
    Small inputs (2-5 digits)
    ...
    Module:MP      389/s    66256%    45241%      40546%    36418%    2871
    +8%       1465%        --        -84%      -100%
    Module:Pari   2387/s   407067%   278118%     249307%   223982%   17673
    +1%       9504%      514%          --       -98%
    Module:MPU  114853/s 19593759% 13388435%   12002000% 10783286%  850943
    +6%     462045%    29429%       4712%         --
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1089242]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (4)
As of 2018-08-14 21:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Asked to put a square peg in a round hole, I would:









    Results (155 votes). Check out past polls.

    Notices?