![]() |
|
|
#23 |
|
Sep 2002
Database er0rr
3,739 Posts |
I am moving thread to "Programming".
Last fiddled with by paulunderwood on 2020-03-17 at 16:05 |
|
|
|
|
|
#24 |
|
Nov 2017
Karlsruhe, Germany
1F16 Posts |
I'm perfectly happy have the programming part of this discussion moved somewhere else.
Though I do believe the question if \(\exists S \left( n \right) \equiv 1 \mod M_p\) belongs here. |
|
|
|
|
|
#25 | |
|
Nov 2003
164448 Posts |
Quote:
of the full twisted group iff q is prime. Otherwise, 4 generates a subgroup of the full twisted group. |
|
|
|
|
|
|
#26 | |
|
Sep 2002
Database er0rr
3,739 Posts |
Quote:
and leave it up to another mod to pick apart the Java aspects.
|
|
|
|
|
|
|
#27 |
|
Nov 2017
Karlsruhe, Germany
31 Posts |
|
|
|
|
|
|
#28 |
|
Nov 2017
Karlsruhe, Germany
31 Posts |
The original topic which was about certain edge cases in the Lucas-Lehmer-Test derailed fairly quickly and I'd like to continue the programming discussion here.
So @axn, any idea what seems to be wrong with your code? And in Java & is the bitwise AND operator @paulunderwood. And so is the and method here. |
|
|
|
|
|
#29 | |
|
Nov 2017
Karlsruhe, Germany
31 Posts |
Quote:
Also @bearnol would you putting your doubts about his statements into words here too? The programming discussion may continue here: https://www.mersenneforum.org/showthread.php?p=539988 Last fiddled with by BrainStone on 2020-03-17 at 22:28 |
|
|
|
|
|
|
#30 |
|
Nov 2003
22·5·373 Posts |
An full explanation would require quite a bit of prerequisite knowledge; At least a semester
of group theory and another semester of studying finite fields. Perhaps the best source for the latter is Lidl & Niederreiter's book on finite fields. |
|
|
|
|
|
#31 |
|
Sep 2002
Database er0rr
E9B16 Posts |
Code:
p=13;n=2^p-1;S=4; for(k=3,p,S=S^2-2; S=bitand(S,n)+(S>>p);if(S>=n,S-=n); print([p,S])) Code:
[13, 14] [13, 194] [13, 4870] [13, 3953] [13, 5970] [13, 1857] [13, 36] [13, 1294] [13, 3470] [13, 128] [13, 0] Last fiddled with by paulunderwood on 2020-03-17 at 22:50 |
|
|
|
|
|
#32 |
|
Nov 2017
Karlsruhe, Germany
1F16 Posts |
|
|
|
|
|
|
#33 |
|
Romulan Interpreter
Jun 2011
Thailand
7×1,373 Posts |
Threads merged and moved to programming.
There was no reason to split threads, the initial thread already gave all the answers, including from RDS, who was actually quite right. The fact you don't like the answers is not a reason to clutter. You are using java (terrible slow, interpreted, not compiled, no FFT multiplication, which translates to thousands of times slower than a "normal" gmp or gwnum implementation, and it is limited for integer size to 40k bytes or so, therefore completely futile to test any reasonable exponent), but in the same time you seem to be quite nitpicking on subtracting 2 before or after taking the modular from the square. People gave you already a better way to avoid division taking advantage of the binary form of the modulus, which would double the speed (not in pari, bitand is terrible slow there), with or without subtracting 2, and you are still fixed on that subtracting 2. C'mon man, it is like racing a tractor against a ferrary and trying to make your tractor faster by changing the position of the mirror or something, to avoid "catching the wind", or throwing out the knob of the handbrake because "it is too heavy". ![]() Listen to these guys, they know what they are talking. Last fiddled with by LaurV on 2020-03-18 at 06:55 |
|
|
|
![]() |
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Modifying the Lucas Lehmer Primality Test into a fast test of nothing | Trilo | Miscellaneous Math | 25 | 2018-03-11 23:20 |
| A second proof for the Lucas-Lehmer Test | carpetpool | Miscellaneous Math | 2 | 2017-07-30 09:21 |
| Lucas-Lehmer test | Mathsgirl | Information & Answers | 23 | 2014-12-10 16:25 |
| Lucas-Lehmer Test | storm5510 | Math | 22 | 2009-09-24 22:32 |
| Lucas Lehmer test question? | BMgf | Programming | 23 | 2003-12-09 08:52 |