News for hackers. Stuff that matters.
Re:In Erlang/OTP 27, +0.0 will no longer be exactly equal to... by shultays on Wednesday May 10, 2023 @02:13AM (#35884226)
It is not about being very close. IEEE says "Comparisons shall ignore the sign of zero" and erlang (or rather CPU instructions erlang outputs for float == float) respects that

While =:= is not something mandated by IEEE. Erlang implements such an operator on floats and it decides to compare false for 0.0 & -0.0. So it compare bits/does integer comparisons on same data

Re:In Erlang/OTP 27, +0.0 will no longer be exactly equal to... by bee_rider on Wednesday May 10, 2023 @08:59AM (#35886683)
Ah, so == is compliant, and =:= is extra. Makes sense!