diff --git a/docs/v2.md b/docs/v2.md index 6f234e827..a8abd401c 100644 --- a/docs/v2.md +++ b/docs/v2.md @@ -67,3 +67,12 @@ to `b(a, c)`, regardless of the types. - [x] Emits warning when used. - [x] Code action to rewrite to desired syntax + +## `-0.0` should not be equal to `0.0` + +On the Erlang target `0.0 == -0.0` is `False`; that is not the case on the +JavaScript target where `0.0` is the same as `-0.0`. + +In Gleam v2 we want to make sure that `0.0` and `-0.0` are not considered equal +on any target. This would mean using `Object.is` when checking equality on the +JavaScript target.