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

◆ divide()

void M2::ARingZZGMP::divide ( ElementType & result,
const ElementType & a,
const ElementType & b ) const
inline

exact division of integers.

Definition at line 203 of file aring-zz-gmp.hpp.

206 {
207 if (mpz_divisible_p(&a, &b))
208 {
209 mpz_divexact(&result, &a, &b);
210 }
211 else
212 {
213 throw exc::engine_error("division not exact");
214 }
215 }
VALGRIND_MAKE_MEM_DEFINED & result(result)

References result().

Referenced by syzygy().