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