W3C home > Mailing lists > Public > public-html-diffs@w3.org > February 2009

spec/Overview.html 1.1901 2731 Floats: Allow '1e+0' syntax. Require it

From: poot <cvsmail@w3.org>
Date: Sun, 1 Feb 2009 17:34:07 +0900 (JST)
To: public-html-diffs@w3.org
Message-Id: <20090201083407.EF0A22BC45@toro.w3.mag.keio.ac.jp>

Floats: Allow '1e+0' syntax. Require it for serialising floating point
numbers. Other editorial fixes. (whatwg r2731)

4.10.4.1.13 Range state
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1901.html#range-state
rules for parsing floating point number values
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1901.html#rules-for-parsing-floating-point-number-values
limited to only positive non-zero numbers
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1901.html#limited-to-only-positive-non-zero-numbers
2.4.3.3 Real numbers
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1901.html#real-numbers
4.10.4.1.12 Number state
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1901.html#number-state
best representation of the floating point number
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1901.html#best-representation-of-the-floating-point-number
2.5.3 Resolving URLs
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1901.html#resolving-urls

http://people.w3.org/mike/diffs/html5/spec/Overview.diff.html
http://dev.w3.org/cvsweb/html5/spec/Overview.html?r1=1.1900&r2=1.1901&f=h
http://html5.org/tools/web-apps-tracker?from=2730&to=2731

===================================================================
RCS file: /sources/public/html5/spec/Overview.html,v
retrieving revision 1.1900
retrieving revision 1.1901
diff -u -d -r1.1900 -r1.1901
--- Overview.html	1 Feb 2009 05:23:50 -0000	1.1900
+++ Overview.html	1 Feb 2009 08:31:07 -0000	1.1901
@@ -1815,7 +1815,8 @@
     <ol><li>Either a U+0065 LATIN SMALL LETTER E character or a U+0045
      LATIN CAPITAL LETTER E character.</li>
 
-     <li>Optionally, a U+002D HYPHEN-MINUS ("-") character.</li>
+     <li>Optionally, a U+002D HYPHEN-MINUS ("-") character or U+002B
+     PLUS SIGN ("+") character.</li>
 
      <li>A series of characters in the range U+0030 DIGIT ZERO (0) to
      U+0039 DIGIT NINE (9).</li>
@@ -1831,8 +1832,13 @@
   HYPHEN-MINUS ("-") character and the number is not zero), and where
   the exponent is the number after the E, if any (interpreted as a
   negative number if there is a U+002D HYPHEN-MINUS ("-") character
-  between the E and the number and the number is not zero). If there
-  is no E, then the exponent is treated as zero.<p>The <dfn id=rules-for-parsing-floating-point-number-values>rules for parsing floating point number values</dfn> are
+  between the E and the number and the number is not zero, or else
+  ignoring a U+002B PLUS SIGN ("+") character between the E and the
+  number if there is one). If there is no E, then the exponent is
+  treated as zero.<p class=note>The values &plusmn;Infinity and NaN are not <a href=#valid-floating-point-number title="valid floating point number">valid floating point
+  numbers</a>.<p>The <dfn id=best-representation-of-the-floating-point-number>best representation of the floating point number</dfn>
+  <var title="">n</var> is the string obtained from applying the
+  ECMAScript operator ToString to <var title="">n</var>.<p>The <dfn id=rules-for-parsing-floating-point-number-values>rules for parsing floating point number values</dfn> are
   as given in the following algorithm. As with the previous
   algorithms, when this one is invoked, the steps must be followed in
   the order given, aborting at the first step that returns
@@ -1931,6 +1937,14 @@
 
        <li><p>If <var title="">position</var> is past the end of <var title="">input</var>, then return <var title="">value</var>.</li>
 
+      </ol><p>Otherwise, if the character indicated by <var title="">position</var> is a U+002B PLUS SIGN ("+")
+      character:</p>
+
+      <ol><li>Advance <var title="">position</var> to the next
+       character.</li>
+
+       <li><p>If <var title="">position</var> is past the end of <var title="">input</var>, then return <var title="">value</var>.</li>
+
       </ol></li>
 
      <li><p>If the character indicated by <var title="">position</var>
@@ -3372,7 +3386,7 @@
     the element</i>, as defined by the XML Base specification, with
     <i>the base URI of the document entity</i> being defined as the
     <a href=#document-base-url>document base URL</a> of the <code>Document</code> that
-    owns the element.</p>
+    owns the element. <a href=#references>[XMLBASE]</a></p>
 
     <p>For the purposes of the XML Base specification, user agents
     must act as if all <code>Document</code> objects represented XML
@@ -4442,10 +4456,10 @@
   returned. If, on the other hand, it fails or returns an out of range
   value, or if the attribute is absent, the default value must be
   returned instead, or 0.0 if there is no default value. On setting,
-  the given value must be converted to the shortest possible string
-  representing the number as a <a href=#valid-floating-point-number>valid floating point
-  number</a> in base ten and then that string must be used as the
-  new content attribute value.<p>If a reflecting DOM attribute is of the type
+  the given value must be converted to the <a href=#best-representation-of-the-floating-point-number>best representation
+  of the floating point number</a> and then that string must be
+  used as the new content attribute value.<p class=note>The values &plusmn;Infinity and NaN throw an
+  exception on setting, as defined by WebIDL. <a href=#references>[WEBIDL]</a><p>If a reflecting DOM attribute is of the type
   <code><a href=#domtokenlist-0>DOMTokenList</a></code>, then on getting it must return a
   <code><a href=#domtokenlist-0>DOMTokenList</a></code> object whose underlying string is the
   element's corresponding content attribute. When the
@@ -21614,9 +21628,9 @@
   number values</a> to it. User agents must not allow the user to
   set the <a href=#concept-fe-value title=concept-fe-value>value</a> to a string that
   is not a <a href=#valid-floating-point-number>valid floating point number</a>. If the user agent
-  provides a user interface for selecting a number, then the <a href=#concept-fe-value title=concept-fe-value>value</a> must be set to a <a href=#valid-floating-point-number>valid
-  floating point number</a> representing the user's selection. User
-  agents should allow the user to set the <a href=#concept-fe-value title=concept-fe-value>value</a> to the empty string.<p>The <code title=attr-input-value><a href=#attr-input-value>value</a></code> attribute, if
+  provides a user interface for selecting a number, then the <a href=#concept-fe-value title=concept-fe-value>value</a> must be set to the <a href=#best-representation-of-the-floating-point-number>best
+  representation of the floating point number</a> representing the
+  user's selection. User agents should allow the user to set the <a href=#concept-fe-value title=concept-fe-value>value</a> to the empty string.<p>The <code title=attr-input-value><a href=#attr-input-value>value</a></code> attribute, if
   specified, must have a value that is a <a href=#valid-floating-point-number>valid floating point
   number</a>.</p><!-- ok to set out-of-range value, we never know
   when we might have to represent bogus input --><p><strong>The <a href=#value-sanitization-algorithm>value sanitization algorithm</a> is as
@@ -21701,9 +21715,10 @@
   number values</a> to it. User agents must not allow the user to
   set the <a href=#concept-fe-value title=concept-fe-value>value</a> to a string that
   is not a <a href=#valid-floating-point-number>valid floating point number</a>. If the user agent
-  provides a user interface for selecting a number, then the <a href=#concept-fe-value title=concept-fe-value>value</a> must be set to a <a href=#valid-floating-point-number>valid
-  floating point number</a> representing the user's selection. User
-  agents must not allow the user to set the <a href=#concept-fe-value title=concept-fe-value>value</a> to the empty string.<p>The <code title=attr-input-value><a href=#attr-input-value>value</a></code> attribute, if
+  provides a user interface for selecting a number, then the <a href=#concept-fe-value title=concept-fe-value>value</a> must be set to a <a href=#best-representation-of-the-floating-point-number>best
+  representation of the floating point number</a> representing the
+  user's selection. User agents must not allow the user to set the
+  <a href=#concept-fe-value title=concept-fe-value>value</a> to the empty string.<p>The <code title=attr-input-value><a href=#attr-input-value>value</a></code> attribute, if
   specified, must have a value that is a <a href=#valid-floating-point-number>valid floating point
   number</a>.</p><!-- ok to set out-of-range value, we never know
   when we might have to represent bogus input --><p><strong>The <a href=#value-sanitization-algorithm>value sanitization algorithm</a> is as
Received on Sunday, 1 February 2009 08:34:43 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Saturday, 18 December 2010 06:13:58 GMT