[Ecls-list] [PATCH] Improve floating-point exception handling.

Juan Jose Garcia-Ripoll juanjose.garciaripoll at googlemail.com
Tue Jun 2 14:53:35 UTC 2009


On Tue, Jun 2, 2009 at 4:31 PM, Gabriel Dos Reis
<gdr at integrable-solutions.net> wrote:
> Again, I never made a wish that ECL does not implement CL spec.  All
> I suggested was a way for ECL to let people shoot themselves (from CL
> spec perspective) with IEEE-754 semantics if they wanted to.  I suspect
> that can only contribute to the useful of ECL.

Sure. What I have been wondering all the time is whether the
introduction of these types can be done without breaking other
assumptions (behavior under EQ, EQL, etc, hashing, printing, reading,
etc).

> SBCL lets people construct NaNs, and starts being annoying only when
> some operations are non-sensical (and rightly so).  For example,
> SBCL lets me constructs infinities or NaNs through FFI without getting
> mad -- unlike CLISP which I've stopped recommending for building OpenAxiom.
> My hope is that ECL does not take the CLISP path on this.

Along the line of what I mentioned before, one thing that bothers me
is that NaNs are not unique and yet they probably compare true through
C's. We already had a problem with negative zeros which was pretty
similar, but seems it was solved by CMUCL people with a clever
understanding of how interval types should behave.

Ok, so to get things more or less right, these are the questions that
pop out of my head

- One or more NaNs?
- Behavior under EQ, EQL, EQUAL, ==? NaNs are not numerically equal,
not even to themselves, yet one would expect (EQ x x) = T for all lisp
objects.
- Do +-Infs fit in the interval type system?
- What about NaNs? They are probably (AND FLOAT (NOT (FLOAT * *))) but
only if Infs can be written as intervals, which I doubt.
- Hashing is probably determined by point 2
- If NaNs are not always equal, not even to themselves, then we can
probably print them using #. followed by a constant name or some
function.
- Same would probably apply to +-Inf.

Juanjo

-- 
Instituto de Física Fundamental, CSIC
c/ Serrano, 113b, Madrid 28006 (Spain)
http://juanjose.garciaripoll.googlepages.com




More information about the ecl-devel mailing list