## Name:

min determines which of given constant expressions has minimum value

## Usage:

min(expr1,expr2,...,exprn) : (constant, constant, ..., constant) -> constant min(l) : list -> constant

## Parameters:

• expr are constant expressions.
• l is a list of constant expressions.

## Description:

• min determines which of a given set of constant expressions expr has minimum value. To do so, min tries to increase the precision used for evaluation until it can decide the ordering or some maximum precision is reached. In the latter case, a warning is printed indicating that there might actually be another expression that has a lesser value.
• Even though min determines the minimum expression by evaluation, it returns the expression that is minimum as is, i.e. as an expression tree that might be evaluated to any accuracy afterwards.
• min can be given either an arbitrary number of constant expressions in argument or a list of constant expressions. The list however must not be end-elliptic.
• Users should be aware that the behavior of min follows the IEEE 754-2008 standard with respect to NaNs. In particular, a NaN given as the first argument will not be promoted as a result unless the other argument is a NaN. This means that NaNs may seem to disappear during computations.

## Example 1:

> min(1,2,3,exp(5),log(0.25));
-1.3862943611198906188344642429163531361510002687205
> min(17);
17

## Example 2:

> l = [|1,2,3,exp(5),log(0.25)|];
> min(l);
-1.3862943611198906188344642429163531361510002687205

## Example 3:

> print(min(exp(17),sin(62)));
sin(62)

## Example 4:

> verbosity = 1!;
> print(min(17 + log2(13)/log2(9),17 + log(13)/log(9)));
Warning: minimum computation relies on floating-point result that is faithfully evaluated and different faithful roundings toggle the result.
17 + log(13) / log(9)
See also: max, ==, !=, >=, >, <, <=, in, inf, sup
Go back to the list of commands