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