-
Notifications
You must be signed in to change notification settings - Fork 2
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
BigInt hypot and the nullary case #6
Comments
js-choi
added a commit
that referenced
this issue
Sep 3, 2021
js-choi
added a commit
that referenced
this issue
Sep 3, 2021
js-choi
added a commit
that referenced
this issue
Sep 3, 2021
js-choi
added a commit
that referenced
this issue
Sep 3, 2021
Closing. See #13 (comment) and #14 (comment). |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Unlike with
Math.max
andmin
(see #3), the arguments ofMath.hypot
cannot mix regular numbers and BigInts.This means that we have three choices:
Math.hypot
to accept BigInt arguments.Math.hypot()
with no arguments remains+0
the regular number. We are okay withMath.hypot(...arrOfBigInts)
returning+0
wheneverarrOfBigInts
is empty. (Otherwise, non-integer results truncate, like with BigInt division.)Math.bigHypot
that handles the nullary-arguments case (throwing a TypeError). (Otherwise, non-integer results truncate, like with BigInt division.)hypot
.After hearing feedback from TC39 at the prior presentation, my inclination is with the first choice.
The text was updated successfully, but these errors were encountered: