Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

RuntimeError: Use ** for exponentiation, not '^', which means xor in Python, and has the wrong precedence.

when running this code

x = PolynomialRing(ZZ.quo(N*ZZ), 'x').gen()
e = 3
f = (u1*x + u1*u1)^e - c1
g = (u2*x + u2*u2)^e - c2

I get the error: RuntimeError: Use ** for exponentiation, not '^', which means xor in Python, and has the wrong precedence.

I don't know what's wrong with it. Please help!