Skip to content

Commit

Permalink
[e] (0) Make the 'best representation of a floating point number' stu…
Browse files Browse the repository at this point in the history
…ff actually make a modicum of sense.

Fixing http://www.w3.org/Bugs/Public/show_bug.cgi?id=8010

git-svn-id: http://svn.whatwg.org/webapps@4299 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Oct 23, 2009
1 parent f633020 commit 5b98ab8
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 38 deletions.
27 changes: 14 additions & 13 deletions complete.html
Original file line number Diff line number Diff line change
Expand Up @@ -2942,9 +2942,9 @@ <h5 id=real-numbers><span class=secno>2.4.4.3 </span>Real numbers</h5>

<div class=impl>

<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
JavaScript operator ToString to <var title="">n</var>.</p>
<p>The <dfn id=best-representation-of-the-number-as-a-floating-point-number title="best representation of the number as a floating
point number">best representation of the number <var title="">n</var> as a floating point number</dfn> is the string
obtained from applying the JavaScript operator ToString to <var title="">n</var>.</p>

<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. This algorithm must be aborted
Expand Down Expand Up @@ -5585,9 +5585,9 @@ <h4 id=reflecting-content-attributes-in-idl-attributes><span class=secno>2.7.1 <
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 <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>
the given value must be converted to the <a href=#best-representation-of-the-number-as-a-floating-point-number>best representation
of the number as a floating point number</a> and then that string
must be used as the new content attribute value.</p>

<p class=note>The values Infinity and Not-a-Number (NaN) values
throw an exception on setting, as <a href=#float-nan>defined
Expand Down Expand Up @@ -34411,9 +34411,10 @@ <h6 id=number-state><span class=secno>4.10.5.1.13 </span><dfn title=attr-input-t
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 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>
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-number-as-a-floating-point-number title="best representation of the number as a floating point
number">best representation of the number representing the user's
selection as a floating point number</a>. 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>

</div>

Expand Down Expand Up @@ -34545,10 +34546,10 @@ <h6 id=range-state><span class=secno>4.10.5.1.14 </span><dfn title=attr-input-ty
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=#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>
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-number-as-a-floating-point-number title="best representation of the number as a floating point
number">best representation of the number representing the user's
selection as a floating point number</a>. 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>

</div>

Expand Down
27 changes: 14 additions & 13 deletions index
Original file line number Diff line number Diff line change
Expand Up @@ -2752,9 +2752,9 @@ a.setAttribute('href', 'http://example.com/'); // change the content attribute d

<div class=impl>

<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
JavaScript operator ToString to <var title="">n</var>.</p>
<p>The <dfn id=best-representation-of-the-number-as-a-floating-point-number title="best representation of the number as a floating
point number">best representation of the number <var title="">n</var> as a floating point number</dfn> is the string
obtained from applying the JavaScript operator ToString to <var title="">n</var>.</p>

<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. This algorithm must be aborted
Expand Down Expand Up @@ -5395,9 +5395,9 @@ a.setAttribute('href', 'http://example.com/'); // change the content attribute d
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 <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>
the given value must be converted to the <a href=#best-representation-of-the-number-as-a-floating-point-number>best representation
of the number as a floating point number</a> and then that string
must be used as the new content attribute value.</p>

<p class=note>The values Infinity and Not-a-Number (NaN) values
throw an exception on setting, as <a href=#float-nan>defined
Expand Down Expand Up @@ -34221,9 +34221,10 @@ interface <dfn id=htmlformelement>HTMLFormElement</dfn> : <a href=#htmlelement>H
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 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>
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-number-as-a-floating-point-number title="best representation of the number as a floating point
number">best representation of the number representing the user's
selection as a floating point number</a>. 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>

</div>

Expand Down Expand Up @@ -34355,10 +34356,10 @@ interface <dfn id=htmlformelement>HTMLFormElement</dfn> : <a href=#htmlelement>H
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=#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>
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-number-as-a-floating-point-number title="best representation of the number as a floating point
number">best representation of the number representing the user's
selection as a floating point number</a>. 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>

</div>

Expand Down
30 changes: 18 additions & 12 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -1866,9 +1866,11 @@ a.setAttribute('href', 'http://example.com/'); // change the content attribute d

<div class="impl">

<p>The <dfn>best representation of the floating point number</dfn>
<var title="">n</var> is the string obtained from applying the
JavaScript operator ToString to <var title="">n</var>.</p>
<p>The <dfn title="best representation of the number as a floating
point number">best representation of the number <var
title="">n</var> as a floating point number</dfn> is the string
obtained from applying the JavaScript operator ToString to <var
title="">n</var>.</p>

<p>The <dfn>rules for parsing floating point number values</dfn> are
as given in the following algorithm. This algorithm must be aborted
Expand Down Expand Up @@ -5105,8 +5107,8 @@ a.setAttribute('href', 'http://example.com/'); // change the content attribute d
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 <span>best representation
of the floating point number</span> and then that string must be
used as the new content attribute value.</p>
of the number as a floating point number</span> and then that string
must be used as the new content attribute value.</p>

<p class="note">The values Infinity and Not-a-Number (NaN) values
throw an exception on setting, as <a href="#float-nan">defined
Expand Down Expand Up @@ -38038,9 +38040,11 @@ interface <dfn>HTMLFormElement</dfn> : <span>HTMLElement</span> {
set the <span title="concept-fe-value">value</span> to a string that
is not a <span>valid floating point number</span>. If the user agent
provides a user interface for selecting a number, then the <span
title="concept-fe-value">value</span> must be set to the <span>best
representation of the floating point number</span> representing the
user's selection. User agents should allow the user to set the <span
title="concept-fe-value">value</span> must be set to the <span
title="best representation of the number as a floating point
number">best representation of the number representing the user's
selection as a floating point number</span>. User agents should
allow the user to set the <span
title="concept-fe-value">value</span> to the empty string.</p>

</div>
Expand Down Expand Up @@ -38184,10 +38188,12 @@ interface <dfn>HTMLFormElement</dfn> : <span>HTMLElement</span> {
set the <span title="concept-fe-value">value</span> to a string that
is not a <span>valid floating point number</span>. If the user agent
provides a user interface for selecting a number, then the <span
title="concept-fe-value">value</span> must be set to a <span>best
representation of the floating point number</span> representing the
user's selection. User agents must not allow the user to set the
<span title="concept-fe-value">value</span> to the empty string.</p>
title="concept-fe-value">value</span> must be set to a <span
title="best representation of the number as a floating point
number">best representation of the number representing the user's
selection as a floating point number</span>. User agents must not
allow the user to set the <span
title="concept-fe-value">value</span> to the empty string.</p>

</div>

Expand Down

0 comments on commit 5b98ab8

Please sign in to comment.