I am attempting to call a subroutine within my code that looks like this;
CALL RAYLEY(SIGR,AL2,Fwater,FNCR)
And when the code reaches this line, it gives me;
Program received signal SIGFPE: Floating-point exception - erroneous arithmetic operation.
I believe I know why this is occurring, because as this subroutine is running its calculations, after it iterates for a while, it ends up producing zeroes for 2 of the variables. This then results in the erroneous arithmetic expression. Is it possible in anyway to force the subroutine to stop being called when a variable becomes equal to 0, so that this can be avoided?