on Mon Apr 25 2016, Stephen Canon <[email protected]> wrote:

>     On Apr 24, 2016, at 6:08 PM, Xiaodi Wu via swift-evolution
>     <[email protected]> wrote:
>
>     Something else to consider if you insist that all floating point values 
> must
>     be "orderable" would be how two NaNs are ordered if they have different
>     payloads. As far as I'm aware, that goes beyond what IEEE 754 has to say
>     about total ordering of floating point values.
>
> The IEEE 754 totalOrder predicate is an honest-to-god total order on all
> canonical members of a format (this includes ordering all NaNs by sign,
> signalingness, and payload).

And that, almost by itself, is enough justification for us to use this
ordering for the result of <=> on floats.  The fact that this ordering
is consistent with the results of < (for values that are ordered with
respect to <) is a bonus.

-- 
Dave

_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to