real :: a(2,4) a = reshape([7.96,8.23,9.31,9.58,11.47,11.47,13.,13.27],shape(a)) if( any( z>=a(1,:).and.z<=a(2,:) ) ) then