type/realalgnum - Maple Help

type/realalgnum

check for an object of type realalgnum (real algebraic number)

 Calling Sequence type(x, realalgnum)

Parameters

 x - any expression

Description

 • The type realalgnum forms a representation of real algebraic numbers.
 • The type( x, 'realalgnum' ) function returns $\mathrm{true}$ if one of the following holds:
 – x is rational,
 – x is of the form RootOf( p, c .. d ) where $c\le d$ are rational numbers isolating a root of p, and p is a non-linear univariate polynomial in _Z with coefficients of type realalgnum, or
 – x is a sum, product, or quotient of expressions of type realalgnum.
 • The type realalgnum is defined and used in the RootFinding and QuantifierElimination packages.

Subtypes

 •

Supertypes

 •

Examples

 > $\mathrm{with}\left(\mathrm{RootFinding}\right):$
 > $\mathrm{type}\left(\frac{1}{2},'\mathrm{realalgnum}'\right)$
 ${\mathrm{true}}$ (1)
 > $\mathrm{type}\left(\mathrm{RootOf}\left({\mathrm{_Z}}^{2}-2,1..2\right),'\mathrm{realalgnum}'\right)$
 ${\mathrm{true}}$ (2)
 > $\mathrm{type}\left(\mathrm{RootOf}\left({\mathrm{_Z}}^{2}-5\mathrm{RootOf}\left({\mathrm{_Z}}^{3}-9,2..3\right),3..4\right),'\mathrm{realalgnum}'\right)$
 ${\mathrm{true}}$ (3)
 > $\mathrm{type}\left(\frac{\mathrm{RootOf}\left({\mathrm{_Z}}^{2}-2,1..2\right)}{\mathrm{RootOf}\left({\mathrm{_Z}}^{2}-3,1..2\right)},'\mathrm{realalgnum}'\right)$
 ${\mathrm{true}}$ (4)
 > $\mathrm{type}\left(\mathrm{RootOf}\left({\mathrm{_Z}}^{2}-2,1..2\right)+\mathrm{RootOf}\left({\mathrm{_Z}}^{2}-3,1..2\right)\mathrm{RootOf}\left({\mathrm{_Z}}^{3}-2,1..2\right),'\mathrm{realalgnum}'\right)$
 ${\mathrm{true}}$ (5)
 > $\mathrm{type}\left(1.34,'\mathrm{realalgnum}'\right)$
 ${\mathrm{false}}$ (6)
 > $\mathrm{type}\left(\mathrm{∞},'\mathrm{realalgnum}'\right)$
 ${\mathrm{false}}$ (7)
 > $\mathrm{type}\left(1+I,'\mathrm{realalgnum}'\right)$
 ${\mathrm{false}}$ (8)
 > $\mathrm{type}\left(x,'\mathrm{realalgnum}'\right)$
 ${\mathrm{false}}$ (9)

The only RootOf selector accepted is a range of rational numbers:

 > $\mathrm{type}\left(\mathrm{RootOf}\left({\mathrm{_Z}}^{2}-2\right),'\mathrm{realalgnum}'\right)$
 ${\mathrm{false}}$ (10)
 > $\mathrm{type}\left(\mathrm{RootOf}\left({\mathrm{_Z}}^{2}-y,\mathrm{index}={\mathrm{real}}_{1}\right),'\mathrm{realalgnum}'\right)$
 ${\mathrm{false}}$ (11)
 > $\mathrm{type}\left(\mathrm{RootOf}\left({\mathrm{_Z}}^{2}-2,2\right),'\mathrm{realalgnum}'\right)$
 ${\mathrm{false}}$ (12)
 > $\mathrm{type}\left(\mathrm{RootOf}\left({\mathrm{_Z}}^{2}-2,\mathrm{index}=1\right),'\mathrm{realalgnum}'\right)$
 ${\mathrm{false}}$ (13)
 > $\mathrm{type}\left(\mathrm{RootOf}\left({\mathrm{_Z}}^{2}-2,1.1..2.3\right),'\mathrm{realalgnum}'\right)$
 ${\mathrm{false}}$ (14)

Non-rational (sub-)expressions are not accepted:

 > $\mathrm{type}\left(\mathrm{RootOf}\left({\mathrm{_Z}}^{\frac{2}{3}}-2,1..2\right),'\mathrm{realalgnum}'\right)$
 ${\mathrm{false}}$ (15)
 > $\mathrm{type}\left({\mathrm{RootOf}\left({\mathrm{_Z}}^{2}-2,1..2\right)}^{\frac{1}{3}},'\mathrm{realalgnum}'\right)$
 ${\mathrm{false}}$ (16)