|
|
| Expression | Result = eval(Expression) |
Signature | ISO |
| Variable | must be bound to a non-variable expression E.
The result is eval(E) |
IF ® IF | Y |
| integer number | this number |
I ® I | Y |
| floating point number | this number |
F ® F | Y |
| + E | eval(E) |
IF ® IF | N |
| - E | - eval(E) |
IF ® IF | Y |
| inc(E) | eval(E) + 1 |
IF ® IF | N |
| dec(E) | eval(E) - 1 |
IF ® IF | N |
| E1 + E2 | eval(E1) + eval(E2) |
IF, IF ® IF | Y |
| E1 - E2 | eval(E1) - eval(E2) |
IF, IF ® IF | Y |
| E1 * E2 | eval(E1) * eval(E2) |
IF, IF ® IF | Y |
| E1 / E2 | eval(E1) / eval(E2) |
IF, IF ® F | Y |
| E1 // E2 | rnd(eval(E1) /
eval(E2)) |
I, I ® I | Y |
| E1 rem E2 | eval(E1) -
(rnd(eval(E1) /
eval(E2))*eval(E2)) |
I, I ® I | Y |
| E1 mod E2 | eval(E1) - (
ëeval(E1) / eval(E2)û
*eval(E2)) |
I, I ® I | Y |
| E1 /\ E2 | eval(E1) bitwise_and
eval(E2) |
I, I ® I | Y |
| E1 \/ E2 | eval(E1) bitwise_or
eval(E2) |
I, I ® I | Y |
| E1 ^ E2 | eval(E1) bitwise_xor
eval(E2) |
I, I ® I | N |
| \ E | bitwise_not eval(E) |
I ® I | Y |
| E1 << E2 | eval(E1) integer_shift_left
eval(E2) |
I, I ® I | Y |
| E1 >> E2 | eval(E1) integer_shift_right
eval(E2) |
I, I ® I | Y |
| abs(E) | absolute value of eval(E) |
IF ® IF | Y |
| sign(E) | sign of eval(E) (-1 if < 0, 0 if = 0,
+1 if > 0) |
IF ® IF | Y |
| E1 ** E2 | eval(E1) raised to the power of
eval(E2) |
IF, IF ® F | Y |
| sqrt(E) | square root of eval(E) |
IF ® F | Y |
| atan(E) | arc tangent of eval(E) |
IF ® F | Y |
| cos(E) | cosine of eval(E) |
IF ® F | Y |
| sin(E) | sine of eval(E) |
IF ® F | Y |
| exp(E) | e raised to the power of eval(E) |
IF ® F | Y |
| log(E) | natural logarithms of eval(E) |
IF ® F | Y |
| float(E) | the floating point number equal to
eval(E) |
IF ® F | Y |
| ceiling(E) | rounds eval(E) upward to the
nearest integer |
F ® I | Y |
| floor(E) | rounds eval(E) downward to the
nearest integer |
F ® I | Y |
| round(E) | rounds eval(E) to the nearest integer |
F ® I | Y |
| truncate(E) | the integer value of eval(E) |
F ® I | Y |
| float_fractional_part(E) | the float equal to the fractional part
of eval(E) |
F ® F | Y |
| float_integer_part(E) | the float equal to the integer part of
eval(E) |
F ® F | Y |
| a sub-expression E is a variable | instantiation_error | ||
| a sub-expression E is neither a number nor an evaluable functor | type_error(evaluable, E) | ||
| a sub-expression E is a floating point number while an integer is expected | type_error(integer, E) | ||
| a sub-expression E is an integer while a floating point number is expected | type_error(float, E) | ||
| a division by zero occurs | evaluation_error(zero_divisor) | ||
|
|