Manual Reference Pages  - min (3fortran)

NAME

MIN(3) - [NUMERIC] Minimum value of an argument list

SYNOPSIS

result = min(a1, a2, a3, ... )

         elemental TYPE(kind=KIND) function min(a1, a2, a3, ... )

TYPE(kind=KIND,intent(in) :: a1 TYPE(kind=KIND,intent(in) :: a2 TYPE(kind=KIND,intent(in) :: a3 : : :

CHARACTERISTICS

o TYPE may be integer, real or character.

DESCRIPTION

MIN(3) returns the argument with the smallest (most negative) value.

See MAX(3) for an extended example of the behavior of MIN(3) as and MAX(3).

OPTIONS

o A1 : the first element of the set of values to determine the minimum of.
o A2, A3, ... : An expression of the same type and kind as A1 completing the set of values to find the minimum of.

RESULT

The return value corresponds to the minimum value among the arguments, and has the same type and kind as the first argument.

EXAMPLES

Sample program

    program demo_min
    implicit none
        write(*,*)min(10.0,11.0,30.0,-100.0)
    end program demo_min

Results:

          -100.0000000

STANDARD

FORTRAN 77

SEE ALSO

MAXLOC(3), MINLOC(3), MINVAL(3), MAX(3),

fortran-lang intrinsic descriptions (license: MIT) @urbanjost


Nemo Release 3.1 min (3fortran) April 28, 2024
Generated by manServer 1.08 from 08ecd845-474a-43ed-8c07-25a7e07e45cf using man macros.