Fortran · Exception
What does IEEE_OVERFLOW — Floating-Point Overflow mean in Fortran?
Raised when a real or complex arithmetic result's magnitude exceeds the largest finite value that fits the destination kind — the correctly rounded answer would need an exponent bigger than the format allows. Left untrapped, the operation quietly produces a signed Infinity and the program keeps running with that value propagating through later computations.
Raised when a real or complex arithmetic result's magnitude exceeds the largest finite value that fits the destination kind — the correctly rounded answer would need an exponent bigger than the format allows. Left untrapped, the operation quietly produces a signed Infinity and the program keeps running with that value propagating through later computations.
Enable halting via IEEE_SET_HALTING_MODE(IEEE_OVERFLOW, .TRUE.) or -ffpe-trap=overflow to stop at the source, then either rescale the computation or move the affected variables to a wider real kind if the magnitude is legitimately that large.