This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
switch gcc to egcs gives NaN without optimization
- To: gcc at gcc dot gnu dot org
- Subject: switch gcc to egcs gives NaN without optimization
- From: Hugo Cornelis <hugo at bbf dot uia dot ac dot be>
- Date: Fri, 30 Jul 1999 13:25:12 +0100 (WET DST)
Hi,
I posted this msg to gcc-bugs but got only one reply that didn't solve the
problem, so this is a second try.
I encountered the following problem after switching from gcc to egcs :
I use genesis for neural network simulations. With Redhat 4.2 everything
ran fine, after switching to redhat 6.0, I get a result of NaN from the
following code :
{
double d1 = (1.0-t) * (1.0-u) * table[ilo][jlo];
double d2 = t * (1.0-u) * table[ilo+1][jlo];
double d3 = t * u * table[ilo+1][jlo+1];
double d4 = (1.0-t) * u * table[ilo][jlo+1];
double d5 = d1 + d2 + d3 + d4;
if (abs(d5 - d) / d5 > 0.00001)
{ /* neglect this part, debugging purpose */
int bk = 1;
}
double d = (1.0-t) * (1.0-u) * table[ilo][jlo]
+ t * (1.0-u) * table[ilo+1][jlo]
+ t * u * table[ilo+1][jlo+1]
+ (1.0-t) * u * table[ilo][jlo+1];
return(d);
}
As you can see the code calculates two times the same expression (once in
d5 and once in d), though for d5 I get always valid results, for d I
sometimes get NaN (this leads to a core later on in the program).
Originally only d was calculated, d1-5 have been added for debugging
purposes.
All pointer dereferences are valid (manually checked with gdb and
otherwise d5 couldn't have been calculated), used variables have legal
results (t,u,ilo,jlo and the mid-expression results d1,d2,d3,d4).
I don't know if this is a bug or if I missed some option for egcs to get
things right (I already tried -D__NO_MATH_INLINES, no success, as far as
I can see this wouldn't affect the above calculations ?)
I give here some output from a gdb session with display on d5 and d. The
function with the given block of code is called 2*10 times (so you would
expect the same results for the two groups of 10 calls because they
perform the same initialization. But you don't get the same results for
the first and 11th break). In addition the output from the float registers
and assembly code is also given (Note that the flags for the floating
point unit have sometimes changed, but on first sight I don't see any
relation with the NaN result). I got the assembly output with the 'info
line' command (for first line and last line) and then doing a 'disassem'
on the displayed addresses. Compilation has been done with -g -fno-gcse
and without any optimization.
I'm not an Intel assembler or FPU specialist, so I'm stuck with it.
Hugo Cornelis
------------------------------
<hugo@multicad>$ gcc -v
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/egcs-2.91.66/specs
gcc version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)
<hugo@multicad>$
------------------------------
Breakpoint 4, Tab2DInterp (ip=0x84b9b18, x=-0.073995642364025116,
y=7.5500000000000006e-05) at interp2d.c:127
2: d5 = 1.1674213471427697
1: d = 1.1674213471427697
(gdb) info float
st0: 0xbffb851eb851eb852000 Valid Normal -0.06500000000000000222045
st1: 0x00000000000000000000 Empty Zero 0
st2: 0x3feffba8820000000000 Empty Normal 2.999999924213625490665e-05
st3: 0x3ffed5d9d4b534359400 Empty Normal 0.8353550856010854563927
st4: 0x3fff8000000000000000 Empty Normal 1
st5: 0x3ffca898ad2b2f29b000 Empty Normal 0.1646449143989145436073
st6: 0x00000000000000000000 Empty Zero 0
st7: 0x3fff956e100d50b2dd7a Empty Normal 1.167421347142769613063
fctrl: 0x037f 64 bit; NEAR; mask INVAL DENOR DIVZ OVERF UNDER LOS;
fstat: 0x3a24 flags 0010; top 7; excep DIVZ LOS
ftag: 0x3fff
fip: 0x080d8edd
fcs: 0x055d0023
fopoff: 0xbfffc53c
fopsel: 0x002b
(gdb) info registeres
Undefined info command: "registeres". Try "help info".
(gdb) info registers
eax: 0x33 51
ecx: 0x84b9bb0 139172784
edx: 0x0 0
ebx: 0x84d8028 139296808
esp: 0xbfffc528 -1073756888
ebp: 0xbfffc578 -1073756808
esi: 0x84d8020 139296800
edi: 0x8792670 142157424
eip: 0x80d8ee0 135106272
eflags: 0x202 IOPL: 0; flags: IF
orig_eax: 0xffffffff -1
cs: 0x23 35
ss: 0x2b 43
ds: 0x2b 43
es: 0x2b 43
fs: 0x0 0
gs: 0x0 0
(gdb) info all-registers
eax: 0x33 51
ecx: 0x84b9bb0 139172784
edx: 0x0 0
ebx: 0x84d8028 139296808
esp: 0xbfffc528 -1073756888
ebp: 0xbfffc578 -1073756808
esi: 0x84d8020 139296800
edi: 0x8792670 142157424
eip: 0x80d8ee0 135106272
eflags: 0x202 IOPL: 0; flags: IF
orig_eax: 0xffffffff -1
cs: 0x23 35
ss: 0x2b 43
ds: 0x2b 43
es: 0x2b 43
fs: 0x0 0
gs: 0x0 0
st0: 0xbffb851eb851eb852000 Valid Normal -0.06500000000000000222045
st1: 0x00000000000000000000 Empty Zero 0
st2: 0x3feffba8820000000000 Empty Normal 2.999999924213625490665e-05
st3: 0x3ffed5d9d4b534359400 Empty Normal 0.8353550856010854563927
st4: 0x3fff8000000000000000 Empty Normal 1
st5: 0x3ffca898ad2b2f29b000 Empty Normal 0.1646449143989145436073
st6: 0x00000000000000000000 Empty Zero 0
st7: 0x3fff956e100d50b2dd7a Empty Normal 1.167421347142769613063
fctrl: 0x037f 64 bit; NEAR; mask INVAL DENOR DIVZ OVERF UNDER LOS;
fstat: 0x3a24 flags 0010; top 7; excep DIVZ LOS
ftag: 0x3fff
fip: 0x080d8edd
fcs: 0x055d0023
fopoff: 0xbfffc53c
fopsel: 0x002b
(gdb) cont
Continuing.
Breakpoint 4, Tab2DInterp (ip=0x856a648, x=-0.073995642364025116,
y=7.5500000000000006e-05) at interp2d.c:127
2: d5 = 7488.5269216775696
1: d = 7488.5269216775696
(gdb) info float
st0: 0xbffb851eb851eb852000 Valid Normal -0.06500000000000000222045
st1: 0x00000000000000000000 Empty Zero 0
st2: 0x3feffba8820000000000 Empty Normal 2.999999924213625490665e-05
st3: 0x3ffed5d9d4b534359400 Empty Normal 0.8353550856010854563927
st4: 0x3fff8000000000000000 Empty Normal 1
st5: 0x3ffca898ad2b2f29b000 Empty Normal 0.1646449143989145436073
st6: 0x00000000000000000000 Empty Zero 0
st7: 0x400bea043722b665b6d2 Empty Normal 7488.526921677569455404
fctrl: 0x037f 64 bit; NEAR; mask INVAL DENOR DIVZ OVERF UNDER LOS;
fstat: 0x3a24 flags 0010; top 7; excep DIVZ LOS
ftag: 0x3fff
fip: 0x080d8edd
fcs: 0x055d0023
fopoff: 0xbfffc53c
fopsel: 0x002b
(gdb) cont
Continuing.
Breakpoint 4, Tab2DInterp (ip=0x84b9b18, x=-0.075825594365596771,
y=7.5500000000000006e-05) at interp2d.c:127
2: d5 = 0.99928067707173296
1: d = 0.99928067707173296
(gdb) info float
st0: 0xbffb851eb851eb852000 Valid Normal -0.06500000000000000222045
st1: 0xbffb851eb851eb852000 Valid Normal -0.06500000000000000222045
st2: 0x00000000000000000000 Empty Zero 0
st3: 0x3ffcc02789254b736100 Empty Normal 0.1876508168232818886401
st4: 0x3fff8000000000000000 Empty Normal 1
st5: 0x3ffecff61db6ad2327c0 Empty Normal 0.8123491831767181113599
st6: 0x00000000000000000000 Empty Zero 0
st7: 0x3ffeffd0dbc38c3e9900 Empty Normal 0.9992806770717329728493
fctrl: 0x037f 64 bit; NEAR; mask INVAL DENOR DIVZ OVERF UNDER LOS;
fstat: 0x3024 flags 0000; top 6; excep DIVZ LOS
ftag: 0x0fff
fip: 0x080d8edd
fcs: 0x055d0023
fopoff: 0xbfffc53c
fopsel: 0x002b
(gdb) cont
Continuing.
Breakpoint 4, Tab2DInterp (ip=0x856a648, x=-0.075825594365596771,
y=7.5500000000000006e-05) at interp2d.c:127
2: d5 = 7490.0175396694467
1: d = 7490.0175396694476
(gdb) info float
st0: 0xbffb851eb851eb852000 Valid Normal -0.06500000000000000222045
st1: 0xbffb851eb851eb852000 Valid Normal -0.06500000000000000222045
st2: 0x00000000000000000000 Empty Zero 0
st3: 0x3ffcc02789254b736100 Empty Normal 0.1876508168232818886401
st4: 0x3fff8000000000000000 Empty Normal 1
st5: 0x3ffecff61db6ad2327c0 Empty Normal 0.8123491831767181113599
st6: 0x00000000000000000000 Empty Zero 0
st7: 0x400bea1023ebd69544de Empty Normal 7490.01753966944725871
fctrl: 0x037f 64 bit; NEAR; mask INVAL DENOR DIVZ OVERF UNDER LOS;
fstat: 0x3224 flags 0010; top 6; excep DIVZ LOS
ftag: 0x0fff
fip: 0x080d8edd
fcs: 0x055d0023
fopoff: 0xbfffc53c
fopsel: 0x002b
(gdb) cont
Continuing.
Breakpoint 4, Tab2DInterp (ip=0x84b9b18, x=-0.08055105060338974,
y=7.5500000000000006e-05) at interp2d.c:127
2: d5 = 0.66875609638707534
1: d = 0.66875609638707534
(gdb) info float
st0: 0xbffb851eb851eb852000 Valid Normal -0.06500000000000000222045
st1: 0xbffb851eb851eb852000 Valid Normal -0.06500000000000000222045
st2: 0xbffb851eb851eb852000 Valid Normal -0.06500000000000000222045
st3: 0x3ffec4ab79f97fcc3d40 Empty Normal 0.7682415231827670228093
st4: 0x3fff8000000000000000 Empty Normal 1
st5: 0x3ffced52181a00cf0b00 Empty Normal 0.2317584768172329771907
st6: 0x00000000000000000000 Empty Zero 0
st7: 0x3ffeab33997afbad43a4 Empty Normal 0.6687560963870753888514
fctrl: 0x037f 64 bit; NEAR; mask INVAL DENOR DIVZ OVERF UNDER LOS;
fstat: 0x2824 flags 0000; top 5; excep DIVZ LOS
ftag: 0x03ff
fip: 0x080d8edd
fcs: 0x055d0023
fopoff: 0xbfffc53c
fopsel: 0x002b
(gdb) cont
Continuing.
Breakpoint 4, Tab2DInterp (ip=0x856a648, x=-0.08055105060338974,
y=7.5500000000000006e-05) at interp2d.c:127
2: d5 = 7493.0330308179628
1: d = 7493.0330308179628
(gdb) info float
st0: 0xbffb851eb851eb852000 Valid Normal -0.06500000000000000222045
st1: 0xbffb851eb851eb852000 Valid Normal -0.06500000000000000222045
st2: 0xbffb851eb851eb852000 Valid Normal -0.06500000000000000222045
st3: 0x3ffec4ab79f97fcc3d40 Empty Normal 0.7682415231827670228093
st4: 0x3fff8000000000000000 Empty Normal 1
st5: 0x3ffced52181a00cf0b00 Empty Normal 0.2317584768172329771907
st6: 0x00000000000000000000 Empty Zero 0
st7: 0x400bea2843a5a9574997 Empty Normal 7493.033030817962934389
fctrl: 0x037f 64 bit; NEAR; mask INVAL DENOR DIVZ OVERF UNDER LOS;
fstat: 0x2824 flags 0000; top 5; excep DIVZ LOS
ftag: 0x03ff
fip: 0x080d8edd
fcs: 0x055d0023
fopoff: 0xbfffc53c
fopsel: 0x002b
(gdb) cont
Continuing.
Breakpoint 4, Tab2DInterp (ip=0x84b9b18, x=-0.069844074547290802,
y=7.5500000000000006e-05) at interp2d.c:127
2: d5 = 1.6613118832240796
1: d = -NaN(0x8000000000000)
(gdb) info float
st0: 0xbffb851eb851eb852000 Valid Normal -0.06500000000000000222045
st1: 0xbffb851eb851eb852000 Valid Normal -0.06500000000000000222045
st2: 0xbffb851eb851eb852000 Valid Normal -0.06500000000000000222045
st3: 0xffffc000000000000000 Empty QNaN -NaN(0xc000000000000000)
st4: 0x3fff8000000000000000 Empty Normal 1
st5: 0x3ffee3a1ba5c6ce6a3c0 Empty Normal 0.8891865230224547632376
st6: 0x00000000000000000000 Empty Zero 0
st7: 0xffffc000000000000000 Empty QNaN -NaN(0xc000000000000000)
fctrl: 0x037f 64 bit; NEAR; mask INVAL DENOR DIVZ OVERF UNDER LOS;
fstat: 0x2065 flags 0000; top 4; excep INVAL DIVZ LOS STACK
ftag: 0xc0ff
fip: 0x080d8edd
fcs: 0x055d0023
fopoff: 0xbfffc53c
fopsel: 0x002b
(gdb) cont
Continuing.
Breakpoint 4, Tab2DInterp (ip=0x856a648, x=-0.069844074547290802,
y=7.5500000000000006e-05) at interp2d.c:127
2: d5 = 7484.2709768241575
1: d = 7484.2709768241566
(gdb) info float
st0: 0xbffb851eb851eb852000 Valid Normal -0.06500000000000000222045
st1: 0xbffb851eb851eb852000 Valid Normal -0.06500000000000000222045
st2: 0xbffb851eb851eb852000 Valid Normal -0.06500000000000000222045
st3: 0x3ffbe2f22d1c98cae200 Empty Normal 0.1108134769775452367624
st4: 0x3fff8000000000000000 Empty Normal 1
st5: 0x3ffee3a1ba5c6ce6a3c0 Empty Normal 0.8891865230224547632376
st6: 0x00000000000000000000 Empty Zero 0
st7: 0x400be9e22af5e5add2e6 Empty Normal 7484.270976824156934804
fctrl: 0x037f 64 bit; NEAR; mask INVAL DENOR DIVZ OVERF UNDER LOS;
fstat: 0x2065 flags 0000; top 4; excep INVAL DIVZ LOS STACK
ftag: 0xc0ff
fip: 0x080d8edd
fcs: 0x055d0023
fopoff: 0xbfffc53c
fopsel: 0x002b
(gdb) cont
Continuing.
Breakpoint 4, Tab2DInterp (ip=0x862cd48, x=-0.052315723150968552,
y=7.5500000000000006e-05) at interp2d.c:127
2: d5 = 7.3670299263542196
1: d = -NaN(0x8000000000000)
(gdb) info float
st0: 0xbffb851eb851eb852000 Valid Normal -0.06500000000000000222045
st1: 0xbffb851eb851eb852000 Valid Normal -0.06500000000000000222045
st2: 0xbffb851eb851eb852000 Valid Normal -0.06500000000000000222045
st3: 0xffffc000000000000000 Empty QNaN -NaN(0xc000000000000000)
st4: 0x3fff8000000000000000 Empty Normal 1
st5: 0x3ffef307f1033e039580 Empty Normal 0.9493399269977217044825
st6: 0x00000000000000000000 Empty Zero 0
st7: 0xffffc000000000000000 Empty QNaN -NaN(0xc000000000000000)
fctrl: 0x037f 64 bit; NEAR; mask INVAL DENOR DIVZ OVERF UNDER LOS;
fstat: 0x1865 flags 0000; top 3; excep INVAL DIVZ LOS STACK
ftag: 0xf03f
fip: 0x080d8edd
fcs: 0x055d0023
fopoff: 0xbfffc53c
fopsel: 0x002b
(gdb) cont
Continuing.
Breakpoint 4, Tab2DInterp (ip=0x86dd878, x=-0.052315723150968552,
y=7.5500000000000006e-05) at interp2d.c:127
2: d5 = 7440.7501092123066
1: d = 7440.7501092123075
(gdb) info float
st0: 0xbffb851eb851eb852000 Valid Normal -0.06500000000000000222045
st1: 0xbffb851eb851eb852000 Valid Normal -0.06500000000000000222045
st2: 0xbffb851eb851eb852000 Valid Normal -0.06500000000000000222045
st3: 0x3ffacf80efcc1fc6a800 Empty Normal 0.05066007300227829551753
st4: 0x3fff8000000000000000 Empty Normal 1
st5: 0x3ffef307f1033e039580 Empty Normal 0.9493399269977217044825
st6: 0x00000000000000000000 Empty Zero 0
st7: 0x400be8860039423a4c0c Empty Normal 7440.750109212307057405
fctrl: 0x037f 64 bit; NEAR; mask INVAL DENOR DIVZ OVERF UNDER LOS;
fstat: 0x1a65 flags 0010; top 3; excep INVAL DIVZ LOS STACK
ftag: 0xf03f
fip: 0x080d8edd
fcs: 0x055d0023
fopoff: 0xbfffc53c
fopsel: 0x002b
(gdb) cont
Continuing.
time = 0.000020 ; step = 1
completed 1 steps in 0.020000 cpu seconds
time = 0.000000 ; step = 0
Breakpoint 4, Tab2DInterp (ip=0x84b9b18, x=-0.073995642364025116,
y=7.5500000000000006e-05) at interp2d.c:127
2: d5 = 1.1674213471427697
1: d = -NaN(0x8000000000000)
(gdb) info float
st0: 0xbffb851eb851eb852000 Valid Normal -0.06500000000000000222045
st1: 0xbffb851eb851eb852000 Valid Normal -0.06500000000000000222045
st2: 0xbffb851eb851eb852000 Valid Normal -0.06500000000000000222045
st3: 0xffffc000000000000000 Empty QNaN -NaN(0xc000000000000000)
st4: 0x3fff8000000000000000 Empty Normal 1
st5: 0x3ffca898ad2b2f29b000 Empty Normal 0.1646449143989145436073
st6: 0x00000000000000000000 Empty Zero 0
st7: 0xffffc000000000000000 Empty QNaN -NaN(0xc000000000000000)
fctrl: 0x037f 64 bit; NEAR; mask INVAL DENOR DIVZ OVERF UNDER LOS;
fstat: 0x1065 flags 0000; top 2; excep INVAL DIVZ LOS STACK
ftag: 0xfc0f
fip: 0x080d8edd
fcs: 0x055d0023
fopoff: 0xbfffc53c
fopsel: 0x002b
(gdb) cont
Continuing.
Breakpoint 4, Tab2DInterp (ip=0x856a648, x=-0.073995642364025116,
y=7.5500000000000006e-05) at interp2d.c:127
2: d5 = 7488.5269216775696
1: d = 7488.5269216775696
(gdb) info float
st0: 0xbffb851eb851eb852000 Valid Normal -0.06500000000000000222045
st1: 0xbffb851eb851eb852000 Valid Normal -0.06500000000000000222045
st2: 0xbffb851eb851eb852000 Valid Normal -0.06500000000000000222045
st3: 0x3ffed5d9d4b534359400 Empty Normal 0.8353550856010854563927
st4: 0x3fff8000000000000000 Empty Normal 1
st5: 0x3ffca898ad2b2f29b000 Empty Normal 0.1646449143989145436073
st6: 0x00000000000000000000 Empty Zero 0
st7: 0x400bea043722b665b6d2 Empty Normal 7488.526921677569455404
fctrl: 0x037f 64 bit; NEAR; mask INVAL DENOR DIVZ OVERF UNDER LOS;
fstat: 0x1265 flags 0010; top 2; excep INVAL DIVZ LOS STACK
ftag: 0xfc0f
fip: 0x080d8edd
fcs: 0x055d0023
fopoff: 0xbfffc53c
fopsel: 0x002b
(gdb) cont
Continuing.
Breakpoint 4, Tab2DInterp (ip=0x84b9b18, x=-0.075825594365596771,
y=7.5500000000000006e-05) at interp2d.c:127
2: d5 = 0.99928067707173296
1: d = -NaN(0x8000000000000)
(gdb) info float
st0: 0xbffb851eb851eb852000 Valid Normal -0.06500000000000000222045
st1: 0xbffb851eb851eb852000 Valid Normal -0.06500000000000000222045
st2: 0xbffb851eb851eb852000 Valid Normal -0.06500000000000000222045
st3: 0xffffc000000000000000 Empty QNaN -NaN(0xc000000000000000)
st4: 0x3fff8000000000000000 Empty Normal 1
st5: 0x3ffecff61db6ad2327c0 Empty Normal 0.8123491831767181113599
st6: 0x00000000000000000000 Empty Zero 0
st7: 0xffffc000000000000000 Empty QNaN -NaN(0xc000000000000000)
fctrl: 0x037f 64 bit; NEAR; mask INVAL DENOR DIVZ OVERF UNDER LOS;
fstat: 0x0865 flags 0000; top 1; excep INVAL DIVZ LOS STACK
ftag: 0xff03
fip: 0x080d8edd
fcs: 0x055d0023
fopoff: 0xbfffc53c
fopsel: 0x002b
(gdb) cont
Continuing.
Breakpoint 4, Tab2DInterp (ip=0x856a648, x=-0.075825594365596771,
y=7.5500000000000006e-05) at interp2d.c:127
2: d5 = 7490.0175396694467
1: d = 7490.0175396694476
(gdb) info float
st0: 0xbffb851eb851eb852000 Valid Normal -0.06500000000000000222045
st1: 0xbffb851eb851eb852000 Valid Normal -0.06500000000000000222045
st2: 0xbffb851eb851eb852000 Valid Normal -0.06500000000000000222045
st3: 0x3ffcc02789254b736100 Empty Normal 0.1876508168232818886401
st4: 0x3fff8000000000000000 Empty Normal 1
st5: 0x3ffecff61db6ad2327c0 Empty Normal 0.8123491831767181113599
st6: 0x00000000000000000000 Empty Zero 0
st7: 0x400bea1023ebd69544de Empty Normal 7490.01753966944725871
fctrl: 0x037f 64 bit; NEAR; mask INVAL DENOR DIVZ OVERF UNDER LOS;
fstat: 0x0a65 flags 0010; top 1; excep INVAL DIVZ LOS STACK
ftag: 0xff03
fip: 0x080d8edd
fcs: 0x055d0023
fopoff: 0xbfffc53c
fopsel: 0x002b
(gdb) cont
Continuing.
Breakpoint 4, Tab2DInterp (ip=0x84b9b18, x=-0.08055105060338974,
y=7.5500000000000006e-05) at interp2d.c:127
2: d5 = 0.66875609638707534
1: d = -NaN(0x8000000000000)
(gdb) info float
st0: 0xbffb851eb851eb852000 Valid Normal -0.06500000000000000222045
st1: 0xbffb851eb851eb852000 Valid Normal -0.06500000000000000222045
st2: 0xbffb851eb851eb852000 Valid Normal -0.06500000000000000222045
st3: 0xffffc000000000000000 Empty QNaN -NaN(0xc000000000000000)
st4: 0x3fff8000000000000000 Empty Normal 1
st5: 0x3ffced52181a00cf0b00 Empty Normal 0.2317584768172329771907
st6: 0x00000000000000000000 Empty Zero 0
st7: 0xffffc000000000000000 Empty QNaN -NaN(0xc000000000000000)
fctrl: 0x037f 64 bit; NEAR; mask INVAL DENOR DIVZ OVERF UNDER LOS;
fstat: 0x0065 flags 0000; top 0; excep INVAL DIVZ LOS STACK
ftag: 0xffc0
fip: 0x080d8edd
fcs: 0x055d0023
fopoff: 0xbfffc53c
fopsel: 0x002b
(gdb) cont
Continuing.
Breakpoint 4, Tab2DInterp (ip=0x856a648, x=-0.08055105060338974,
y=7.5500000000000006e-05) at interp2d.c:127
2: d5 = 7493.0330308179628
1: d = 7493.0330308179628
(gdb) info float
st0: 0xbffb851eb851eb852000 Valid Normal -0.06500000000000000222045
st1: 0xbffb851eb851eb852000 Valid Normal -0.06500000000000000222045
st2: 0xbffb851eb851eb852000 Valid Normal -0.06500000000000000222045
st3: 0x3ffec4ab79f97fcc3d40 Empty Normal 0.7682415231827670228093
st4: 0x3fff8000000000000000 Empty Normal 1
st5: 0x3ffced52181a00cf0b00 Empty Normal 0.2317584768172329771907
st6: 0x00000000000000000000 Empty Zero 0
st7: 0x400bea2843a5a9574997 Empty Normal 7493.033030817962934389
fctrl: 0x037f 64 bit; NEAR; mask INVAL DENOR DIVZ OVERF UNDER LOS;
fstat: 0x0065 flags 0000; top 0; excep INVAL DIVZ LOS STACK
ftag: 0xffc0
fip: 0x080d8edd
fcs: 0x055d0023
fopoff: 0xbfffc53c
fopsel: 0x002b
(gdb) cont
Continuing.
Breakpoint 4, Tab2DInterp (ip=0x84b9b18, x=-0.069844074547290802,
y=7.5500000000000006e-05) at interp2d.c:127
2: d5 = 1.6613118832240796
1: d = -NaN(0x8000000000000)
(gdb) info float
st0: 0xbffb851eb851eb852000 Valid Normal -0.06500000000000000222045
st1: 0xbffb851eb851eb852000 Valid Normal -0.06500000000000000222045
st2: 0xbffb851eb851eb852000 Valid Normal -0.06500000000000000222045
st3: 0xffffc000000000000000 Empty QNaN -NaN(0xc000000000000000)
st4: 0x3fff8000000000000000 Empty Normal 1
st5: 0x3ffee3a1ba5c6ce6a3c0 Empty Normal 0.8891865230224547632376
st6: 0x00000000000000000000 Empty Zero 0
st7: 0xffffc000000000000000 Empty QNaN -NaN(0xc000000000000000)
fctrl: 0x037f 64 bit; NEAR; mask INVAL DENOR DIVZ OVERF UNDER LOS;
fstat: 0x3865 flags 0000; top 7; excep INVAL DIVZ LOS STACK
ftag: 0x3ff0
fip: 0x080d8edd
fcs: 0x055d0023
fopoff: 0xbfffc53c
fopsel: 0x002b
(gdb) cont
Continuing.
Breakpoint 4, Tab2DInterp (ip=0x856a648, x=-0.069844074547290802,
y=7.5500000000000006e-05) at interp2d.c:127
2: d5 = 7484.2709768241575
1: d = 7484.2709768241566
(gdb) info float
st0: 0xbffb851eb851eb852000 Valid Normal -0.06500000000000000222045
st1: 0xbffb851eb851eb852000 Valid Normal -0.06500000000000000222045
st2: 0xbffb851eb851eb852000 Valid Normal -0.06500000000000000222045
st3: 0x3ffbe2f22d1c98cae200 Empty Normal 0.1108134769775452367624
st4: 0x3fff8000000000000000 Empty Normal 1
st5: 0x3ffee3a1ba5c6ce6a3c0 Empty Normal 0.8891865230224547632376
st6: 0x00000000000000000000 Empty Zero 0
st7: 0x400be9e22af5e5add2e6 Empty Normal 7484.270976824156934804
fctrl: 0x037f 64 bit; NEAR; mask INVAL DENOR DIVZ OVERF UNDER LOS;
fstat: 0x3865 flags 0000; top 7; excep INVAL DIVZ LOS STACK
ftag: 0x3ff0
fip: 0x080d8edd
fcs: 0x055d0023
fopoff: 0xbfffc53c
fopsel: 0x002b
(gdb) cont
Continuing.
Breakpoint 4, Tab2DInterp (ip=0x862cd48, x=-0.052315723150968552,
y=7.5500000000000006e-05) at interp2d.c:127
2: d5 = 7.3670299263542196
1: d = -NaN(0x8000000000000)
(gdb) info float
st0: 0xbffb851eb851eb852000 Valid Normal -0.06500000000000000222045
st1: 0xbffb851eb851eb852000 Valid Normal -0.06500000000000000222045
st2: 0xbffb851eb851eb852000 Valid Normal -0.06500000000000000222045
st3: 0xffffc000000000000000 Empty QNaN -NaN(0xc000000000000000)
st4: 0x3fff8000000000000000 Empty Normal 1
st5: 0x3ffef307f1033e039580 Empty Normal 0.9493399269977217044825
st6: 0x00000000000000000000 Empty Zero 0
st7: 0xffffc000000000000000 Empty QNaN -NaN(0xc000000000000000)
fctrl: 0x037f 64 bit; NEAR; mask INVAL DENOR DIVZ OVERF UNDER LOS;
fstat: 0x3065 flags 0000; top 6; excep INVAL DIVZ LOS STACK
ftag: 0x0ffc
fip: 0x080d8edd
fcs: 0x055d0023
fopoff: 0xbfffc53c
fopsel: 0x002b
(gdb) cont
Continuing.
Breakpoint 4, Tab2DInterp (ip=0x86dd878, x=-0.052315723150968552,
y=7.5500000000000006e-05) at interp2d.c:127
2: d5 = 7440.7501092123066
1: d = 7440.7501092123075
(gdb) info float
st0: 0xbffb851eb851eb852000 Valid Normal -0.06500000000000000222045
st1: 0xbffb851eb851eb852000 Valid Normal -0.06500000000000000222045
st2: 0xbffb851eb851eb852000 Valid Normal -0.06500000000000000222045
st3: 0x3ffacf80efcc1fc6a800 Empty Normal 0.05066007300227829551753
st4: 0x3fff8000000000000000 Empty Normal 1
st5: 0x3ffef307f1033e039580 Empty Normal 0.9493399269977217044825
st6: 0x00000000000000000000 Empty Zero 0
st7: 0x400be8860039423a4c0c Empty Normal 7440.750109212307057405
fctrl: 0x037f 64 bit; NEAR; mask INVAL DENOR DIVZ OVERF UNDER LOS;
fstat: 0x3265 flags 0010; top 6; excep INVAL DIVZ LOS STACK
ftag: 0x0ffc
fip: 0x080d8edd
fcs: 0x055d0023
fopoff: 0xbfffc53c
fopsel: 0x002b
(gdb) cont
Continuing.
genesis #0 >
------------------------------
(gdb) disassem 0x80d8dec 0x80d8f35
Dump of assembler code from 0x80d8dec to 0x80d8f35:
0x80d8dec <Tab2DInterp+540>: fld1
0x80d8dee <Tab2DInterp+542>: fsub %st(1),%st
0x80d8df0 <Tab2DInterp+544>: fld1
0x80d8df2 <Tab2DInterp+546>: fsub %st(3),%st
0x80d8df4 <Tab2DInterp+548>: fmulp %st,%st(1)
0x80d8df6 <Tab2DInterp+550>: leal 0x0(,%edx,8),%ebx
0x80d8dfd <Tab2DInterp+557>: movl 0xffffffbc(%ebp),%eax
0x80d8e00 <Tab2DInterp+560>: movl (%ecx,%eax,4),%esi
0x80d8e03 <Tab2DInterp+563>: fmull (%esi,%ebx,1)
0x80d8e06 <Tab2DInterp+566>: fstpl 0xffffffec(%ebp)
0x80d8e09 <Tab2DInterp+569>: fld1
0x80d8e0b <Tab2DInterp+571>: fsub %st(2),%st
0x80d8e0d <Tab2DInterp+573>: fld %st(1)
0x80d8e0f <Tab2DInterp+575>: fmulp %st,%st(1)
0x80d8e11 <Tab2DInterp+577>: leal 0x0(,%edx,8),%ebx
0x80d8e18 <Tab2DInterp+584>: movl 0xffffffbc(%ebp),%eax
0x80d8e1b <Tab2DInterp+587>: movl 0x4(%ecx,%eax,4),%esi
0x80d8e1f <Tab2DInterp+591>: fmull (%esi,%ebx,1)
0x80d8e22 <Tab2DInterp+594>: fstpl 0xffffffe4(%ebp)
0x80d8e25 <Tab2DInterp+597>: fld %st(0)
0x80d8e27 <Tab2DInterp+599>: fmul %st(2),%st
0x80d8e29 <Tab2DInterp+601>: leal 0x0(,%edx,8),%ebx
0x80d8e30 <Tab2DInterp+608>: movl %ebx,%esi
0x80d8e32 <Tab2DInterp+610>: movl 0xffffffbc(%ebp),%eax
0x80d8e35 <Tab2DInterp+613>: addl 0x4(%ecx,%eax,4),%esi
0x80d8e39 <Tab2DInterp+617>: leal 0x8(%esi),%ebx
0x80d8e3c <Tab2DInterp+620>: fmull (%ebx)
0x80d8e3e <Tab2DInterp+622>: fstpl 0xffffffdc(%ebp)
0x80d8e41 <Tab2DInterp+625>: fld1
0x80d8e43 <Tab2DInterp+627>: fsub %st(1),%st
0x80d8e45 <Tab2DInterp+629>: fmul %st(2),%st
0x80d8e47 <Tab2DInterp+631>: leal 0x0(,%edx,8),%ebx
0x80d8e4e <Tab2DInterp+638>: movl %ebx,%esi
0x80d8e50 <Tab2DInterp+640>: movl 0xffffffbc(%ebp),%eax
0x80d8e53 <Tab2DInterp+643>: addl (%ecx,%eax,4),%esi
0x80d8e56 <Tab2DInterp+646>: leal 0x8(%esi),%ebx
0x80d8e59 <Tab2DInterp+649>: fmull (%ebx)
0x80d8e5b <Tab2DInterp+651>: fstpl 0xffffffd4(%ebp)
0x80d8e5e <Tab2DInterp+654>: fldl 0xffffffec(%ebp)
0x80d8e61 <Tab2DInterp+657>: faddl 0xffffffe4(%ebp)
0x80d8e64 <Tab2DInterp+660>: faddl 0xffffffdc(%ebp)
0x80d8e67 <Tab2DInterp+663>: faddl 0xffffffd4(%ebp)
0x80d8e6a <Tab2DInterp+666>: fstpl 0xffffffcc(%ebp)
0x80d8e6d <Tab2DInterp+669>: fld1
0x80d8e6f <Tab2DInterp+671>: fsub %st(1),%st
0x80d8e71 <Tab2DInterp+673>: fld1
0x80d8e73 <Tab2DInterp+675>: fsub %st(3),%st
0x80d8e75 <Tab2DInterp+677>: fmulp %st,%st(1)
0x80d8e77 <Tab2DInterp+679>: leal 0x0(,%edx,8),%ebx
0x80d8e7e <Tab2DInterp+686>: movl 0xffffffbc(%ebp),%eax
0x80d8e81 <Tab2DInterp+689>: movl (%ecx,%eax,4),%esi
0x80d8e84 <Tab2DInterp+692>: fmull (%esi,%ebx,1)
0x80d8e87 <Tab2DInterp+695>: fld1
0x80d8e89 <Tab2DInterp+697>: fsub %st(3),%st
0x80d8e8b <Tab2DInterp+699>: fld %st(2)
0x80d8e8d <Tab2DInterp+701>: fmulp %st,%st(1)
0x80d8e8f <Tab2DInterp+703>: leal 0x0(,%edx,8),%ebx
0x80d8e96 <Tab2DInterp+710>: movl 0xffffffbc(%ebp),%eax
0x80d8e99 <Tab2DInterp+713>: movl 0x4(%ecx,%eax,4),%esi
0x80d8e9d <Tab2DInterp+717>: fmull (%esi,%ebx,1)
0x80d8ea0 <Tab2DInterp+720>: faddp %st,%st(1)
0x80d8ea2 <Tab2DInterp+722>: fld %st(1)
0x80d8ea4 <Tab2DInterp+724>: fmul %st(3),%st
0x80d8ea6 <Tab2DInterp+726>: leal 0x0(,%edx,8),%ebx
0x80d8ead <Tab2DInterp+733>: movl %ebx,%esi
0x80d8eaf <Tab2DInterp+735>: movl 0xffffffbc(%ebp),%eax
0x80d8eb2 <Tab2DInterp+738>: addl 0x4(%ecx,%eax,4),%esi
0x80d8eb6 <Tab2DInterp+742>: leal 0x8(%esi),%ebx
0x80d8eb9 <Tab2DInterp+745>: fmull (%ebx)
0x80d8ebb <Tab2DInterp+747>: faddp %st,%st(1)
0x80d8ebd <Tab2DInterp+749>: fld1
0x80d8ebf <Tab2DInterp+751>: fsubp %st,%st(2)
0x80d8ec1 <Tab2DInterp+753>: fxch %st(1)
0x80d8ec3 <Tab2DInterp+755>: fmulp %st,%st(2)
0x80d8ec5 <Tab2DInterp+757>: fxch %st(1)
0x80d8ec7 <Tab2DInterp+759>: leal 0x0(,%edx,8),%ebx
0x80d8ece <Tab2DInterp+766>: movl %ebx,%esi
0x80d8ed0 <Tab2DInterp+768>: movl 0xffffffbc(%ebp),%eax
0x80d8ed3 <Tab2DInterp+771>: addl (%ecx,%eax,4),%esi
0x80d8ed6 <Tab2DInterp+774>: leal 0x8(%esi),%ebx
0x80d8ed9 <Tab2DInterp+777>: fmull (%ebx)
0x80d8edb <Tab2DInterp+779>: faddp %st,%st(1)
0x80d8edd <Tab2DInterp+781>: fstpl 0xffffffc4(%ebp)
0x80d8ee0 <Tab2DInterp+784>: fldl 0xffffffcc(%ebp)
0x80d8ee3 <Tab2DInterp+787>: fsubl 0xffffffc4(%ebp)
0x80d8ee6 <Tab2DInterp+790>: fnstcw 0xfffffffc(%ebp)
0x80d8ee9 <Tab2DInterp+793>: movl 0xfffffffc(%ebp),%eax
0x80d8eec <Tab2DInterp+796>: movb $0xc,%ah
0x80d8eee <Tab2DInterp+798>: movl %eax,0xfffffff4(%ebp)
0x80d8ef1 <Tab2DInterp+801>: fldcw 0xfffffff4(%ebp)
0x80d8ef4 <Tab2DInterp+804>: fistpl 0xfffffff4(%ebp)
0x80d8ef7 <Tab2DInterp+807>: movl 0xfffffff4(%ebp),%esi
0x80d8efa <Tab2DInterp+810>: fldcw 0xfffffffc(%ebp)
0x80d8efd <Tab2DInterp+813>: movl %esi,%ebx
0x80d8eff <Tab2DInterp+815>: testl %ebx,%ebx
0x80d8f01 <Tab2DInterp+817>: jnl 0x80d8f05 <Tab2DInterp+821>
0x80d8f03 <Tab2DInterp+819>: negl %ebx
0x80d8f05 <Tab2DInterp+821>: pushl %ebx
0x80d8f06 <Tab2DInterp+822>: fildl (%esp,1)
0x80d8f09 <Tab2DInterp+825>: addl $0x4,%esp
0x80d8f0c <Tab2DInterp+828>: fdivl 0xffffffcc(%ebp)
0x80d8f0f <Tab2DInterp+831>: fldl 0x824bea0
0x80d8f15 <Tab2DInterp+837>: fstp %st(0)
0x80d8f17 <Tab2DInterp+839>: fldl 0x824bea0
0x80d8f1d <Tab2DInterp+845>: fcompp
0x80d8f1f <Tab2DInterp+847>: fnstsw
0x80d8f21 <Tab2DInterp+849>: andb $0x45,%ah
0x80d8f24 <Tab2DInterp+852>: cmpb $0x1,%ah
0x80d8f27 <Tab2DInterp+855>: jne 0x80d8f30 <Tab2DInterp+864>
0x80d8f29 <Tab2DInterp+857>: movl $0x1,0xffffffc0(%ebp)
0x80d8f30 <Tab2DInterp+864>: fldl 0xffffffc4(%ebp)
0x80d8f33 <Tab2DInterp+867>: jmp 0x80d8f90 <Tab2DInterp+960>
End of assembler dump.
(gdb)
------------------------------