My model crashes at this single line of code, with an erroneous arithmetic operation
statement (preceded by the statement Floating-point exception
) :
gcc1 = exp(-84.165_DP / t9a13)
I have trapped the value of t9a13
at 0.271320760
Now, this does produce an arithmetic result of 1.9044538286107083174449719800094e-135
but, obviously, not within my model.
I am assuming that this is down to the very small nature of the resultant value, though I do have -ffpe-trap
set to trap invalid
, zero
, overflow
and underflow
errors and would have thought that this is might result in an underflow error?
The full error message that precedes the traceback is Program received signal SIGFPE: Floating-point exception - erroneous arithmetic operation.
The input values are correct.
Am I correct in my assumption and, more importantly, is there a way of resolving this (given that several of my OS calculators do produce a valid, though very small, value)?
Both variables have been declared as real(DP) :: gcc1, t9a13
with DP
being defined as integer, parameter :: DP = kind(0d0)
.