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

◆ mult()

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

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

308 {
309 if (a != 0 && b != 0)
310 {
311 int c = a + b;
312 if (c > mGF.orderMinusOne()) c -= mGF.orderMinusOne();
313 result = c;
314 }
315 else
316 result = 0;
317 }
GaloisFieldTable mGF
VALGRIND_MAKE_MEM_DEFINED & result(result)

References mGF, and result().

Referenced by fromSmallIntegerCoefficients(), and subtract_multiple().