## `min` -- the minimum of numbers

#### Introduction

`min(`x1, x2, ...`)` returns the minimum of the numbers x1,x2,....

#### Call(s)

`min(x1, x2, ...)`

#### Parameters

`x1, x2, ...` | - | arbitrary MuPAD objects

#### Returns

one of the arguments, or a symbolic `min` call.

### Overloadable:

`x1`, `x2`, ``, `...`

#### Related Functions

`_leequal`, `_less`, `min`, `sysorder`

#### Details

- If the arguments of `min` are integers, rational numbers, or floating point numbers, then `min` returns the numerical minimum of these arguments.
- The call `min(``)` is illegal and leads to an error message. If there is only one argument `x1`, then `min` evaluates `x1` and returns it (see example 2).
- If one of the arguments is `-infinity`, then `min` returns `-infinity`. If an argument is `infinity`, then it is removed from the argument list (see example 3).
- `min` returns an error when one of its arguments is a complex number (see example 2).
- If one of the arguments is not a number, then a symbolic `min` call with the minimum of the numerical arguments and the remaining evaluated arguments is returned (see example 1).

  Nested `min` calls with symbolic arguments are rewritten as a single `min` call, i.e., they are flattened; see example 4.

- `min` does not react to properties of identifiers set via `assume`. Use `simplify` to handle this (see example 4).

- `min` is a function of the system kernel.

#### Example 1

`min` computes the minimum of integers, rational numbers, and floating point values:

    >> min(-3/2, 7, 1.4)

                                       -3/2

If the argument list contains symbolic expressions, then a symbolic `min` call is returned:

    >> delete b: min(-4, b + 2, 1, 3)

                                  min(b + 2, -4)

    >> min(sqrt(2), 1)

                                        1/2
                                   min(2   , 1)

Use `simplify` to simplify `min` expressions with constant symbolic arguments:

    >> simplify(%)

                                         1

#### Example 2

`min` with one argument returns the evaluated argument:

    >> delete a: min(a), min(sin(2*PI)), min(2)

                                      a, 0, 2

Complex numbers lead to an error message:

    >> min(0, 1, I)

          Error: Illegal argument [min]

#### Example 3

`-infinity` is always the minimum of arbitrary arguments:

    >> delete x: min(-100000000000, -infinity, x)

                                     -infinity

`infinity` is removed from the argument list:

    >> min(-100000000000, infinity, x)

                               min(x, -100000000000)

#### Example 4

`min` does not take into account properties of identifiers set via `assume`:

    >> delete a, b, c:
       assume(a > 0): assume(b > a, _and): assume(c > b, _and):
       min(a, min(b, c), 0)

                                  min(a, b, c, 0)

An application of `simplify` yields the desired result:

    >> simplify(%)

                                         0

#### Changes

- no changes

Do you have questions or comments?
Copyright © SciFace Software GmbH & Co. KG 2000