We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0fd5967 commit bfc5cdfCopy full SHA for bfc5cdf
src/sage/rings/finite_rings/integer_mod.pyx
@@ -108,7 +108,6 @@ from sage.structure.parent cimport Parent
108
109
from sage.arith.misc import CRT as crt
110
from sage.arith.functions import lcm
111
-from sage.groups.generic import discrete_log
112
113
114
cdef Integer one_Z = Integer(1)
@@ -781,6 +780,7 @@ cdef class IntegerMod_abstract(FiniteRingElement):
781
780
782
if p == 2 and e >= 3: # (ZZ/2^e)* is not cyclic; must not give unsolvable DLPs to Pari
783
try:
+ from sage.groups.generic import discrete_log
784
v = discrete_log(a_red, b_red, nb)
785
except ValueError:
786
raise ValueError(f"no logarithm of {self} found to base {b} modulo {self.modulus()}"
0 commit comments