projog

4.9. min - finds the minimum of two numbers.

Examples

?- X is min(5,5).
X = 5

yes

?- X is min(7,8).
X = 7

yes

?- X is min(3,2).
X = 2

yes

?- X is min(2.5,2.5).
X = 2.5

yes

?- X is min(2.75,2.5).
X = 2.5

yes

?- X is min(1,1.5).
X = 1

yes

?- X is min(2,1.5).
X = 1.5

yes

?- X is min(-3,2).
X = -3

yes

?- X is min(-3,-2).
X = -3

yes

?- X is min(-2.5,-2.25).
X = -2.5

yes

?- X is min(0,0).
X = 0

yes

?- X is min(0.0,0.0).
X = 0.0

yes

?- X is min(0,0.0).
X = 0.0

yes

?- X is min(0.0,0).
X = 0

yes