Skip to content

Commit

Permalink
Editorial: (Exponentiation) Add NaN to exponent values whose behavior…
Browse files Browse the repository at this point in the history
… deviates from IEEE 754-2008 (tc39#1228)

This oversight was discovered and reported to me by James Clark ([email protected]).
  • Loading branch information
rwaldron authored and ljharb committed Aug 10, 2020
1 parent 00763b2 commit f6c9320
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion spec.html
Original file line number Diff line number Diff line change
Expand Up @@ -1591,7 +1591,7 @@ <h1>Number::exponentiate ( _base_, _exponent_ )</h1>
<li>If _base_ &lt; 0 and _base_ is finite and _exponent_ is finite and _exponent_ is not an integer, the result is *NaN*.</li>
</ul>
<emu-note>
<p>The result of _base_ `**` _exponent_ when _base_ is *1* or *-1* and _exponent_ is *+Infinity* or *-Infinity* differs from IEEE 754-2019. The first edition of ECMAScript specified a result of *NaN* for this operation, whereas later versions of IEEE 754-2019 specified *1*. The historical ECMAScript behaviour is preserved for compatibility reasons.</p>
<p>The result of _base_ `**` _exponent_ when _base_ is *1* or *-1* and _exponent_ is *+Infinity* or *-Infinity*, or when _base_ is *1* and _exponent_ is *NaN*, differs from IEEE 754-2019. The first edition of ECMAScript specified a result of *NaN* for this operation, whereas later versions of IEEE 754-2019 specified *1*. The historical ECMAScript behaviour is preserved for compatibility reasons.</p>
</emu-note>
</emu-clause>

Expand Down

0 comments on commit f6c9320

Please sign in to comment.