Fork me on GitHub
#clojure-czech
<
2022-06-16
>
jumar09:06:30

Thanks, not= behavior really surprised me althought I was well aware of gotcha with (= ##NaN ##NaN)

jumar09:06:44

I looked at https://clojure.org/guides/equality#_floating_point_not_a_number I didn't find an explanation for not= 's behavior (or I didn't pay enough attention)

jumar11:06:53

So the answer is probably inlining (that's why = works as expected) and this one is interesting too:

(math/sqrt -2)
;; => ##NaN

(not= (math/sqrt -2) (math/sqrt -2))
;; => true