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

◆ power_mpz()

void M2::ARingCC::power_mpz ( ElementType & result,
const ElementType & a,
mpz_srcptr n ) const
inline

Definition at line 390 of file aring-CC.hpp.

391 {
392 std::pair<bool, int> n1 = RingZZ::get_si(n);
393 if (n1.first)
394 power(result, a, n1.second);
395 else
396 throw exc::engine_error("exponent too large");
397 }
void power(ElementType &result, const ElementType &a, int n) const
Definition aring-CC.hpp:361
static std::pair< bool, int > get_si(mpz_srcptr n)
Definition ZZ.cpp:46
VALGRIND_MAKE_MEM_DEFINED & result(result)

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

Referenced by TEST().