Indeed, there is something wrong with the error handling of exponents
{{{
sage: a = 2 ** (2**63)
Traceback (most recent call last):
...
.../sage/rings/integer.pyx in sage.rings.integer.Integer._pow_
2229 r = smallInteger(1)
2230 else:
-> 2231 raise OverflowError(f"exponent must be at most {LONG_MAX}")
2232 if mpz_sgn(exp) >= 0:
2233 return r
OverflowError: exponent must be at most 9223372036854775807
}}}
but
{{{
sage: a = 2 ** (2**62)
Traceback (most recent call last):
...
.../sage/rings/integer.pyx in sage.rings.integer.Integer.__pow__
2149
2150 if type(left) is type(right):
-> 2151 return (<Integer>left)._pow_(right)
2152 elif isinstance(left, Element):
2153 return coercion_model.bin_op(left, right, operator.pow)
.../sage/rings/integer.pyx in sage.rings.integer.Integer._pow_
2213
2214 if mpz_fits_slong_p(exp):
-> 2215 return self._pow_long(mpz_get_si(exp))
2216
2217 # Raising to an exponent which doesn't fit in a long overflows
.../sage/rings/integer.pyx in sage.rings.integer.Integer._pow_long
2245 if n > 0:
2246 x = PY_NEW(Integer)
-> 2247 sig_on()
2248 mpz_pow_ui(x.value, self.value, n)
2249 sig_off()
RuntimeError: Aborted
> --
> You received this message because you are subscribed to the Google Groups "sage-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
sage-devel+...@googlegroups.com.
> To view this discussion on the web visit
https://groups.google.com/d/msgid/sage-devel/CAGUWgD_Un568rw_RfAUmS3YaGiwV4sGh49oVsUkGEC3gvbV1rA%40mail.gmail.com.