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

Inconsistency between specification definition of Math.hypot and engine implementations #2425

Closed
IdanHo opened this issue Jun 5, 2021 · 1 comment · Fixed by #2426
Closed

Comments

@IdanHo
Copy link

IdanHo commented Jun 5, 2021

Description: The psuedo code implementation provided in the latest specification https://tc39.es/ecma262/#sec-math.hypot returns NaN for the following evaluation: Math.hypot(NaN, Infinity), while the 2020 specification (and as a result, js engines) returns Infinity in any call to Math.hypot that includes Infinity as an argument.

@bakkot
Copy link
Contributor

bakkot commented Jun 5, 2021

Nice catch! This was introduced in #2122 and not quite fixed in #2172.

Opened a PR to fix at #2426.

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

Successfully merging a pull request may close this issue.

2 participants