------- Comment #2 from burnus at gcc dot gnu dot org 2008-11-20 07:20 ------- > I don't think INF is the same as infinity. It is most like implict > declared variable with an undefined value.
Exactly. With IMPLICIT NONE one sees that INF is an (implicitly typed) integer variable, which has an undefined value. minval = +INF maxval = -INF How about: minval = huge(minval) ! largest finite value maxval = -huge(minval)! smallest finite value or shorter (untested) min = minval(arr( [(1+kcycle*i, i=0,npts-1)] ) max = maxval(arr( [(1+kcycle*i, i=0,npts-1)] ) where (g)Fortran does internally what you want. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38188