Exponentiation. This is the default function, if a class doesn't define this.
Reimplemented from Ring.
Definition at line 570 of file localring.cpp.
571{
573 ring_elem top, bottom;
574 if (mpz_sgn(n) >= 0)
575 {
578
580 }
581 else
582 {
583 mpz_t negative_n;
584 mpz_init(negative_n);
585 mpz_neg(negative_n, n);
587 {
588 throw exc::engine_error("attempt to divide by a non-unit");
589 }
592 mpz_clear(negative_n);
593
595 }
596 return ring_elem(
make_elem(top, bottom));
597}
ring_elem set_non_unit_frac(ring_elem top) const
local_elem * make_elem(ring_elem a, ring_elem b) const
virtual bool is_unit(const ring_elem f) const
const local_elem * get_local_elem() const
References local_elem::denom, ring_elem::get_local_elem(), is_unit(), make_elem(), mRing, local_elem::numer, and set_non_unit_frac().