parent, [x=False], [check=False], [is_gen=True], [construct=None]) |
complex_roots,
copy,
degree,
discriminant,
is_irreducible,
list,
quo_rem,
rescale,
resultant
Further documentation:
[flag=0]) |
Returns the complex roots of this polynomial.
INPUT: flag -- optional, and can be 0: (default), uses Schonhage's method modified by Gourdon, 1: uses a modified Newton method. OUTPUT: list of complex roots of this polynomial, counted with multiplicities.
NOTE: Calls the pari function polroots.
EXAMPLE: We compute the roots of the characteristic polynomial of some Salem numbers:
sage: R = PolynomialRing(QQ); x = R.gen() sage: f = 1 - x**2 - x**3 - x**4 + x**6 sage: f.complex_roots()[0] 0.713639173536900883414
) |
Return the degree of this polynomial. The zero polynomial has degree -1.
) |
sage: x = PolynomialRing(QQ).gen() sage: f = x**3 + 3*x - 17 sage: f.discriminant() -7911
) |
sage: x = PolynomialRing(QQ).gen() sage: f = x**3 + 3*x - '17/13' sage: f.list() [-17/13, 3, 0, 1]
right) |
Returns a tuple (quotient, remainder) where self = quotient*other + remainder.
a) |
Return f(a*X).
other) |
Returns the resultant of self and other, which must lie in the same polynomial ring.
INPUT: other -- a polynomial OUTPUT: an element of the base ring of the polynomial ring
NOTES: Implemented using pari's polresultant function.
sage: x = PolynomialRing(QQ).gen() sage: f = x**3 + x + 1; g = x**3 - x - 1 sage: f.resultant(g) -8
Instances of class Polynomial_rational_dense also have the following special functions:
__add__,
__getitem__,
__getslice__,
__mul__,
__pow__,
__reduce__,
__setitem__,
__sub__
Further documentation:
right) |
sage: x = PolynomialRing(QQ).gen() sage: (x - '2/3')*(x**2 - 8*x + 16) x^3 - 26/3*x^2 + 64/3*x - 32/3
See About this document... for information on suggesting changes.