mersenneforum.org  

Go Back   mersenneforum.org > Extra Stuff > Blogorrhea > enzocreti

Reply
 
Thread Tools
Old 2019-02-12, 08:05   #1
enzocreti
 
Mar 2018

509 Posts
Default PFGW

PFGW does it make a strong probable prime test?
enzocreti is offline   Reply With Quote
Old 2019-02-12, 13:13   #2
henryzz
Just call me Henry
 
henryzz's Avatar
 
"David"
Sep 2007
Cambridge (GMT)

52·227 Posts
Default

Quote:
Originally Posted by enzocreti View Post
PFGW does it make a strong probable prime test?
PFGW just does a prp test not a sprp test.
henryzz is online now   Reply With Quote
Old 2019-02-12, 13:34   #3
Dylan14
 
Dylan14's Avatar
 
"Dylan"
Mar 2017

3×7×23 Posts
Default

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)
Dylan14 is offline   Reply With Quote
Old 2019-02-14, 08:14   #4
enzocreti
 
Mar 2018

509 Posts
Default PADRE

How to use PADRE (Perl)?
I want to use it for using functions like ispseudoprime, isprime...
enzocreti is offline   Reply With Quote
Old 2019-02-14, 08:45   #5
xilman
Bamboozled!
 
xilman's Avatar
 
May 2003
Down not across

2·3·23·73 Posts
Default

Quote:
Originally Posted by enzocreti View Post
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!
xilman is offline   Reply With Quote
Old 2019-02-16, 12:42   #6
enzocreti
 
Mar 2018

50910 Posts
Default PADRE and math tools

How can I import number theory utilities https://metacpan.org/pod/ntheory in PADRE (Perl)?
enzocreti is offline   Reply With Quote
Old 2019-02-16, 12:55   #7
enzocreti
 
Mar 2018

509 Posts
Default 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?
enzocreti is offline   Reply With Quote
Old 2019-02-16, 18:46   #8
retina
Undefined
 
retina's Avatar
 
"The unspeakable one"
Jun 2006
My evil lair

159B16 Posts
Default

Quote:
Originally Posted by enzocreti View Post
-> 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
retina is online now   Reply With Quote
Old 2019-03-12, 08:20   #9
enzocreti
 
Mar 2018

509 Posts
Default 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?
enzocreti is offline   Reply With Quote
Old 2019-03-12, 09:03   #10
paulunderwood
 
paulunderwood's Avatar
 
Sep 2002
Database er0rr

7×467 Posts
Default

Quote:
Originally Posted by enzocreti View Post
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
paulunderwood is offline   Reply With Quote
Old 2019-03-12, 09:52   #11
enzocreti
 
Mar 2018

509 Posts
Default

Quote:
Originally Posted by paulunderwood View Post
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?
enzocreti is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
GWNUM program paulunderwood Programming 52 2019-05-08 20:21
LLR V3.8.2 using gwnum 26.2 is available! Jean Penné Software 25 2010-11-01 15:18
GWNUM? Unregistered Information & Answers 3 2010-09-12 19:52
GWNUM as DLL? Cyclamen Persicum Software 1 2007-01-02 20:53
GWNUM library bearnol Software 6 2006-02-24 11:19

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

Sun Jul 5 08:08:21 UTC 2020 up 102 days, 5:41, 1 user, load averages: 1.39, 1.27, 1.21

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.