The Fortran standard does not specify what the result of the
MIN intrinsics are if one of the arguments is a
NaN. Accordingly, the GNU Fortran compiler does not specify that either, as this allows for faster and more compact code to be generated. If the programmer wishes to take some specific action in case one of the arguments is a
NaN, it is necessary to explicitly test the arguments before calling
MIN, e.g. with the
IEEE_IS_NAN function from the intrinsic module
© Free Software Foundation
Licensed under the GNU Free Documentation License, Version 1.3.