Avatar
調べてみたら似たようなのありますね。 https://forums.swift.org/t/rationalizing-floatingpoint-conformance-to-equatable/6861 a == aのケースについて話されてるかはこれから読みます。
Ben Cohen asked to continue this conversation on swift-dev-- Included in PR #12503 is a small tweak to accommodate so-called "exceptional values" (such as NaN) in comparisons of array equality. Currently, Array.== first looks to referential equality of underlying buffer...
8:27 AM
Currently, Array.== first looks to referential equality of underlying
buffers, then (if false) compares elementwise equivalence as defined by Element.==. As a consequence, an array of NaN compares equal to another array of NaN if they share the same buffer, but otherwise false. This is an undesirable outcome. 頭から書いてあった🙃
👌 1