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

◆ divide()

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

Definition at line 342 of file aring-gf-flint-big.hpp.

345 {
346 // We need to handle the case when result is a, or b.
347 // This is why we use the temporary value 'c'.
348 ElementType c;
349 init(c);
350#if 0
351 printf("entering divide\n");
352 printf(" a = ");
353 fq_nmod_print_pretty(&a, mContext);
354 printf("\n b = ");
355 fq_nmod_print_pretty(&b, mContext);
356#endif
357 invert(c, b);
358#if 0
359 printf("\n 1/b = ");
360 fq_nmod_print_pretty(&c, mContext);
361#endif
362 mult(result, c, a);
363#if 0
364 printf("\n a/b = ");
365 fq_nmod_print_pretty(&result, mContext);
366 printf("\n");
367#endif
368 clear(c);
369 }
void clear(ElementType &result) const
void invert(ElementType &result, const ElementType &a) const
void init(ElementType &result) const
void mult(ElementType &result, const ElementType &a, const ElementType &b) const
VALGRIND_MAKE_MEM_DEFINED & result(result)

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

Referenced by set_from_mpq(), and syzygy().