Non-negative remainder of integers modulo m
r = gf_mod(x, m)
Matrix of integers, positive or negative, smaller than 2^53 in absolute value.
Modulus: a positive integer scalar.
Matrix of the same size as x, with entries in 0 .. m-1.
gf_mod(x, m) returns the remainder of each entry of x modulo m, always in 0 .. m-1. This is the representative in GF(p) of an integer when m = p, so it converts arbitrary integers to valid coefficients for the other functions of the toolbox.
Scilab's modulo keeps the sign of x for negative values; gf_mod gives the same result as pmodulo.
| Version | Description |
| 2.0.0 | Refactoring of the function/toolbox. |