| Home | Trees | Indices | Help |
|---|
|
|
object --+
|
structure.sage_object.SageObject --+
|
AlgebraicPolynomialTracker
Keeps track of a polynomial used for algebraic numbers.
If multiple algebraic numbers are created as roots of a single
polynomial, this allows the polynomial and information about
the polynomial to be shared. This reduces work if the polynomial
must be recomputed at higher precision, or if it must be factored.
This class is private, and should only be constructed by
AA.common_polynomial() or QQbar.common_polynomial(), and should
only be used as an argument to AA.polynomial_root() or
QQbar.polynomial_root(). (It doesn't matter whether you create
the common polynomial with AA.common_polynomial() or
QQbar.common_polynomial().)
EXAMPLES:
sage: x = polygen(QQbar)
sage: P = QQbar.common_polynomial(x^2 - x - 1)
sage: P
x^2 + (-1)*x - 1
sage: QQbar.polynomial_root(P, RIF(1, 2))
[1.6180339887498946 .. 1.6180339887498950]
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
Inherited from Inherited from |
|||
|
|||
|
Inherited from |
|||
|
|||
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
|
Add customized pickling support.
EXAMPLES:
sage: x = polygen(QQ)
sage: v = (x^2 - x - 1).roots(ring=AA, multiplicities=False)[1]
sage: type(v._descr._poly)
<class 'sage.rings.qqbar.AlgebraicPolynomialTracker'>
sage: loads(dumps(v)) == v
True
|
EXAMPLES:
sage: x = polygen(ZZ)
sage: cp = AA.common_polynomial(x^4 - 2)
sage: cp.complex_roots(30, 1)
[[1.1892071150027208 .. 1.1892071150027213], [-1.1892071150027213 .. -1.18920711500272...], [1.18920711500272... .. 1.1892071150027213]*I, [-1.1892071150027213 .. -1.1892071150027208]*I]
|
Compute a common field that holds all of the algebraic coefficients of this polynomial, then factor the polynomial over that field. Store the factors for later use (ignoring multiplicity). |
| Home | Trees | Indices | Help |
|---|
| Generated by Epydoc 3.0beta1 on Thu Jul 17 04:23:58 2008 | http://epydoc.sourceforge.net |