Jump to content

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;
s = s % m_p;
}
return s == 0;
Cookies help us deliver our services. By using our services, you agree to our use of cookies.