Ask Your Question

Revision history [back]

The problem is that when you write int(P.order()) / int(fac) you make a division between two Python int, which results in a float.

If you write P.order() / fac you will get a rational, which is not good either. What you have to do it to turn this fraction back into an integer with ZZ(P.order() / fac) or int(P.order() / fac)

Note : i did not check your code nor the meaning of the names you gave to objects, but note that the first entry of the primes list is 4 (not a prime).