| Home | Trees | Indices | Help |
|---|
|
|
object --+
|
structure.sage_object.SageObject --+
|
ANDescr
An AlgebraicNumber or AlgebraicReal is a wrapper around an ANDescr object. ANDescr is an abstract base class, which should never be directly instantiated; its concrete subclasses are ANRational, ANBinaryExpr, ANUnaryExpr, ANRootOfUnity, ANRoot, and ANExtensionElement. ANDescr and all of its subclasses are private, and should not be used directly.
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
Inherited from Inherited from |
|||
|
|||
|
Inherited from |
|||
|
|||
Returns True if self is an ANRational, ANRootOfUnity, or
ANExtensionElement.
EXAMPLES:
sage: from sage.rings.qqbar import ANRational
sage: ANRational(1/2).is_exact()
True
sage: QQbar(3+I)._descr.is_exact()
True
sage: QQbar.zeta(17)._descr.is_exact()
True
|
Checks whether this descriptor represents a value with the same
algebraic degree as the number field associated with the descriptor.
Returns \code{True} if self is an \class{ANRational},
\class{ANRootOfUnity}, or a minimal \class{ANExtensionElement}.
EXAMPLES:
sage: from sage.rings.qqbar import ANRational
sage: ANRational(1/2).is_simple()
True
sage: rt2 = AA(sqrt(2))
sage: rt3 = AA(sqrt(3))
sage: rt2b = rt3 + rt2 - rt3
sage: rt2.exactify()
sage: rt2._descr.is_simple()
True
sage: rt2b.exactify()
sage: rt2b._descr.is_simple()
False
sage: rt2b.simplify()
sage: rt2b._descr.is_simple()
True
|
Returns True if self is an ANRational object. (Note that
the constructors for ANExtensionElement and ANRootOfUnity
will actually return ANRational objects for rational numbers.)
EXAMPLES:
sage: from sage.rings.qqbar import ANRational
sage: ANRational(3/7).is_rational()
True
|
Returns True if self is an ANExtensionElement.
sage: from sage.rings.qqbar import ANExtensionElement, ANRoot, AlgebraicGenerator
sage: _.<y> = QQ['y']
sage: x = polygen(QQbar)
sage: nf2 = NumberField(y^2 - 2, name='a', check=False)
sage: root2 = ANRoot(x^2 - 2, RIF(1, 2))
sage: gen2 = AlgebraicGenerator(nf2, root2)
sage: sqrt2 = ANExtensionElement(gen2, nf2.gen())
sage: sqrt2.is_field_element()
True
|
| Home | Trees | Indices | Help |
|---|
| Generated by Epydoc 3.0beta1 on Thu Jul 17 04:23:58 2008 | http://epydoc.sourceforge.net |