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 0dac5c1 commit 21ce8b6Copy full SHA for 21ce8b6
src/sage/rings/integer.pyx
@@ -2852,12 +2852,12 @@ cdef class Integer(sage.structure.element.EuclideanDomainElement):
2852
except (ValueError, TypeError):
2853
pass
2854
2855
- if isinstance(m, Integer) and isinstance(self, Integer):
+ if isinstance(m, Integer):
2856
elog = self.exact_log(m)
2857
if elog == -sage.rings.infinity.infinity or m**elog == self:
2858
return elog
2859
2860
- if (isinstance(m, Rational) and isinstance(self, Integer)
+ if (isinstance(m, Rational):
2861
and m.numer() == 1):
2862
elog = -self.exact_log(m.denom())
2863
if m**elog == self:
0 commit comments