## 9.3.99 MIN (A1, A2 [, A3,...])

Description: | Returns the minimum value of the arguments.
Class: | Elemental function; Generic
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 is of type real. The value of the result is that of the smallest argument.

Specific Name1 | 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,6 | REAL(4) | INTEGER(4)
KMIN1 | REAL(4) | INTEGER(8)
AMIN1 7 | REAL(4) | REAL(4)
DMIN1 | REAL(8) | REAL(8)
QMIN1 | REAL(16) | REAL(16)
1 These specific functions cannot be passed as actual arguments. 2 Or JMIN0. 3 Or AJMIN0. AMIN0 is the same as REAL (MIN). 4 In Fortran 90, AMIN0 and MIN1 are specific functions with no generic name. For compatibility with older versions of Fortran, these functions can also be specified as generic functions. 5 Or JMIN1. MIN1 is the same as INT (MIN). 6 The setting of compiler options specifying integer size can affect MIN1. 7 The setting of compiler options specifying real size can affect AMIN1.

Examples

MIN (2.0, -8.0, 6.0) has the value -8.0.

MIN (14, 32, -50) has the value -50.

Previous Page Next Page Table of Contents