verify/interval - Maple Programming Help

Home : Support : Online Help : Programming : Logic : Boolean : verify : verify/interval

verify/interval

verify that the first argument is a point in the interval

 Calling Sequence verify(expr1, expr2, interval(character))

Parameters

 expr1 - anything, assumed to be of type algebraic expr2 - anything, assumed to be of type range(algebraic) character - (optional) description of the character of the interval

Description

 • An interval is either an open, closed, or semi-open contiguous subset of the real line.
 • The verify(expr1, expr2, interval(character)) calling sequence returns true if it can determine that the point expr1 is located in the interval defined by the second argument.
 • The options available for describing the character of the interval are: open..open, closed..closed, open..closed, and closed..open.  The abbreviations open and closed are equivalent to open..open and closed..closed, respectively.
 • This verification is a short form for calling the appropriate forms of the verifications greater_than, greater_equal, less_than, and less_equal.
 • This verification is not symmetric.
 • If expr1 is not of type algebraic or expr2 is not of type range(algebraic), then false is returned.

Examples

 > $\mathrm{verify}\left(\mathrm{π},3..4,'\mathrm{interval}'\right)$
 ${\mathrm{true}}$ (1)
 > $\mathrm{verify}\left(\mathrm{π},\mathrm{π}..4,'\mathrm{interval}'\right)$
 ${\mathrm{false}}$ (2)
 > $\mathrm{verify}\left(\mathrm{π},\mathrm{π}..4,'\mathrm{interval}'\left('\mathrm{closed}'\right)\right)$
 ${\mathrm{true}}$ (3)
 > $\mathrm{verify}\left(\left[4,4\right],\left[3..5,4..5\right],'\left[\mathrm{interval},\mathrm{interval}\right]'\right)$
 ${\mathrm{false}}$ (4)
 > $\mathrm{verify}\left(\left[a,b\right],\left[3..5,4..5\right],'\left[\mathrm{interval},\mathrm{interval}\right]'\right)$
 ${\mathrm{FAIL}}$ (5)
 > $\mathrm{verify}\left(\left[a,b\right],\left[3..5,4..5\right],'\mathrm{truefalse}\left(\left[\mathrm{interval},\mathrm{interval}\right]\right)'\right)$
 ${\mathrm{false}}$ (6)
 > $\mathrm{verify}\left(\mathrm{Vector}\left(\left[ⅇ,{ⅇ}^{2}\right]\right),\mathrm{Vector}\left(\left[2..5,4..12\right]\right),'\mathrm{truefalse}\left(\mathrm{Vector}\left(\mathrm{interval}\right)\right)'\right)$
 ${\mathrm{true}}$ (7)

Given a list of coordinates, the following selects all those that fall in the interval $0.05..0.15$.

 > $\mathrm{select}\left('\mathrm{verify}',\left[\left[0.,0.\right],\left[0.065391,0.065345\right],\left[0.12229,0.12198\right],\left[0.18627,0.18520\right]\right],\left[0.05..0.15,'\mathrm{dummy}'\right],'\left[\mathrm{interval},\mathrm{true}\right]'\right)$
 $\left[\left[{0.065391}{,}{0.065345}\right]{,}\left[{0.12229}{,}{0.12198}\right]\right]$ (8)