galois.prod(*values: int) int
galois.prod(*values: Poly) Poly

Computes the product of the arguments.

Parameters:
*values: int
*values: Poly

Each argument must be an integer or polynomial.

Returns:

The product of the arguments.

See also

gcd, egcd, lcm

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]: f1 = galois.Poly.Random(2, field=GF); f1
Out[3]: Poly(3x^2 + 5, GF(7))

In [4]: f2 = galois.Poly.Random(3, field=GF); f2
Out[4]: Poly(4x^3 + 5x^2 + 6x + 5, GF(7))

In [5]: f3 = galois.Poly.Random(4, field=GF); f3
Out[5]: Poly(2x^4 + 3x^3 + 3x^2 + x + 1, GF(7))

Compute the product of three polynomials.

In [6]: galois.prod(f1, f2, f3)
Out[6]: Poly(3x^9 + 3x^8 + 3x^7 + 6x^6 + 6x^5 + 5x^4 + 5x^3 + 5x^2 + 6x + 4, GF(7))

In [7]: f1 * f2 * f3
Out[7]: Poly(3x^9 + 3x^8 + 3x^7 + 6x^6 + 6x^5 + 5x^4 + 5x^3 + 5x^2 + 6x + 4, GF(7))