[swift-evolution] [Draft][Proposal] Formalized Ordering

Pyry Jahkola pyry.jahkola at iki.fi
Fri Jul 22 15:12:28 CDT 2016


Xiaodi Wu wrote:

> I just assumed that the core team's vision was that this would be addressed by a domain-specific floating point `areSame(a: Self, b: Self) -> Bool { return (a == 0 && b == 0) || (a <=> b) == .same }`. This is a valid equivalence relation afaik.

I guess so, but it's a different from what Dmitri gave here:

>> 7. What, in fact, is the proposed total order for the stdlib's floating-point types?
> 
> The IEEE 754 definition.
> 
> https://github.com/apple/swift/blob/f318fe853d7898246db24d501f1ddc03c9eb8651/stdlib/public/core/FloatingPoint.swift.gyb#L855

— Pyry

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160722/8c2b880c/attachment.html>


More information about the swift-evolution mailing list