
min(+Number1, +Number2, ?Minimum)

   Unifies the minimum of Number1 and Number2 with Minimum.



Arguments
   +Number1            A number.
   +Number2            A number.
   ?Minimum            A variable or a number.

Type
   Arithmetic

Description
   This predicate is used by the ECLiPSe compiler to expand evaluable
   arithmetic expressions.  So the call to min(Number1, Number2, Minimum)
   is equivalent to

	Minimum is min(Number1, Number2)

    which should be preferred for portability.

   In coroutining mode, if Number1 or Number2 are free variables, the call
   to min/3 is delayed until these variables are instantiated.




Resatisfiable
      No

Fail Conditions
      Fails if the result of the evaluation does not unify with Minimum.



Exceptions
     4 --- Number1 or Number2 is not instantiated (non-coroutining mode    only).
     5 --- Result is of a different type than the evaluation result.
    24 --- Number1 or Number2 is not of a numeric type.
    24 --- Result is neither a number nor a variable.

Examples
   
Success:
      min(5, 2, 2).
      min(2_3, 3_4, 2_3).
      min(5.0 , 2.0, 2.0).
      min(5.0, 2, 2.0).         (The types are adjusted)
      min(5_0, 2, 2_0).         (The types are adjusted)
Fail:
      min(1, 2, 3).
Error:
      min(A, 2, 6).             (Error 4).
      min(1, 2, 2.0).           (Error 5).
      min(5, 2.0, 5).           (Error 5).
      min(4 - 2, 3, 3).         (Error 24).
      min(5, 2, r).             (Error 24).





See Also
   is / 2
