[swift-evolution] [Idea] Bringing the partial/total ordering distinction into Comparable

Stephen Canon scanon at apple.com
Mon Apr 25 10:12:01 CDT 2016

> On Apr 24, 2016, at 6:08 PM, Xiaodi Wu via swift-evolution <swift-evolution at swift.org> 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).

– Steve

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160425/39a9c394/attachment.html>

More information about the swift-evolution mailing list