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 + 3x, GF(7))

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

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

Compute the product of three polynomials.

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

In [7]: a * b * c
Out[7]: Poly(6x^9 + x^8 + x^7 + 6x^6 + 5x^5 + 3x^4 + 3x^3 + 5x^2, GF(7))

Last update: Apr 03, 2022