<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Oct 18, 2017, at 5:28 AM, Ole Begemann via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">It also seems to clash with<span class="Apple-converted-space">&nbsp;</span></span><a href="https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20171016/040544.html" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class="">Michael's idea</a><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class=""><span class="Apple-converted-space">&nbsp;</span>that two substitutable sequences should return true for ==.</span></div></blockquote></div><br class=""><div class="">This is a bug in Float’s implementation of Equatable, rather than a bug in Array. So long as all the elements of Array are correct wrt all the requirements of ==, then the performance optimization that compares buffer pointers shouldn’t have correctness issues like this.</div><div class=""><br class=""></div><div class="">But Float fails to adhere to those rules – specifically reflexivity, because for `let f = 0.0/0.0`, `f == f` returns `false`.</div><div class=""><br class=""></div><div class="">This is the motivation behind the FP part of this proposal for Swift 4, which probably needs another go-around for Swift 5:</div><div class=""><a href="https://github.com/airspeedswift/swift-evolution/blob/fa007138a54895e94d22e053122ca24ffa0b2eeb/proposals/NNNN-ComparisonReform.md" class="">https://github.com/airspeedswift/swift-evolution/blob/fa007138a54895e94d22e053122ca24ffa0b2eeb/proposals/NNNN-ComparisonReform.md</a></div><div class=""><br class=""></div><div class="">(For which I’ll open a new thread, as this one’s plenty long already :)</div><div class=""><br class=""></div></body></html>