type/algebraic - Maple Programming Help

Home : Support : Online Help : Programming : Data Types : Type Checking : Types : type/algebraic

type/algebraic

check for an algebraic expression

 Calling Sequence type(expr, algebraic)

Parameters

 expr - expression

Description

 • This command returns true if expr is of type algebraic (algebraic), and false otherwise.
 • An expression is of type algebraic if its top level type is one of the following:

Examples

 > $\mathrm{type}\left(2,\mathrm{algebraic}\right)$
 ${\mathrm{true}}$ (1)
 > $\mathrm{type}\left(\frac{1}{2}\mathrm{sin}\left(1\right),\mathrm{algebraic}\right)$
 ${\mathrm{true}}$ (2)
 > $\mathrm{type}\left(a\left[0\right]+a\left[1\right]x,\mathrm{algebraic}\right)$
 ${\mathrm{true}}$ (3)
 > $\mathrm{type}\left(\left[1,2,3\right],\mathrm{algebraic}\right)$
 ${\mathrm{false}}$ (4)

Note that only the top level type is checked:

 > $\mathrm{type}\left(\left[1,2,3\right]\mathrm{sin}\left(x\right),\mathrm{algebraic}\right)$
 ${\mathrm{true}}$ (5)
 > $\mathrm{type}\left(2<3,\mathrm{algebraic}\right)$
 ${\mathrm{false}}$ (6)
 > $\mathrm{type}\left(\mathrm{series}\left(\mathrm{sin}\left(x\right),x=\mathrm{\pi }\right),\mathrm{algebraic}\right)$
 ${\mathrm{true}}$ (7)