ECL currently follows two different strategies for handling errors in numerical computations<div><br></div><div>* The tough and inexpensive one, which is to activate hardware exceptions and let the code run (Linux, Windows)</div>
<div><br></div><div>* The portable one, using feclearexcept/fetestexcept, synchronously checking whether a numerical computation failed, right beside the code that could make it fail.</div><div><br></div><div>Even though performance may be interesting, I am more and more convinced that the second approach is the future-proof one. One reason is that we can then forget about asynchronous, uncontrolled FPE and interruptions. The other one is that we know better where errors happen and can have signaling and non-signaling versions of the same function.</div>
<div><br></div><div>While I have not yet decided whether to impose the second model on other platforms, I have managed to inline by hand the feclearexcept/fetestexcept code in OS X/64bits, achieving a 50%-70% reduction in computation time. Interestingly, no platform, not even Linux, seems to be inlining these functions right now -- perhaps another reason not to follow the C99 path :-/</div>
<div><br></div><div>Juanjo<br clear="all"><br>-- <br>Instituto de Física Fundamental, CSIC<br>c/ Serrano, 113b, Madrid 28006 (Spain) <br><a href="http://juanjose.garciaripoll.googlepages.com">http://juanjose.garciaripoll.googlepages.com</a><br>
</div>