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

◆ divide()

void M2::ARingGFM2::divide ( elem & result,
elem a,
elem b ) const
inline

Definition at line 319 of file aring-m2-gf.hpp.

320 {
321 if (b == 0)
322 throw exc::division_by_zero_error();
323 if (a != 0)
324 {
325 int c = a - b;
326 if (c <= 0) c += mGF.orderMinusOne();
327 result = c;
328 }
329 else
330 result = 0;
331 }
GaloisFieldTable mGF
VALGRIND_MAKE_MEM_DEFINED & result(result)

References mGF, and result().

Referenced by set_from_mpq(), and syzygy().