You need to use .and.
if you want to make more than one comparison.
Also, .GE.
and .LE.
are going to give you greater than/equal to and less than/equal to.
You want to use .gt.
(greater than) and .lt.
(less than):
program cmp
real :: x(1:4) = (/0.25,0.5,0.75,1.0/)
do i=1,4
if (x(i) .gt. 0 .and. x(i) .lt. 1) then
print *, x(i), "in range"
else
print *, x(i), "out of range"
endif
enddo
end program cmp
output:
0.250000000 in range
0.500000000 in range
0.750000000 in range
1.00000000 out of range