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

◆ set_from_long()

void M2::ARingZZp::set_from_long ( elem & result,
long a ) const
inline

Definition at line 162 of file aring-zzp.hpp.

163 {
164 a = a % p;
165 if (a < 0) a += p;
166 result = log_table[a];
167 }
VALGRIND_MAKE_MEM_DEFINED & result(result)

References log_table, p, and result().

Referenced by fromStream< M2::ARingZZp >(), getElement< M2::ARingZZp >(), and TEST().