Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
TyOverby opened this issue Dec 30, 2022 · 0 comments · May be fixed by #1410
Open

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

TyOverby opened this issue Dec 30, 2022 · 0 comments · May be fixed by #1410

Comments

@TyOverby
Copy link
Collaborator

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

@hhugo hhugo linked a pull request Feb 18, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant