decoding nans etc



>>>>> "Robert" == Robert Dodier <robert.dodier at gmail.com> writes:

    Robert> On 8/29/06, Richard Fateman <fateman at cs.berkeley.edu> wrote:
    >> See the file http://www.cs.berkeley.edu/~fateman/temp/decode-floats.lisp

    Robert> Thanks for posting this file. It seems to work as intended
    Robert> for SBCL but Clisp and GCL complain (with a runtime error)
    Robert> about the float / array punning. Sigh. I don't often wish that

That code was inherently unportable anyway....

    Robert> Maxima were written in C but this is one of those days ....

Alternatively, we can ask each Lisp to support 3 functions:

        double-float-high-bits
        double-float-low-bits
        make-double-float

The first two extract the high and low 32-bit chunks from a float, and
the third creates a double-float from the 2 chunks.  Then we can do
whatever we want, without gross type punning.  CMUCL and SBCL already
have such functions.  Would be pretty easy to add to GCL and Clisp if
they don't already have equivalents.  Likewise for Allegro and/or
openmcl. 

Ray