[Ecls-list] FPE signal catching produces hazardous results under MSVC From: Goffioul Michael - 2005-10-25 10:10 ```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 (<=3D = (REALPART...)) statement generates a FPE, sometimes it doesn't): > (expt most-positive-double-float 2) # Broken at EXPT. >> :q Top level. > (<=3D (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) # Broken at EXPT. >> :q Top level. > (<=3D (REALPART (EXPT -8 1/3)) 0.0) # Broken at EXPT. >> :q Top level. > (<=3D (REALPART (EXPT -8 1/3)) 0.0) NIL > Any expert advise would be appreciated.. :-) Michael. ```
 Re: [Ecls-list] FPE signal catching produces hazardous results under MSVC From: Juan Jose Garcia Ripoll - 2005-10-25 11:22 ```On Tue, 2005-10-25 at 12:08 +0200, Goffioul Michael wrote: > 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): I do not know if this is related, but the processor has other exceptions, such as FPE_INEXACT, and when I activated it, I got lots of errors due to the compiler generating comparisons between floats and doubles. Can it be that the control word bits for FPE_INEXACT get set? Juanjo ```