After throughly writing each step of the calculation (for YTH, CHI and CPREV), I found that the program was unable to handle the exponential function for certain values.
So it works ok now... as long as LAMDA1 and LAMDA2 have values less than 0.01
Thanks...
I've tried adding a write statement and it seems to have no problems with using the same variables (as input by the user in the main program).
I've also got rid of that line of code CPREV=CHISQ.
Still gives me the same value :confused:
Hii,
Having trouble with some code I am writing, where a subroutine returns the same value regardless of different variable inputs.
...
C Calculate Yth and Chi values. Compute sum of Chi-squared.
Subroutine Chisquared(CPREV,CHISQ)
Real...