nzmath.polynomial | (ÆüËܸì)
The class is for polynomials with one variable.
coefficient must be a OneVariablePolynomialCoefficients object. variable must be a string, a list, or a tuple. coeffring must be a ring object implementing ring.Ring.
Ordinarily OneVariableDensePolynomial or OneVariableSparsePolynomial are used as a factory method to construct a OneVariablePolynomial object.
Return the content of the polynomial.
Return a copy of the polynomial.
Return the degree of the polynomial.
Return the derivative of the polynomial by variable var.
Return a coefficient ring of the polynomial.
Return a ring, to which the polynomial belongs.
Return the name string of the variable of the polynomial.
Return a list consists of the variable of the polynomial. The length of the list is always one.
Integrate by variable var.
Return definite integral of the polynomial from min to max when min and max are specified, otherwise indefinite integral.
(deleted in 0.5.0)
Return the leading coefficient of the polynomial.
Return the primitive part of the polynomial.
Return a conversion to MultiVariableSparsePolynomial.
This method remains for backward compatibility, and does nothing but same as unary +.
This method remains for backward compatibility, and does nothing but same as unary +.
operator | explanation |
f + g | Return the sum of polynomials f and g. |
f - g | Return the difference of polynomials f and g. |
f * g | Return the product of polynomials f and g. |
divmod(f,g) | Return the tuple of quotient and remainder resulting by dividing f by g. |
f / g | Return the ratio of f and g. The result can be a rational function. |
f // g | Return the quotient of f by g. |
f % g | Return the remainder of f by g. |
f ** i | Return f power to i. |
-f | Return the polynomial whose coefficients have inverted signs of f. |
+f | Return the same polynomial with f. Simplification is carried out if possible. |
f == g | Return whether f and g are equal or not. |
f != g | Return whether f and g are different or not. |
f[n] | Return the coefficient of degree n term of f. |
f[n] = c | Replace the coefficient of the degree n term of the polynomial f by c. |
repr(f) | Return the repr string of the polynomial f |
str(f) | Return the str string of the polynomial f. |
f(c) | Return the value of f substituting c. |