Strange SIGFPE (underflow?) with gfortran [ -mieee ?]
Brooks Moses
bmoses@stanford.edu
Fri Oct 20 10:47:00 GMT 2006
Kay Diederichs wrote:
> Rob wrote:
>
>>Rob <spamrefuse at yahoo dot com> wrote:
>>
>>>I'm using GCC 4.1.2, from SVN as of about two weeks
>>>ago. It's on an AlphaServer system with Linux
>>>installed.
>>>
>>>
>>>I have this piece of Fortran code:
>>>
>>> R1=-708.397
>>> R2=EXP(R1)
>>> R3=1-R2
[...]
>>>However, when I change the first line to
>>> R1=708.396
>>>
>>>(change last digit from 7 to 6) then the SIGFPE
>>>disappears when running the executable. In that
>>>case I have (using gdb):
>>>
>>> R1 = -708.39599609375
>>> R2 = 2.2260140139667223e-308
>>> R3 = 1
[...]
>
> Rob,
> what I don't understand in your posting is that you not only "change
> last digit from 7 to 6" but you also change the sign of R1 (from - to +)?
Given the quoted gdb results, it appears that this omitted negative sign
is just a typo in the email message, and that the actual line in the
program is the correct "R1=-708.396", with the sign unchanged.
- Brooks
More information about the Fortran
mailing list