type/Range - Maple Programming Help

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

type/Range

expressions in a defined range

 Calling Sequence type( expr, Range( a, b ) )

Parameters

 expr - any expression a, b - real numbers or a real infinity

Description

 • The function call type(c, Range(a, b)) returns true if $a and $c. That is, the type Range( a, b ) represents the open interval (a,b) of the real line.
 • The endpoints a and b of the interval must be real constants, or the left endpoint a may be of type neg_infinity and the right endpoint b may be of type pos_infinity.
 • Note that neither a nor b is of type Range( a, b ).

Examples

 > $\mathrm{type}\left(3,'\mathrm{Range}'\left(0,4\right)\right)$
 ${\mathrm{true}}$ (1)
 > $\mathrm{type}\left(\frac{\mathrm{\pi }}{3},'\mathrm{Range}'\left(\frac{\mathrm{\pi }}{4},\frac{\mathrm{\pi }}{2}\right)\right)$
 ${\mathrm{true}}$ (2)
 > $\mathrm{type}\left(I,'\mathrm{Range}'\left(-\mathrm{\infty },Float\left(\mathrm{\infty }\right)\right)\right)$
 ${\mathrm{false}}$ (3)
 > $\mathrm{type}\left(5,'\mathrm{Range}'\left(0,5\right)\right)$
 ${\mathrm{false}}$ (4)