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(4x^9 + 5x^8 + x^7 + x^6 + 6x^5 + 6x^4 + 5x^3 + 3x^2 + x + 2, GF(7)) In [7]: a * b * c Out[7]: Poly(4x^9 + 5x^8 + x^7 + x^6 + 6x^5 + 6x^4 + 5x^3 + 3x^2 + x + 2, GF(7))