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

◆ power() [2/2]

template<class RingType>
virtual ring_elem M2::ConcreteRing< RingType >::power ( const ring_elem f,
mpz_srcptr n ) const
inlinevirtual

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

Reimplemented from Ring.

Definition at line 368 of file aring-glue.hpp.

369 {
370 if (displayArithmeticCalls) fprintf(stderr, "calling power mpz\n");
371 const ElementType &a = R->from_ring_elem_const(f);
372 Element b(*R);
374 R->power_mpz(b, a, n);
375 R->to_ring_elem(result, b);
376 return result;
377 }
RingType::ElementType ElementType
std::unique_ptr< RingType > R
RingType::Element Element

Referenced by TEST(), and TEST().