min
Entity: function

max
Entity: function


Usage:
R is min(X, Y)
R is max(X, Y)
 

Here X and Y have to be expressions which value is integer or float. The function min will return the value of X if it is smaller or equal to the value of Y otherwise it will return the value of Y . Analogous the function max will return the value of X if it is bigger or equal to the value of Y otherwise it will return the value of Y .

Example:

?- N is max(1,2+2), write(N), nl.