Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re^4: is it prime?

by danaj (Friar)
on Jun 09, 2014 at 08:57 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1089242]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (6)
As of 2024-04-19 10:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found