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

◆ to_ring_elem()

void M2::ARingQQGMP::to_ring_elem ( ring_elem & result,
const ElementType & a ) const
inline

Definition at line 293 of file aring-qq-gmp.hpp.

294 {
295 mpq_ptr b = getmemstructtype(mpq_ptr);
296 mpq_init(b);
297 mpq_set(b, &a);
298 mpz_reallocate_limbs(mpq_numref(b));
299 mpz_reallocate_limbs(mpq_denref(b));
300 result = ring_elem(b);
301 }
void mpz_reallocate_limbs(mpz_ptr _z)
Definition gmp-util.h:46
VALGRIND_MAKE_MEM_DEFINED & result(result)
#define getmemstructtype(S)
Definition m2-mem.h:143

References getmemstructtype, mpz_reallocate_limbs(), and result().