Macaulay2 Engine
Loading...
Searching...
No Matches
◆
subtract_multiple()
void subtract_multiple
(
int
&
result
,
int
a
,
int
b
)
Definition at line
41
of file
godboltTest.cpp
.
42
{
43
// we assume: a, b are NONZERO!!
44
// result -= a*b
45
int
ab = a + b;
46
if
(ab >
p1
) ab -=
p1
;
47
int
n =
exp_table
[
result
] -
exp_table
[ab];
48
if
(n < 0) n +=
p
;
49
result
=
log_table
[n];
50
}
exp_table
int exp_table[]
Definition
godboltTest.cpp:27
p
int p
Definition
godboltTest.cpp:36
log_table
int log_table[]
Definition
godboltTest.cpp:29
p1
int p1
Definition
godboltTest.cpp:35
result
VALGRIND_MAKE_MEM_DEFINED & result(result)
References
exp_table
,
log_table
,
p
,
p1
, and
result()
.
Macaulay2
e
godboltTest.cpp
Generated on
for Macaulay2 Engine by
1.15.0