PrologJ recognizes 17 unary and 12 binary arithmetic functions / operations
in arithmetic expressions, such as those appearing in arguments of
is/2 or the various arithmetic comparison predicates. Though
some represent ISO additions to the list of permitted operations, all are
considered part of the core and are always available in PrologJ. All are
documented in [ Deransart, Ed-Dbali, and Cervoni 1996 ] chapter 6.
Unary Operations
absatan\ceilingcosexpfloatfloat_fractional_partfloat_integer_partfloorlog-roundsignsinsqrttruncateBinary Operations
+/\<<\/>>/ (See Note 1)//**mod*rem-Notes
'/'/2 represents integer division. Thus, for example,
in traditional Prolog 2 / 5 evaluates as 2. In ISO Prolog,
'/'/2 represents real division, and a separate operator
('//'/2) is used for integer division. Thus, for example,
in ISO Prolog 2 / 5 evaluates as 2.5, while
2 // 5 evaluates as 2.
operator_single_slash. When the value of this flag is
real, the operator is interpreted as meaning real division, as
in the ISO standard. When the value of this flag is either,
the operator is interpreted as meaning integer division if both operands
are integers, else as meaning real division. (This is compatible with
traditional Prolog, since traditional Prolog only supports integers.)
The initial value of this flag is set to either if
the -f[lags] t option is specified at system startup; else
if is initialized to real. However, it can be changed
at any time by using set_prolog_flag/2.