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

◆ divide() [2/2]

void M2::ARingCCC::divide ( ElementType & res,
const ElementType & a,
const RealElementType & b ) const
inline

Definition at line 370 of file aring-CCC.hpp.

373 {
374 mpfr_t tmp;
375 Element result(*this);
376 mpfr_init2(tmp, get_precision());
377
378 mpfr_div(tmp, &a.re, &b, MPFR_RNDN);
379 mpfr_set(&result.value().re, tmp, MPFR_RNDN);
380
381 mpfr_div(tmp, &a.im, &b, MPFR_RNDN);
382 mpfr_set(&result.value().im, tmp, MPFR_RNDN);
383
384 set(res, result);
385 mpfr_clear(tmp);
386 }
unsigned long get_precision() const
Definition aring-CCC.hpp:88
void set(ElementType &result, const ElementType &a) const
VALGRIND_MAKE_MEM_DEFINED & result(result)

References get_precision(), cc_struct::im, cc_struct::re, result(), and set().

Referenced by syzygy(), and TEST().