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

◆ negate()

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

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

244 {
245 if (a != 0)
246 result = modulus_add(a, mGF.minusOne(), mGF.orderMinusOne());
247 else
248 result = 0;
249 }
GaloisFieldTable mGF
static int modulus_add(int a, int b, int p)
Arithmetic functions ///////.
VALGRIND_MAKE_MEM_DEFINED & result(result)

References mGF, modulus_add(), and result().

Referenced by syzygy().