Anonymous user
Square form factorization: Difference between revisions
m
no edit summary
m (→{{header|Phix}}: added syntax colouring the hard way) |
mNo edit summary |
||
Line 230:
if ((N & 1)==0) return 2;
h = floor(sqrt(N)
if (h * h == N) return h;
Line 249:
//iteration bound
ix = floor(sqrt(2*r)) *
//search principal cycle
for (i = 2; i < ix; i +
rho(a, b, c)
//even step
r = floor(sqrt(c)+ 0.5);
if (r * r == c) {
//square form found
|