![]() |
|
|
#45 | ||
|
Jul 2005
2×193 Posts |
Quote:
1) SPH is only calculated on a few low factors of p-1. Calculating ALL factors of every p-1 would take more time and, in my experience anyway, is slower than computing a few. 2) SPH doesn't guarantee that the search space is radically cut down. Many primes are of the form: (2*p)+1 where p is prime itself. i.e. 115325353710899 is prime and 115325353710898 is 2 * 57662676855449. SPH is not useful here and is less efficient that normal BSGS and so we are back to the same problem. We have to solve the DL by checking every exponent up to (p-1)/2. Quote:
The main point is that proth_sieve is highly optimised for sieving base=2 Proth/Riesel numbers. To change it to use base 5 would take some work. If this trick was to work every time then it would be possible to, with much less work that overhauling proth_sieve completely, to add arbitrary base support. The problem is that although it works in theory it is not possible to use this 'trick' to provide arbitrary base support to proth_sieve. The 'trick' can not be efficiently implemented as it breaks some of the assumptions that were made about the required exponents. As for solving the DL twice, the current sievers do more than this. Consider sieving for 83 different k-values (as Riesel sieve has in the past, a few may have been removed recently). With a bit of precomputation, on average, half of these k values will be removed by checking quadratic reciprocity. So we are left with about 40 different k-values to check. The sievers essentially solve all 42 different DLs that are left, but they share a large amount of work (the giant-steps or baby-steps hash table generation depending on how BSGS has been implemented). Adding one final DL to solve to allow a solution for non-base 2 DLs isn't that much work when you are already doing 40. |
||
|
|
|
|
|
#46 |
|
Aug 2002
3×52×7 Posts |
Since you've renamed functions, this is difficult to write.
The original ht = mul_mod_p_b( ht, gstep ); was faster than ht = mul_mod_p( ht, gstep ); even if you included the calculation of gstep/p; So I'm suprised that you are using ht = mul_mod_p( ht, gstep ); unless that is a rename too. |
|
|
|
|
|
#47 | |
|
Jun 2003
31·163 Posts |
Quote:
|
|
|
|
|
|
|
#48 |
|
Mar 2003
New Zealand
13×89 Posts |
The last bug fix didn't work (and made things worse) when starting a new sieve. As before, --check would have caught any problem. This version fixes it.
|
|
|
|
|
|
#49 | |
|
Jul 2005
2·193 Posts |
Quote:
The mulmod and powmod code have both been changed to use magic number multiplication. Mark implemented this and it came from _Hackers_Delight_ by Herny S. Warren (ISBN 0201914654). In essence it's similar to montgomery or barrett multiplication methods. For each new p value, two new values are calculated: pMagic and pShift. These are used by the mulmod, powmod and pow2mod functions and are safe to use up to values of 2^63. mul_mod_p() in our proth_sieve is much faster using this method than the FPU multiplication method used in the x86 proth_sieve. mul_mod_p_b() is an implementation of montgomery multiplication. It it is just 4 multiplies, two additions and a conditional subtract. All of these operations are 64-bit. So mul_mod_p() is used but only when the number of iterations is less than 5, but out mul_mod_p() is about twice the speed of the standard FPU version. |
|
|
|
|
|
|
#50 |
|
"Jason Goatcher"
Mar 2005
3×7×167 Posts |
I have no idea how to compile the program, so I'm not sure what to do.
I only have a Sempron, so if my only choice is LLR, I'm moving on to something else. Advice, please. |
|
|
|
|
|
#51 | |
|
Jun 2003
10011101111012 Posts |
Quote:
|
|
|
|
|
|
|
#52 | ||
|
Mar 2003
New Zealand
48516 Posts |
Quote:
Quote:
|
||
|
|
|
|
|
#53 |
|
Jul 2005
18216 Posts |
I just compiled it under Cygwin but it took a bit of hacking to get it to work.
Seems that the gcc I have (3.4.4) really didn't like the '_mulmod62' and '_one_over_p' references. I had to remove the leading underscore before they would compile properly. The 'fixed' source can be found at: http://www.greenbank.org/misc/cygwin...-0.0.10.tar.gz You can diff it against the original 0.0.10 source to check that I haven't added anything silly. |
|
|
|
|
|
#54 | |
|
Jun 2003
10011101111012 Posts |
Quote:
|
|
|
|
|
|
|
#55 | |
|
Jun 2003
13BD16 Posts |
Quote:
|
|
|
|
|
![]() |
| Thread Tools | |
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Very Prime Riesel and Sierpinski k | robert44444uk | Open Projects | 587 | 2016-11-13 15:26 |
| Sierpinski/ Riesel bases 6 to 18 | robert44444uk | Conjectures 'R Us | 139 | 2007-12-17 05:17 |
| Sierpinski/Riesel Base 10 | rogue | Conjectures 'R Us | 11 | 2007-12-17 05:08 |
| Sierpinski / Riesel - Base 23 | michaf | Conjectures 'R Us | 2 | 2007-12-17 05:04 |
| Sierpinski / Riesel - Base 22 | michaf | Conjectures 'R Us | 49 | 2007-12-17 05:03 |