Macaulay2 Engine
Loading...
Searching...
No Matches

◆ power() [2/2]

ring_elem SkewPolynomialRing::power ( const ring_elem f,
mpz_srcptr n ) const
virtual

Exponentiation. This is the default function, if a class doesn't define this.

Reimplemented from PolyRing.

Definition at line 98 of file skewpoly.cpp.

99{
100 std::pair<bool, int> n1 = RingZZ::get_si(n);
101 if (n1.first)
102 return power(f, n1.second);
103 else
104 throw exc::engine_error("exponent too large");
105}
static std::pair< bool, int > get_si(mpz_srcptr n)
Definition ZZ.cpp:46
virtual ring_elem power(const ring_elem f, mpz_srcptr n) const
Exponentiation. This is the default function, if a class doesn't define this.
Definition skewpoly.cpp:98

References RingZZ::get_si(), and power().

Referenced by power().