W3C home > Mailing lists > Public > public-html-bugzilla@w3.org > October 2009

[Bug 8047] Reflecting floats: The rules for parsing floating point number values return an unlimited-precision (finite in base 10) number. How is it converted to limited-precision IDL attribute types? In particular, what rounding mode is used? and do very large valu

From: <bugzilla@wiggum.w3.org>
Date: Tue, 27 Oct 2009 14:36:55 +0000
To: public-html-bugzilla@w3.org
Message-Id: <E1N2nAN-0003JG-AV@wiggum.w3.org>

Philip Taylor <excors@gmail.com> changed:

           What    |Removed                     |Added
             Status|RESOLVED                    |CLOSED

--- Comment #6 from Philip Taylor <excors@gmail.com>  2009-10-27 14:36:54 ---
My original doubt was about numbers like 1 + 2^-53:


where a perturbation in the final digit can change whether the closest
(double-precision) number is 1.0 or 1.0+epsilon. ECMAScript explicitly
truncates strings to 20 significant digits before rounding, so implementations
don't have to (but may) examine an unlimited number of characters.

However, it looks like most browser JS implementations do examine every digit
when parsing numbers. (Only IE and Opera-on-Linux appear to truncate.)

So it seems the truncation behaviour is not necessary, and what HTML5 currently
defines is reasonable and implementable, as far as I can tell. Implementors can
complain if they don't like it. (And in practice it only matters in crazy edge
cases anyway.)

Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
Received on Tuesday, 27 October 2009 14:36:56 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 16:30:41 UTC