![]() |
![]() |
#166 |
Sep 2002
Database er0rr
106208 Posts |
![]()
I have just put out (post 148) code that does autoincrement of FFT size on excessive round-off error. Attached is the concept test program.
|
![]() |
![]() |
![]() |
#167 |
Jul 2003
So Cal
19×137 Posts |
![]() Code:
*** Maximum error of 0.500000 excessive at iteration 108154. Increasing FFT size. prp real 0m41.429s Code:
*** Maximum error of 0.375000 excessive at iteration 108660. Increasing FFT size. prp real 0m41.536s |
![]() |
![]() |
![]() |
#169 |
Sep 2002
Database er0rr
24·281 Posts |
![]()
The ultimate Ver_6 has been uploaded to post 148. It uses functions and a neat piece of code to calculate odd d for n-1=d*2^r thanks to frmky. It might be a little bit quicker. As I state there, comment out the printf(); function messaging about FFT increases if you find them annoying at runtime.
frmky is working on 3-SPRP GMP code to be used above a certain threshold based this UTM page. This is useful for ARM based computers. Last fiddled with by paulunderwood on 2022-06-22 at 19:27 |
![]() |
![]() |
![]() |
#170 | |
Jul 2003
So Cal
19×137 Posts |
![]() Quote:
This code is slower than Paul's version using gwnum but is faster than mpz_probab_prime_p(). It's useful where gwnum is not available. Code:
int cm_nt_is_prime (mpz_t n) { unsigned long j, r; int prime = 0; mpz_t d, a, x, n_sub_1; if (mpz_sizeinbase(n, 2) < 4096) return (mpz_probab_prime_p(n, 0) > 0); if (mpz_even_p(n)) return 0; mpz_inits(d, a, x, n_sub_1, NULL); mpz_sub_ui(n_sub_1, n, 1); r = mpz_scan1(n_sub_1, 0); mpz_fdiv_q_2exp(d, n_sub_1, r); mpz_set_ui(a, 3); mpz_powm(x, a, d, n); if ((mpz_cmp_ui(x, 1) == 0) || (mpz_cmp(x, n_sub_1) == 0)) prime = 1; else { for (j = 1; j < r; j++) { mpz_powm_ui(x, x, 2, n); if (mpz_cmp(x, n_sub_1) == 0) { prime = 1; break; } } } mpz_clears(d, a, x, n_sub_1, NULL); return prime; } |
|
![]() |
![]() |
![]() |
#171 | |
Aug 2020
79*6581e-4;3*2539e-3
12238 Posts |
![]()
edit: running sudo ldconfig solved the issue...
Quote:
Last fiddled with by bur on 2022-06-30 at 08:12 |
|
![]() |
![]() |
![]() |
#172 | |
Bamboozled!
"๐บ๐๐ท๐ท๐ญ"
May 2003
Down not across
2D8E16 Posts |
![]() Quote:
Code:
export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH |
|
![]() |
![]() |
![]() |
#173 |
Aug 2020
79*6581e-4;3*2539e-3
659 Posts |
![]()
Thanks, I did ldconfig which fixed it.
|
![]() |
![]() |
![]() |
#174 |
Aug 2020
79*6581e-4;3*2539e-3
10100100112 Posts |
![]()
A question regarding the progress with the -v switch, I noticed values like qroot, Cornacchia and trial div increase over time, are those the values to look out for? If so, up to which value will they increase?
|
![]() |
![]() |
![]() |
#175 | |
Sep 2002
Database er0rr
10001100100002 Posts |
![]() Quote:
I suggest that you start with some small test cases like (10^1031-1)/9. |
|
![]() |
![]() |
![]() |
#176 | |
"99(4^34019)99 palind"
Nov 2016
(P^81993)SZ base 36
2·7·263 Posts |
![]() Quote:
|
|
![]() |
![]() |
![]() |
Thread Tools | |
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
what is the best primality software? | bbb120 | Proth Prime Search | 75 | 2022-10-08 11:45 |
Fastest software for Mersenne primality test? | JonathanM | Information & Answers | 25 | 2020-06-16 02:47 |
APR-CL as primality proof | f1pokerspeed | FactorDB | 14 | 2014-01-09 21:06 |
Proof of Primality Test for Fermat Numbers | princeps | Math | 15 | 2012-04-02 21:49 |
PRIMALITY PROOF for Wagstaff numbers! | AntonVrba | Math | 96 | 2009-02-25 10:37 |