| Description: | Returns the minimum value of the arguments. | ||
| Class: | Elemental function | ||
| Arguments: | A1, A2, and A3 (opt) must all have the same type (integer or real) and kind parameters. | ||
| Results: | For
MIN0, AMIN1, DMIN1, QMIN1, IMIN0, JMIN0, and
KMIN0, the result type is the same as the arguments. For
MIN1, IMIN1, JMIN1, and KMIN1, the result
type is integer. For AMIN0, AIMIN0, AJMIN0, and
AKMIN0, the result type is real. The value of the result is
that of the smallest argument.
The setting of compiler options specifying integer size can affect MIN1. | ||
| Specific Name[1] | Argument Type | Result Type |
|---|---|---|
| INTEGER(1) | INTEGER(1) | |
| INTEGER(1) | REAL(4) | |
| IMIN0 | INTEGER(2) | INTEGER(2) |
| AIMIN0 | INTEGER(2) | REAL(4) |
| MIN0[2] | INTEGER(4) | INTEGER(4) |
| AMIN0[3,4] | INTEGER(4) | REAL(4) |
| KMIN0 | INTEGER(8) | INTEGER(8) |
| AKMIN0 | INTEGER(8) | REAL(4) |
| IMIN1 | REAL(4) | INTEGER(2) |
| MIN1[4,5] | REAL(4) | INTEGER(4) |
| KMIN1 | REAL(4) | INTEGER(8) |
| AMIN1 | REAL(4) | REAL(4) |
| DMIN1 | REAL(8) | REAL(8) |
| QMIN1 | REAL(16) | REAL(16) |
|
[1] These specific functions cannot be passed as actual
arguments.
| ||
Examples
MIN (2.0, -8.0, 6.0) has the value -8.0.
MIN (14, 32, -50) has the value -50.