coeffInterface, coeff='0') |
coeffInterface
:
coeff
: The class Coeff contains the following methods:
) |
) |
) |
) |
coeff) |
The coefficients must have the same interface.
par, deg=1) |
The class Coeff can be an argument of the following functions:
coeff) |
The Python command print works similarly.
+, -, *, / ( |
coeff1, coeff2) |
The coefficients must have the same interface.
- ( |
coeff) |
+=, -=, *=, /= ( |
coeff1, coeff2) |
The coefficients must have the same interface.
A coefficient can be also used in logical expressions. Zero coefficient yields False in logical expressions, and other coefficients yield True.
A small illustrative program of manipulation with coefficients:
import ginv st = ginv.SystemType("Polynomial") ic = ginv.CoeffInterface("GmpZ", st) print ic.type() print ginv.Coeff(ic, "12221965").gcd(ginv.Coeff(ic, "196196196")) print ginv.Coeff(ic, "121965") + ginv.Coeff(ic, "196196196")
GmpZ 7 196318161