Here is the Fortran 90 code I have written. It is a function that I am using in a larger code but I am getting incorrect results.
I know mathematically the answer should be 1 (or close to 1 due to computation) but my answer result is 0.
Am I doing something wrong? Is there something that I do not know?
Here is the my code saved as test.f90 that I am compiling and running on windows gfortran:
program main
implicit none
real*8 :: y, t
t = 0.0
y = (1/3)*exp(5*t) + (2/3)*exp(-t) + t*t*exp(2*t)
print*, 'y= ', y
end program main