Subject floating point puzzle

i'm seeing a crash in in _v2d.  unfortunately, i don't
see how this is happening.

8.out 8535: suicide: sys: fp: stack underflow fppc=0x6397 status=0x81e1 
pc=0x63a5

however, acid says that the Vlong passed in was all zeros.  the code generating 
the
call to _v2d is

        overflow = v > vmax*scale;

where
        uvlong v, vmax;
        double scale;

        v = 0; vmax = 2000; scale =1.;

acid: _v2d:x
_3_ {
_1_ {
        lo      0
        hi      0
}
_2_ {
        lols    0
        loms    0
        hils    0
        hims    0
}
}
acid: stk()
_v2d(x=0x0)+0x87 /sys/src/libc/386/vlrt.c:107
[etc]
_main+0x31 /sys/src/libc/386/main9.s:16
acid: fpr()
F0      0
F1      -Inf
F2      0
F3      0
F4      0
F5      0
F6      0
F7      0
control 0x027f
status  0x0161
tag     0xffff
ip offset       0x00006397
cs selector     0x0023
opcode  0x1920
data operand offset     0x2d48
operand selector        0x001b
acid: regs()
PC      0x000063a5 _v2d+0x87  /sys/src/libc/386/vlrt.c:107
SP      0xdfffedc8 ECODE 0xf01006bd EFLAG 0x00010646
CS      0x00000023 DS    0x0000001b SS  0x0000001b
GS      0xf010001b FS    0x0000001b ES  0x0000001b
TRAP    0x00000010 math coprocessor error
AX      0x00000000 BX   0x00000000 CX   0x00000000 DX   0x00027254
DI      0x00041920 SI   0x0004191c BP   0xdfffed94

- erik

Reply via email to