I am trying to do some calculations in Fortran that looks like:
large number (order E40) - large number (order E40)
I should get back zero. Most of the time it works, but in a couple of cases I'm getting weird numbers. One answer Fortran gave me was -1E20
. Another weird answer I got was 32768
, which is 2^15
, oddly enough.
Does anyone have any clue as to why this is happening?