Just Launched: You can now import projects and releases from Google Code onto SourceForge
We are excited to release new functionality to enable a 1-click import from Google Code onto the Allura platform on SourceForge. You can import tickets, wikis, source, releases, and more with a few simple steps. Read More
From: Tamas K Papp <tkpapp@gm...> - 2009-12-28 14:22:59
I am calling a foreign function (LAPACK's ZHEEVR) from SBCL using
CFFI. Sometimes it signals a floating point exception, namely
DIVISION-BY-ZERO. Which is to be expected: the documentation of
ZHEEVR  says that
ZHEEVR calls ZSTEMR when the full spectrum is requested on machines
which conform to the ieee-754 floating point standard. ZHEEVR calls
DSTEBZ and ZSTEIN on non-ieee machines and when partial spectrum
requests are made.
Normal execution of ZSTEMR may create NaNs and infinities and hence
may abort due to a floating point exception in environments which do
not handle NaNs and infinities in the ieee standard default manner.
But in SBCL,
(:TRAPS NIL :ROUNDING-MODE :NEAREST :CURRENT-EXCEPTIONS (:INEXACT)
:ACCRUED-EXCEPTIONS (:INEXACT) :FAST-MODE NIL :PRECISION :53-BIT)
so as far as I understand, no traps should be set. So is there a way
to avoid the DIVISION-BY-ZERO, ie let the function proceed to its end?