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

◆ divide()

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

Definition at line 324 of file aring-gf-flint.hpp.

327 {
328 // We need to handle the case when result is a, or b.
329 // This is why we use the temporary value 'c'.
330 ElementType c;
331 init(c);
332#if 0
333 printf("entering divide\n");
334 printf(" a = ");
335 fq_zech_print_pretty(&a, mContext);
336 printf("\n b = ");
337 fq_zech_print_pretty(&b, mContext);
338#endif
339 invert(c, b);
340#if 0
341 printf("\n 1/b = ");
342 fq_zech_print_pretty(&c, mContext);
343#endif
344 mult(result, c, a);
345#if 0
346 printf("\n a/b = ");
347 fq_zech_print_pretty(&result, mContext);
348 printf("\n");
349#endif
350 clear(c);
351 }
fq_zech_struct ElementType
void init(ElementType &result) const
void mult(ElementType &result, const ElementType &a, const ElementType &b) const
void clear(ElementType &result) const
fq_zech_ctx_t mContext
void invert(ElementType &result, const ElementType &a) const
VALGRIND_MAKE_MEM_DEFINED & result(result)

References clear(), init(), invert(), mContext, mult(), and result().

Referenced by set_from_mpq(), and syzygy().