BigInt hypot and the nullary case
js-choi opened this issue · comments
Unlike with Math.max
and min
(see #3), the arguments of Math.hypot
cannot mix regular numbers and BigInts.
This means that we have three choices:
- We extend
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.) - We add a new
Math.bigHypot
that handles the nullary-arguments case (throwing a TypeError). (Otherwise, non-integer results truncate, like with BigInt division.) - We don’t support any BigInt
hypot
.
After hearing feedback from TC39 at the prior presentation, my inclination is with the first choice.
Closing. hypot
has now been completely removed due to lack of use cases.
See #13 (comment) and #14 (comment).