[cmucl-imp] [cmucl-help] NaN

Raymond Toy toy.raymond at gmail.com
Mon Jan 9 16:16:44 UTC 2017


>>>>> "Marco" == Marco Antoniotti <marcoxa at cs.nyu.edu> writes:

    Marco> Hi Ray
    Marco> maybe we can just have this discussion here.

    Marco> I am not a person who knows all that much about the IEEE fine details, but I would like to have a “higher level” portable API to access IEEE NaNs, infinities, and rounding modes.  I am kind of familiar with the C99 API.

    Marco> Would you like to have an API consisting of something like (given a package “M”, not its real name) the following?  Assuming all “quiet” NaNs.

    Marco> Parameter NaN

    Marco> Constant <float-length>-float-positive-infinity
    Marco> Constant <float-length>-float-negative-infinity

    Marco> Type rounding-mode (member :positive :negative :toward-zero :to-nearest)

    Marco> Struct floating-point-configuration

What does that mean?

    Marco> Function current-floating-point-configuration
    Marco> Function (setf current-floating-point-configuration)

    Marco> Macro with-floating-point-configuration

    Marco> Function current-rounding-mode
    Marco> Function (setf current-rounding-mode)

    Marco> Macro with-rounding-mode

Coincidentally, I was looking at ieeefp-tests
(https://gitlab.common-lisp.net/ieeefp-tests/ieeefp-tests) last
night. It might satisfy your needs because it provides at least some
of the things you're looking for.  And it looks like it abcl, cmucl,
and sbcl.  Not bad.

I'm curious, though.  Can you explain your use case for having such an
interface?

--
Ray



More information about the cmucl-imp mailing list