I am using FORTRAN 95 using Silverfrost Plato. Here, I am trying to create a conditional statement to compare a double precision variable with a double precision value. Somehow the compiler does not understand the condition.
program db
implicit none
integer :: j,n
double precision :: t,t_max,dt
n = 20
dt = 0.000020d0
t_max = 0.00632d0
t = 0.0d0
while (t .LE. t_max) do
if ( t == 0.00158d0) then
do j = 0,n
print *, j
end do
end if
print *, t
t = t + dt
end do
end program db
I am unable to resolve this issue on my own. Any help or links to relevant documentation would be greatly appreciated.