![]() |
|
|
#34 | |
|
Sep 2014
23 Posts |
Quote:
Basically you check the numbers mod 4 or 8, swap them around, take the remainder, and repeat until you end up with 1 or 2. |
|
|
|
|
|
|
#35 | |
|
"Mihai Preda"
Apr 2015
22×3×112 Posts |
Quote:
I have two more questions: - why, if R is a valid LL residue, (R-2/Mp) must be -1. - why, if (x-2/Mp) is 1, it follows that iterating LL from x produces (R-2/Mp)==1 at each iteration. (if I understood correctly what you said). |
|
|
|
|
|
|
#36 | |
|
Sep 2014
23 Posts |
Quote:
This is always (R0+2/Mp) = -1 and (R0-2/Mp) = 1 The next residue is R1 = R0^2-2 This computes as (R1+2/Mp) = (R0^2/Mp) = 1 and (R1-2/Mp) = (R0^2-4/Mp) = ((R0-2)(R0+2)/Mp) = (R0-2/Mp)(R0+2/Mp) = 1*(-1) = -1 For any subsequent iteration the same happens: (Ri+2/Mp) = 1 and (Ri-2/Mp) = -1 If you take a random number Rx instead, it has equal probabilities of having any of the four combinations of (Rx+-2/Mp) as ++, +-, -+, --(1) Then computing ((Rx^2-2)+-2/Mp) would result in ++, +-, +-, ++, which is wrong to be a proper residue 50% of the cases (it should be +-). If you could check this at every iteration, i.e. also when you happen to run into Rx, you'd catch the case -+ as well, so 75% of the cases, and only +- would let you continue. |
|
|
|
|
|
|
#37 | |
|
"Mihai Preda"
Apr 2015
22×3×112 Posts |
Quote:
|
|
|
|
|
|
|
#38 |
|
Undefined
"The unspeakable one"
Jun 2006
My evil lair
6,793 Posts |
How does this differ from the sum_of_inputs = sum_of_outputs test? Is it more robust? It is cheaper to compute? Should it be used as an additional test or a replacement? If there are two (or more) errors that occur between doing the tests does it go back to the +- result?
|
|
|
|
|
|
#39 | |
|
Sep 2014
23 Posts |
Quote:
"Jacobi-flip" sustains in subsequent iterations as well. If more than one random errors occur in between, you gain no more, as these have an equal chance of curing the improper value as keeping it such. The overall chance remains at 50%. |
|
|
|
|
|
|
#40 | |
|
"Mihai Preda"
Apr 2015
22·3·112 Posts |
Quote:
- the sumout is huge, so care ("tricks") must be taken when doing the summation otherwise the errors overcome the signal. - the sums are not over integers, but over the reals produced by the weighting of the DWT (or the output of the IFFT, before the reverse weighting) - there is an heuristic element in deciding how much difference is "too much" (i.e. the test is approximate) In practice, on GPU at least, the "max error" seems to me an easier and more useful indication of a plausible result. About the "sticky" behavior of the Jacobian test, my intuition is this: when checking after each batch (e.g. 10K iterations), if inside the batch there is one *or more* errors, there is 50% probability of detection at the batch level. So if over the whole LL there are E errors, if E is much smaller than the number of batches, we have overall "undetected error" of 0.5^E. The worst case would still be a single error (over the whole LL) with overall detection of only 1/2. |
|
|
|
|
|
|
#41 |
|
"Mihai Preda"
Apr 2015
5AC16 Posts |
Computing the Jacobi symbol is not so fast after all -- the slow operation is the repeated modulo of big integers. I did some experiments with GMP (GNU MP) which conveniently offers mpz_jacobi(), and the time for exponent 77002949 is around 55s on one core of my CPU.
Everything works as expected otherwise, producing -1 on all iterations. |
|
|
|
|
|
#42 | |
|
P90 years forever!
Aug 2002
Yeehaw, FL
205716 Posts |
Quote:
Is there free Jacobi code available ( GMP has poisonous GNU license restrictions )? P.S. I'd google for free code but my Internet availability is severely restricted at the moment. P.P.S. I think using libgmp would avoid license issues assuming one can freely ship libgmp for all platforms that prime95 supports. But then again IANAL.
|
|
|
|
|
|
|
#43 | |
|
Sep 2003
2·5·7·37 Posts |
Quote:
|
|
|
|
|
|
|
#44 |
|
If I May
"Chris Halsall"
Sep 2002
Barbados
2·112·47 Posts |
|
|
|
|
![]() |
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Stockfish / Lutefisk game, move 14 poll. Hungry for fish and black pieces. | MooMoo2 | Other Chess Games | 0 | 2016-11-26 06:52 |
| Redoing factoring work done by unreliable machines | tha | Lone Mersenne Hunters | 23 | 2016-11-02 08:51 |
| Unreliable AMD Phenom 9850 | xilman | Hardware | 4 | 2014-08-02 18:08 |
| [new fish check in] heloo | mwxdbcr | Lounge | 0 | 2009-01-14 04:55 |
| The Happy Fish thread | xilman | Hobbies | 24 | 2006-08-22 11:44 |