« Bugzilla Issues Index
#3216 — 20.2.2.18 Math.hypot: small issue in the NOTE
- bug_id:
3216
- creation_ts:
2014-09-09 13:28:00 -0700
- short_desc:
20.2.2.18 Math.hypot: small issue in the NOTE
- delta_ts:
2014-10-14 15:17:55 -0700
- product:
Draft for 6th Edition
- component:
editorial issue
- version:
Rev 27: August 24, 2014 Draft
- rep_platform:
All
- op_sys:
All
- bug_status:
RESOLVED
- resolution:
FIXED
- priority:
Normal
- bug_severity:
minor
- everconfirmed:
true
- reporter:
Claude Pache
- assigned_to:
Allen Wirfs-Brock
- commentid:
10175
- comment_count:
0
- who:
Claude Pache
- bug_when:
2014-09-09 13:28:25 -0700
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)
- commentid:
10226
- comment_count:
1
- who:
Allen Wirfs-Brock
- bug_when:
2014-09-21 11:18:35 -0700
fixed in rev28 editor's draft
- commentid:
10444
- comment_count:
2
- who:
Allen Wirfs-Brock
- bug_when:
2014-10-14 15:17:55 -0700
fixed in rev28