Re: [Scheme-reports] [scheme-reports-wg2] Re: EQV? on numbers should be based on operational equivalence John Cowan 07 Jun 2012 19:43 UTC

Emmanuel Medernach scripsit:

> Ok, so signaling NaNs are really to be proceeded with care.  Then is it
> advisable to provide them or do we provide only quiet ones ?

According to the IEEE 754 revision committee minutes at
<http://grouper.ieee.org/groups/754/meeting-minutes/02-07-18.html>:

    At this point, we again turned to the troubles of signaling
    NaNs. Hough asked whether we still thought we might use
    signaling NaNs to indicate unknowns; if so, he said, then we
    ought to revisit some of our discussions on negating signaling
    NaNs, for instance. Kahan pointed out that the origin
    of signaling NaNs was a political compromise. There were
    members on the original committee who thought infinity was
    too drastic for overflow and zero too drastic for underflow,
    and so the signaling NaN was proposed as a kludge to allow
    them to implement whatever they wanted. Other people found
    different uses, but not many. The biggest use is to represent
    uninitialized data.

    Zuras asked whether we could just use quiet NaNs for
    uninitialized data. The only operations which are not
    NaN preserving are those which would ignore the operand
    anyhow. Hough argued that uninitialized data is still a
    compelling reason to maintain signaling NaNs. Kahan thought the
    right idea, even if the implementation is difficult, is that
    when signaling NaNs are used as arithmetic operands, they are
    first either replaced with a quiet NaN or they are replaced
    with some quantity determined by the programmer. Kahan then
    repeated Hough's point: if it is to be used for uninitialized
    data, signaling NaNs should generate a signal other than
    "invalid operation."

In my opinion, providing a way to test for signaling NaNs is all we should do.

--
John Cowan  cowan@ccil.org  http://ccil.org/~cowan
If I have seen farther than others, it is because I was standing on
the shoulders of giants.
        --Isaac Newton

_______________________________________________
Scheme-reports mailing list
Scheme-reports@scheme-reports.org
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports