mersenneforum.org GWNUM
 Register FAQ Search Today's Posts Mark Forums Read

 2019-02-12, 08:05 #1 enzocreti   Mar 2018 32×59 Posts PFGW PFGW does it make a strong probable prime test?
2019-02-12, 13:13   #2
henryzz
Just call me Henry

"David"
Sep 2007
Liverpool (GMT/BST)

3×5×397 Posts

Quote:
 Originally Posted by enzocreti PFGW does it make a strong probable prime test?
PFGW just does a prp test not a sprp test.

 2019-02-12, 13:34 #3 Dylan14     "Dylan" Mar 2017 22×3×72 Posts From the pfgw doc, you might be able to get it using either the -t, -tc -tm or -tp switches (emphasis added by me): Code:  -t Deterministic test. This switch does not require any arguments. It will default to -tm if not specified, but if specified, must be p, c, or m. This option defaults to a N-1 test. This is NOT a probable test. You will want to use this mode whenever your number is easily factorable when you subtract 1. (for example n!+1) If the factorisation will be less then 33.33%, an F-strong test will be performed. -tp N+1 test. uses the N+1 test to check whether the number is prime. This is NOT a probable test. You will want to use this mode whenever your number is easily factorable when you add 1. (for example n!-1) If the factorisation is less then 33.33%, an F-strong test will be performed. -tc Combined N+1 and N-1 test. When you are short of factoring N-1, or N+1, and the other has some factors, you can try this mode to achieve a prove. This too is NOT a probable test. If the factored portions are F1 and F2, with F1>F2, and 3*F1+F2 is 100% or more, pfgw will be able to complete the proof. If this total is slightly below 100%, it should still be able to force a proof with some square tests using the -x flag. Example using 2^173727+9 (the 10000th place prp on Lifchitz's PRP top page at the time of posting): Code: pfgw64 -q"2^173727+9" PFGW Version 3.8.3.64BIT.20161203.Win_Dev [GWNUM 28.6] 2^173727+9 is 3-PRP! (4.8504s+0.0008s) pfgw64 -t -q"2^173727+9" PFGW Version 3.8.3.64BIT.20161203.Win_Dev [GWNUM 28.6] Primality testing 2^173727+9 [N-1, Brillhart-Lehmer-Selfridge] Running N-1 test using base 3 2^173727+9 is PRP! (33.1117s+0.0006s) pfgw64 -tc -q"2^173727+9" PFGW Version 3.8.3.64BIT.20161203.Win_Dev [GWNUM 28.6] Primality testing 2^173727+9 [N-1/N+1, Brillhart-Lehmer-Selfridge] Running N-1 test using base 3 Running N+1 test using discriminant 7, base 1+sqrt(7) 2^173727+9 is Fermat and Lucas PRP! (54.5021s+0.0005s)
 2019-02-14, 08:14 #4 enzocreti   Mar 2018 21316 Posts PADRE How to use PADRE (Perl)? I want to use it for using functions like ispseudoprime, isprime...
2019-02-14, 08:45   #5
xilman
Bamboozled!

"๐บ๐๐ท๐ท๐ญ"
May 2003
Down not across

101011011111002 Posts

Quote:
 Originally Posted by enzocreti How to use PADRE (Perl)? I want to use it for using functions like ispseudoprime, isprime...
In exactly the same way that I find to how to use Perl modules which I install on my machines.

I read the documentation and I run simple test cases.

Go to it!

 2019-02-16, 12:42 #6 enzocreti   Mar 2018 32·59 Posts PADRE and math tools How can I import number theory utilities https://metacpan.org/pod/ntheory in PADRE (Perl)?
 2019-02-16, 12:55 #7 enzocreti   Mar 2018 21316 Posts NUMBER THEORY UTILITIES -> Working on C:\Users\User\Desktop\PERL\Math-Prime-Util-0.70.tar.gz Fetching file://C:/Users/User/Desktop/PERL/Math-Prime-Util-0.70.tar.gz ... OK Configuring Math-Prime-Util-0.70 ... OK ==> Found dependencies: Math::Prime::Util::GMP --> Working on Math::Prime::Util::GMP Fetching search.cpan.org/CPAN/authors/โฆ ... FAIL ! Download search.cpan.org/CPAN/authors/โฆ failed. Retrying ... ! Download search.cpan.org/CPAN/authors/โฆ failed. Retrying .. Why failed?
2019-02-16, 18:46   #8
retina
Undefined

"The unspeakable one"
Jun 2006
My evil lair

632910 Posts

Quote:
 Originally Posted by enzocreti -> Working on C:\Users\User\Desktop\PERL\Math-Prime-Util-0.70.tar.gz Fetching file://C:/Users/User/Desktop/PERL/Math-Prime-Util-0.70.tar.gz ... OK Configuring Math-Prime-Util-0.70 ... OK ==> Found dependencies: Math::Prime::Util::GMP --> Working on Math::Prime::Util::GMP Fetching search.cpan.org/CPAN/authors/โฆ ... FAIL ! Download search.cpan.org/CPAN/authors/โฆ failed. Retrying ... ! Download search.cpan.org/CPAN/authors/โฆ failed. Retrying .. Why failed?
Maybe your code doesn't support 301 redirects.
Code:
~ curl -I http://search.cpan.org/CPAN/authors/id/D/DA/DANAJ/Math-Prime-Util-GMP-0.51.tar.gz
HTTP/1.1 301 Moved Permanently
Server: nginx
Content-Type: text/plain
Location: https://cpan.metacpan.org/authors/id/D/DA/DANAJ/Math-Prime-Util-GMP-0.51.tar.gz
Cache-Control: max-age=31536000
Via: 1.1 varnish
Content-Length: 5
Accept-Ranges: bytes
Date: Sat, 16 Feb 2019 18:45:01 GMT
Via: 1.1 varnish
Age: 21208
Connection: keep-alive
X-Served-By: cache-mdw17343-MDW, cache-sin18033-SIN
X-Cache: HIT, MISS
X-Cache-Hits: 1, 0
X-Timer: S1550342701.820462,VS0,VE438

 2019-03-12, 08:20 #9 enzocreti   Mar 2018 32×59 Posts GWNUM hallo I installed on my computer Code Blocks a C compiler. It seems to work. Now I want to import number theory functions for example from GWNUM for checking primality and factorization. How can I do that?
2019-03-12, 09:03   #10
paulunderwood

Sep 2002
Database er0rr

1111100011012 Posts

Quote:
 Originally Posted by enzocreti hallo I installed on my computer Code Blocks a C compiler. It seems to work. Now I want to import number theory functions for example from GWNUM for checking primality and factorization. How can I do that?
Get the source of Prime95 and compile it and also #include and pore over "giants.h" and "gwnum.h". See my thread on GWNUM in "Programming".

You might find GMP easier to use, but it not so great at huge numbers.

Last fiddled with by paulunderwood on 2019-03-12 at 09:03

2019-03-12, 09:52   #11
enzocreti

Mar 2018

10238 Posts

Quote:
 Originally Posted by paulunderwood Get the source of Prime95 and compile it and also #include and pore over "giants.h" and "gwnum.h". See my thread on GWNUM in "Programming". You might find GMP easier to use, but it not so great at huge numbers.

What is the source of Prime95?

 Similar Threads Thread Thread Starter Forum Replies Last Post paulunderwood Programming 54 2021-02-10 12:46 Jean Pennรฉ Software 25 2010-11-01 15:18 Unregistered Information & Answers 3 2010-09-12 19:52 Cyclamen Persicum Software 1 2007-01-02 20:53 bearnol Software 6 2006-02-24 11:19

All times are UTC. The time now is 00:08.

Sat Jan 22 00:08:23 UTC 2022 up 182 days, 18:37, 0 users, load averages: 1.15, 1.40, 1.32