The math package: Types

type/irrational

checks for an irrational value.

> type(sqrt(2), irrational);
true

type/cmplx

checks for a complex value that is not a real value.
> type(sqrt(2), cmplx);
false
> type(sqrt(-1), cmplx);
true

type/elemental

checks whether an expression is of type realcons, type name or type string.
> type(sqrt(2), elemental);
true
> type(1/x, elemental);
false

type/mathfn

checks for a mathematical function.
> type(ln(x), mathfn);
true
> type(sqrt(x), function);
false
> type(sqrt(x), mathfn);
true

back

Author: Alexander F. Walz, alexander.f.walz@t-online.de
Original file location: http://www.math.utsa.edu/mirrors/maple/mplmtyp.htm