Availability:Arithmetic function (see is/2)
cmpr(+Expr1,
+Expr2)Exactly compares the values Expr1 and Expr2 and
returns -1 if Expr1 < Expr2, 0 if they are
equal, and 1 if
Expr1 > Expr2. Evaluates to NaN if either or
both
Expr1 and Expr2 are NaN and the Prolog flag
float_undefined
is set to nan
. See also
minr/2 amd maxr/2.
This function relates to the Prolog numerical comparison predicates
>/2, =:=/2,
etc. The Prolog numerical comparison converts the rational in a mixed
rational/float comparison to a float, possibly rounding the value. This
function converts the float to a rational, comparing the exact values.