« Bugzilla Issues Index
#2604 — 7.1.11: incorrect rounding behaviour
- bug_id:
2604
- creation_ts:
2014-04-06 18:36:00 -0700
- short_desc:
7.1.11: incorrect rounding behaviour
- delta_ts:
2014-06-16 15:58:00 -0700
- product:
Draft for 6th Edition
- component:
technical issue
- version:
Rev 23: April 5, 2014 Draft
- rep_platform:
All
- op_sys:
All
- bug_status:
RESOLVED
- resolution:
FIXED
- priority:
Normal
- bug_severity:
normal
- everconfirmed:
true
- reporter:
qantas94heavy
- assigned_to:
Allen Wirfs-Brock
- commentid:
7610
- comment_count:
0
- who:
qantas94heavy
- bug_when:
2014-04-06 18:36:59 -0700
Currently, ToUint8Clamp is specified to round numbers up if the number is halfway between two integers:
> 6. Let f be floor(number).
> 7. If f+0.5 ≤ number, then return f+1.
This is inconsistent with the WebIDL specification (referenced by the Khronos Typed Array specification):
> 1. Round x to the nearest integer, choosing the even integer if it lies halfway between two.
> 2. Set x to min(max(x, 0), 2^8 − 1).
> 3. Return the IDL octet value that represents the same numeric value as x.
- commentid:
7795
- comment_count:
1
- who:
Allen Wirfs-Brock
- bug_when:
2014-04-17 12:42:33 -0700
fixed in rev24 editor's draft
- commentid:
8161
- comment_count:
2
- who:
Allen Wirfs-Brock
- bug_when:
2014-05-06 15:15:34 -0700
fixed in rev24
- commentid:
8507
- comment_count:
3
- who:
Allen Wirfs-Brock
- bug_when:
2014-05-15 12:36:28 -0700
actually, still not right in rev24. It needs to do "round half to even" tie-breaking.
- commentid:
8508
- comment_count:
4
- who:
Allen Wirfs-Brock
- bug_when:
2014-05-15 12:37:06 -0700
Fixed in rev25 editor's draft
- commentid:
9003
- comment_count:
5
- who:
Allen Wirfs-Brock
- bug_when:
2014-06-16 15:58:00 -0700
fixed in rev25 editor's draft