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

Math.abs(-0) should be 0 #4

Open
deian opened this issue Feb 16, 2020 · 0 comments
Open

Math.abs(-0) should be 0 #4

deian opened this issue Feb 16, 2020 · 0 comments

Comments

@deian
Copy link

deian commented Feb 16, 2020

Hi all, Great stuff. I think there is a bug in Math.abs:

Math.abs = function (x) {
x = @ToNumber(x);
if (x < 0)
return -x;
else
return x;
};

According to the spec, abs of -0 should be 0 not 0.

@deian deian changed the title Math.abs(-0) should be -0 Math.abs(-0) should be 0 Feb 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant