Exponentiation. This is the default function, if a class doesn't define this.
Reimplemented from Ring.
Definition at line 397 of file GF.cpp.
398{
400 {
403 if (m <= 0) m +=
Q1_;
404 return ring_elem(m);
405 }
406 else
407 {
408 if (mpz_sgn(n) == 0)
409 return ring_elem(
_ONE);
410 else if (mpz_sgn(n) > 0)
411 return ring_elem(
_ZERO);
412 else
413 throw exc::division_by_zero_error();
414 }
415}
static unsigned int mod_ui(mpz_srcptr n, unsigned int p)
const mpreal exp(const mpreal &x, mp_rnd_t r=mpreal::get_default_rnd())
References _ONE, _ZERO, ring_elem::get_int(), RingZZ::mod_ui(), and Q1_.
Referenced by promote().