The following arithmetic functions are predefined in PrologJ. A function will
be evaluated if it occurs on the right hand side of is/2
or on
either side of the arithmetic comparison operations (=:=
,
=\=
, >
, >=
, <
or
=<
).
Name | Description |
abs | Absolute value. |
atan | Trignometric arctangent. |
\ | Bitwise logical complement for integers. |
ceiling | Arithmetic ceiling. Result always an integer. |
cos | Trignometric cosine. |
exp | Arithmetic exponential. |
float | Convert to a real. |
float_fractional_part | Fractional part of a real number. |
float_integer_part | Integer part of a real number - but still a real. |
floor | Arithmetic floor. Result always an integer. |
log | Natural logarithm. |
- | Arithmetic negation. |
round | Round to the nearest integer. |
sign | Arithmetic signum - result always -1, 0, or 1. |
sin | Trignometric sine. |
sqrt | Arithmetic square root. Result always real. |
truncate | Truncate to integer. |