Anonymous user
Lucas-Lehmer test: Difference between revisions
m
→{{header|C}}: not that this program needs to be optimised any, but...
m (→{{header|Python}}: remove comments, rename variables, and include some optimiser hints) |
m (→{{header|C}}: not that this program needs to be optimised any, but...) |
||
Line 112:
int i;
for (i = 3; i <= p; i++){
s = (s * s - 2) % m_p;
}
return s == 0;
|