[Ecls-list] FPE signal catching produces hazardous results under MSVC
Goffioul Michael
goffioul at imec.be
Tue Oct 25 03:13:47 UTC 2005
Hi,
I'm looking for some help, because I'm getting hazardous results when testing
FPE signal catching, and I don't know what I did wrong neither how to solve it.
The attached patch implements FPE catching: it uses normal signal handler except
that there's an additional argument for FPE.
Problems start to appeard after generating a lot of FPE successively. After that,
FPE starts to appear at places where it shouldn't and depending on the previous
operation....?? Here's a session example (see how the (<= (REALPART...)) statement
generates a FPE, sometimes it doesn't):
> (expt most-positive-double-float 2)
#<a FLOATING-POINT-OVERFLOW>
Broken at EXPT.
>> :q
Top level.
> (<= (REALPART (EXPT -8 1/3)) 0.0)
NIL
> (loop repeat 100 collect (ignore-errors (expt most-positive-double-float 2)))
(NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL
NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL
NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL
NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL
NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL
NIL NIL NIL NIL NIL)
> (expt most-positive-double-float 2)
#<a FLOATING-POINT-OVERFLOW>
Broken at EXPT.
>> :q
Top level.
> (<= (REALPART (EXPT -8 1/3)) 0.0)
#<a FLOATING-POINT-OVERFLOW>
Broken at EXPT.
>> :q
Top level.
> (<= (REALPART (EXPT -8 1/3)) 0.0)
NIL
>
Any expert advise would be appreciated.. :-)
Michael.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: msvcfpe.diff.bz2
Type: application/octet-stream
Size: 1770 bytes
Desc: msvcfpe.diff.bz2
URL: <https://mailman.common-lisp.net/pipermail/ecl-devel/attachments/20051025/ffe27069/attachment.obj>
More information about the ecl-devel
mailing list