Go to the first, previous, next, last section, table of contents.
- setmod_ff([prime|poly])
-
:: Sets/Gets the current base fields.
- return
-
number or polynomial
- prime
-
prime
- poly
-
univariate polynomial irreducible over GF(2)
-
If the argument is a non-negative integer prime, GF(prime)
is set as the current base field.
-
If the argument is a polynomial poly,
GF(2^deg(poly mod 2)) = GF(2)[t]/(poly(t) mod2)
is set as the current base field.
-
If no argument is specified, the modulus indicating the current base field
is returned. If the current base field is GF(prime), prime is
returned. If it is GF(2^n), the defining polynomial is returned.
-
Any irreducible univariate polynomial over GF(2) is available to
set GF(2^n). However the use of
defpoly_mod2()
is recommended
for efficiency.
[174] defpoly_mod2(100);
x^100+x^15+1
[175] setmod_ff(@@);
x^100+x^15+1
[176] setmod_ff();
x^100+x^15+1
- References
-
section
defpoly_mod2
Go to the first, previous, next, last section, table of contents.