Skip to content

Use Object.is instead of === to implement phys_equal #1372

Open
@TyOverby

Description

@TyOverby

There are a few places where the behavior of phys_equal differ between native OCaml and Jsoo:

a b native jsoo
NaN NaN true false
0.0 -0.0 false true

The (relatively) new Object.is function implements those comparisons "correctly":
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions