galois.prod¶
- galois.prod(*values)¶
Computes the product of the arguments.
- Parameters
- *values : int or galois.Poly
Each argument must be an integer or polynomial.
- Returns
The product of the arguments.
- Return type
int or galois.Poly
Examples
Compute the product of three integers.
In [1]: galois.prod(2, 4, 14) Out[1]: 112
Generate random polynomials over \(\mathrm{GF}(7)\).
In [2]: GF = galois.GF(7) In [3]: a = galois.Poly.Random(2, field=GF); a Out[3]: Poly(4x^2 + 2x + 1, GF(7)) In [4]: b = galois.Poly.Random(3, field=GF); b Out[4]: Poly(3x^3 + 6x^2 + 5x + 3, GF(7)) In [5]: c = galois.Poly.Random(4, field=GF); c Out[5]: Poly(2x^4 + 6x^3 + x^2 + 6x + 5, GF(7))
Compute the product of three polynomials.
In [6]: galois.prod(a, b, c) Out[6]: Poly(3x^9 + 6x^8 + 3x^7 + 4x^6 + 3x^5 + 5x^4 + x^3 + 6x^2 + 3x + 1, GF(7)) In [7]: a * b * c Out[7]: Poly(3x^9 + 6x^8 + 3x^7 + 4x^6 + 3x^5 + 5x^4 + x^3 + 6x^2 + 3x + 1, GF(7))
Last update:
Apr 03, 2022