Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
make pow(x,e,m) return an element with the same parent as x
Browse files Browse the repository at this point in the history
  • Loading branch information
yyyyx4 committed Jul 10, 2022
1 parent 843eb03 commit eae7a9a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/sage/rings/integer.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -2180,7 +2180,7 @@ cdef class Integer(sage.structure.element.EuclideanDomainElement):
"""
if modulus is not None:
from sage.rings.finite_rings.integer_mod import Mod
return Mod(left, modulus) ** right
return (Mod(left, modulus) ** right).lift()

if type(left) is type(right):
return (<Integer>left)._pow_(right)
Expand Down

0 comments on commit eae7a9a

Please sign in to comment.