User talk:Waldorf: Difference between revisions
Content added Content deleted
(New section: Lucas-Lehmer test) |
|||
Line 21: | Line 21: | ||
To (in hybrid Ada/C at least): |
To (in hybrid Ada/C at least): |
||
MP : Long_Long_Integer := 2ULL**Item - 1; |
MP : Long_Long_Integer := 2ULL**Item - 1; |
||
(esp if the bit width on Int is ≤ ¼ of Long_Long_Integer's width) |
|||
The logic is Lucas-Lehmer should be generate n in 2*n-1 where n is |
|||
⚫ | |||
"almost" half the bit width of Long_Long_Integer. If this width is |
|||
128, then n should get to: |
|||
M2 M3 M5 M7 M13 M17 M19 M31 M61 |
|||
Unsigned also help get to M127 if Long_Long_Integer is 32 bytes wide, |
|||
if there is such a thing. |
|||
⚫ |