archives

« Bugzilla Issues Index

#3216 — 20.2.2.18 Math.hypot: small issue in the NOTE


The NOTE says:

Implementations should take care to avoid the loss of precision from overflows and underflows that are prone to occur in naive implementations when this function is called with more than two arguments.

Replace "... with more than two arguments." with: "... with at least two arguments.

Indeed, a naive implementation of Math.hypot would overflow on, e.g.,

Math.hypot(Number.MAX_VALUE/7, Number.MAX_VALUE/7)


fixed in rev28 editor's draft


fixed in rev28