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(3x^2 + 5x + 3, GF(7)) In [4]: b = galois.Poly.Random(3, field=GF); b Out[4]: Poly(5x^3 + 2x + 2, GF(7)) In [5]: c = galois.Poly.Random(4, field=GF); c Out[5]: Poly(2x^4 + 3x^2 + x, GF(7))
Compute the product of three polynomials.
In [6]: galois.prod(a, b, c) Out[6]: Poly(2x^9 + x^8 + 3x^7 + 3x^6 + x^5 + 4x^4 + x^3 + 6x^2 + 6x, GF(7)) In [7]: a * b * c Out[7]: Poly(2x^9 + x^8 + 3x^7 + 3x^6 + x^5 + 4x^4 + x^3 + 6x^2 + 6x, GF(7))
Last update:
Feb 09, 2022