Skip to content

Commit

Permalink
n - s -> negmod in nmod8/32 dot code (can be avoided, but quick fix f…
Browse files Browse the repository at this point in the history
…or assert failure)
  • Loading branch information
fredrik-johansson committed Aug 13, 2023
1 parent ea5900c commit dcd25c0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/gr/nmod32.c
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ _nmod32_vec_dot(nmod32_t res, const nmod32_t initial, int subtract, const nmod32
else
{
if (subtract)
s = (n - initial[0]);
s = n_negmod(initial[0], n);
else
s = initial[0];
}
Expand Down Expand Up @@ -353,7 +353,7 @@ _nmod32_vec_dot_rev(nmod32_t res, const nmod32_t initial, int subtract, const nm
else
{
if (subtract)
s = (n - initial[0]);
s = n_negmod(initial[0], n);
else
s = initial[0];
}
Expand Down
4 changes: 2 additions & 2 deletions src/gr/nmod8.c
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ _nmod8_vec_dot(nmod8_t res, const nmod8_t initial, int subtract, const nmod8_str
else
{
if (subtract)
s = (n - initial[0]);
s = n_negmod(initial[0], n);
else
s = initial[0];
}
Expand Down Expand Up @@ -370,7 +370,7 @@ _nmod8_vec_dot_rev(nmod8_t res, const nmod8_t initial, int subtract, const nmod8
else
{
if (subtract)
s = (n - initial[0]);
s = n_negmod(initial[0], n);
else
s = initial[0];
}
Expand Down

0 comments on commit dcd25c0

Please sign in to comment.