Re: [cmucl-help] NaN

Raymond Toy <[email protected]> Thu, 12 Jan 2017 07:47:46 -0800
Newsgroups gmane.lisp.cmucl.devel
Message-ID <[email protected]>
>>>>> "Marco" == Marco Antoniotti <[email protected]> writes:

    >> On Jan 11, 2017, at 17:14 , Raymond Toy <[email protected]> wrote:
    >> 
    >>>>>>> "james" == james anderson <[email protected]> writes:
    >> 
    james> good morning;
    >>>> On 2017-01-11, at 09:48, Marco Antoniotti <[email protected]> wrote:
    >>>> 
    >>>> Thank you James, thank you Stelian.
    >>>> 
    >>>> The CFFI solution seems very interesting and the codec James pointed me to are also useful.
    >> 
    james> i sent marco an off-line note, in which i had pointed out some code which figures (among other things) in an amqp implementation, where it is figures in buffer codecs.
    james> for the curious, it is to be found here:
    >> 
    james> https://github.com/lisp/de.setf.utility/tree/master/codecs/float-codecs.lisp
    >> 
    >> This is also pretty nice and mostly portable.  I think with a bit of
    >> work it can be made (almost) completely portable using just CL
    >> functions.  I guess the main problem is constructing infinities.
    >> Testing for NaN is pretty easy:  (= x x) is always false if x is NaN.

    Marco> Do you have an idea about how to go ahead and construct infinities?

In pure CL?  No, I don't know of any way to do that.  Besides, support
for infinities isn't required. I don't think clisp can handle
infinities (or NaNs?).

At best, the CL implementation has a way to do it, or you can use
cffi.

--
Ray

_______________________________________________
cmucl-imp mailing list
[email protected]
https://lists.zs64.net/mailman/listinfo/cmucl-imp