Skip to content

Commit 7baecc8

Browse files
committed
Use int(characteristic) for PyPy
PyPy cannot handle 3-arg pow if the first two types don't know about the third like pow(int, int, fmpz).
1 parent ed6694f commit 7baecc8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/flint/test/test_all.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2935,7 +2935,7 @@ def setbad(obj, i, val):
29352935
assert x.pow_mod(4, x**2 + 1) == 1
29362936

29372937
assert x.pow_mod(2**127, x - 1) == 1
2938-
assert (1 + x).pow_mod(2**127, x - 1) == pow(2, 2**127, characteristic)
2938+
assert (1 + x).pow_mod(2**127, x - 1) == pow(2, 2**127, int(characteristic))
29392939

29402940
if type(x) is not flint.fq_default_poly:
29412941
assert (1 + x).pow_mod(2**127, x - 1, S(1)/2) == pow(2, 2**127, characteristic)

0 commit comments

Comments
 (0)