[floats][infinity][C99]

Raymond Toy toy.raymond at gmail.com
Fri Sep 4 17:23:31 UTC 2015


>>>>> "Daniel" == Daniel Kochma <Daniel> writes:

    Daniel> Also, we'll have to define such infinity for each architecture
    Daniel> separately, depending on the endianess?
    >> 
    >> Yes, probably. But you only need to set up MSB/LSB to get the right
    >> thing. I think.  At least that's how fdlibm works and how cmucl
    >> produces it's infinities (in C code).  Of course in Lisp, cmucl has
    >> special builtins to create floats from bits appropriately.  Perhaps
    >> ecl can do something similar. (But there are separate implementations
    >> for each architecture.)

    Daniel> I'd rather avoid that. ECL runs now on number of architectures I have no
    Daniel> access too.

I suspect every arch you care about has 32 (or 64) bit words, and all
floats are IEEE.

So, perhaps it would be easier to create them as you mentioned
earlier via 1/0 and 0/0 or related expressions.

This requires that you be able to turn off exceptions in C, but ecl
can probably already do that.

--
Ray




More information about the ecl-devel mailing list