Up | Next | Tail |
The declaration REALVALUED may be used to restrict variables to the real numbers. The syntax is:
For such variables the operator IMPART gives the result zero. Thus, with
the expression impart(x+sin(y)) is evaluated as zero. You may also declare an operator as real valued with the meaning, that this operator maps real arguments always to real values. Example:
Such declarations are not needed for the standard elementary functions.
To remove the propery from a variable or an operator use the declaration NOTREALVALUED with the syntax:
The boolean operator REALVALUEDP allows you to check if a variable, an operator, or an operator expression is known as real valued. Thus,
would print first yes and then no. For general expressions test the impart for checking the value range:
Up | Next | Front |