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

◆ gcd()

ring_elem RingZZ::gcd ( const ring_elem f,
const ring_elem g ) const

Definition at line 361 of file ZZ.cpp.

362{
363 mpz_ptr result = new_elem();
364 mpz_gcd(result, f.get_mpz(), g.get_mpz());
366 return ring_elem(result);
367}
mpz_ptr new_elem() const
Definition ZZ.cpp:34
void mpz_reallocate_limbs(mpz_ptr _z)
Definition gmp-util.h:46
VALGRIND_MAKE_MEM_DEFINED & result(result)
mpz_srcptr get_mpz() const
Definition ringelem.hpp:127

References ring_elem::get_mpz(), mpz_reallocate_limbs(), new_elem(), and result().

Referenced by syzygy(), and TEST().