Skip to content

Commit

Permalink
Add TODO for convertToDecimalCharacter (#112)
Browse files Browse the repository at this point in the history
* Add TODO for convertToDecimalCharacter

* fixup: [spec] `npm run build`
  • Loading branch information
jessealama authored Apr 12, 2024
1 parent 30c36e4 commit a4c761c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2983,7 +2983,7 @@
</ul></div><div id="menu-toggle"><svg xmlns="http://www.w3.org/2000/svg" style="width:100%; height:100%; stroke:currentColor" viewBox="0 0 120 120">
<title>Menu</title>
<path stroke-width="10" stroke-linecap="round" d="M30,60 h60 M30,30 m0,5 h60 M30,90 m0,-5 h60"></path>
</svg></div><div id="menu-spacer" class="menu-spacer"></div><div id="menu"><div id="menu-search"><input type="text" id="menu-search-box" placeholder="Search..."><div id="menu-search-results" class="inactive"></div></div><div id="menu-pins"><div class="menu-pane-header">Pins<button class="unpin-all">clear</button></div><ul id="menu-pins-list"></ul></div><div class="menu-pane-header">Table of Contents</div><div id="menu-toc"><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-scope" title="Scope"><span class="secnum">1</span> Scope</a></li><li><span class="item-toggle">+</span><a href="#sec-normative-references" title="Normative References"><span class="secnum">2</span> Normative References</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#ref-ieee-754-2019" title="IEEE 754-2019"><span class="secnum">2.1</span> IEEE 754-2019</a></li></ol></li><li><span class="item-toggle">+</span><a href="#sec-the-decimal-object" title="The Decimal128 Object"><span class="secnum">3</span> The Decimal128 Object</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-decimal-intro" title="Introduction">Introduction</a></li><li><span class="item-toggle-none"></span><a href="#sec-the-decimal-constructor" title="The Decimal128 Constructor"><span class="secnum">3.1</span> The Decimal128 Constructor</a></li></ol></li><li><span class="item-toggle">+</span><a href="#sec-decimal-prototype-properties" title="Properties of the Decimal128 Prototype"><span class="secnum">4</span> Properties of the Decimal128 Prototype</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-decimal.prototype.isnan" title="Decimal128.prototype.isNaN"><span class="secnum">4.1</span> Decimal128.prototype.isNaN</a></li><li><span class="item-toggle-none"></span><a href="#sec-decimal.prototype.isfinite" title="Decimale128.prototype.isFinite"><span class="secnum">4.2</span> Decimale128.prototype.isFinite</a></li><li><span class="item-toggle-none"></span><a href="#sec-decimal.prototype.significand" title="Decimale128.prototype.significand"><span class="secnum">4.3</span> Decimale128.prototype.significand</a></li><li><span class="item-toggle-none"></span><a href="#sec-decimal.prototype.exponent" title="Decimale128.prototype.exponent"><span class="secnum">4.4</span> Decimale128.prototype.exponent</a></li><li><span class="item-toggle-none"></span><a href="#sec-decimal.prototype.abs" title="Decimal128.prototype.abs ( x )"><span class="secnum">4.5</span> Decimal128.prototype.abs ( <var>x</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-decimal.prototype.add" title="Decimal128.prototype.add ( x [ , options ] )"><span class="secnum">4.6</span> Decimal128.prototype.add ( <var>x</var> [ , <var>options</var> ] )</a></li><li><span class="item-toggle-none"></span><a href="#sec-decimal.prototype.subtract" title="Decimal128.prototype.subtract ( x [ , options ] )"><span class="secnum">4.7</span> Decimal128.prototype.subtract ( <var>x</var> [ , <var>options</var> ] )</a></li><li><span class="item-toggle-none"></span><a href="#sec-decimal.prototype.multiply" title="Decimal128.prototype.multiply ( x [ , options ] )"><span class="secnum">4.8</span> Decimal128.prototype.multiply ( <var>x</var> [ , <var>options</var> ] )</a></li><li><span class="item-toggle-none"></span><a href="#sec-decimal.prototype.divide" title="Decimal128.prototype.divide ( x [ , options ] )"><span class="secnum">4.9</span> Decimal128.prototype.divide ( <var>x</var> [ , <var>options</var> ] )</a></li><li><span class="item-toggle-none"></span><a href="#sec-decimal.prototype.remainder" title="Decimal128.prototype.remainder ( x [ , options ] )"><span class="secnum">4.10</span> Decimal128.prototype.remainder ( <var>x</var> [ , <var>options</var> ] )</a></li><li><span class="item-toggle-none"></span><a href="#sec-decimal.prototype.equals" title="Decimal128.prototype.equals ( x [ , options ] )"><span class="secnum">4.11</span> Decimal128.prototype.equals ( <var>x</var> [ , <var>options</var> ] )</a></li><li><span class="item-toggle-none"></span><a href="#sec-decimal.prototype.lessthan" title="Decimal128.prototype.lessThan ( x [ , options ] )"><span class="secnum">4.12</span> Decimal128.prototype.lessThan ( <var>x</var> [ , <var>options</var> ] )</a></li><li><span class="item-toggle-none"></span><a href="#sec-decimal-method-round" title="Decimal128.prototype.round ( numFractionalDigits [ , mode ] )"><span class="secnum">4.13</span> Decimal128.prototype.round ( <var>numFractionalDigits</var> [ , <var>mode</var> ] )</a></li><li><span class="item-toggle-none"></span><a href="#sec-decimal.prototype.tostring" title="Decimal128.prototype.toString ( [ options ] )"><span class="secnum">4.14</span> Decimal128.prototype.toString ( [ <var>options</var> ] )</a></li><li><span class="item-toggle-none"></span><a href="#sec-decimal.prototype.valueof" title="Decimal128.prototype.valueOf ( x )"><span class="secnum">4.15</span> Decimal128.prototype.valueOf ( <var>x</var> )</a></li></ol></li><li><span class="item-toggle-none"></span><a href="#sec-copyright-and-software-license" title="Copyright &amp; Software License"><span class="secnum">A</span> Copyright &amp; Software License</a></li></ol></div></div><div id="spec-container"><h1 class="version">Stage 1 Draft / March 29, 2024</h1><h1 class="title">Decimal</h1>
</svg></div><div id="menu-spacer" class="menu-spacer"></div><div id="menu"><div id="menu-search"><input type="text" id="menu-search-box" placeholder="Search..."><div id="menu-search-results" class="inactive"></div></div><div id="menu-pins"><div class="menu-pane-header">Pins<button class="unpin-all">clear</button></div><ul id="menu-pins-list"></ul></div><div class="menu-pane-header">Table of Contents</div><div id="menu-toc"><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-scope" title="Scope"><span class="secnum">1</span> Scope</a></li><li><span class="item-toggle">+</span><a href="#sec-normative-references" title="Normative References"><span class="secnum">2</span> Normative References</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#ref-ieee-754-2019" title="IEEE 754-2019"><span class="secnum">2.1</span> IEEE 754-2019</a></li></ol></li><li><span class="item-toggle">+</span><a href="#sec-the-decimal-object" title="The Decimal128 Object"><span class="secnum">3</span> The Decimal128 Object</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-decimal-intro" title="Introduction">Introduction</a></li><li><span class="item-toggle-none"></span><a href="#sec-the-decimal-constructor" title="The Decimal128 Constructor"><span class="secnum">3.1</span> The Decimal128 Constructor</a></li></ol></li><li><span class="item-toggle">+</span><a href="#sec-decimal-prototype-properties" title="Properties of the Decimal128 Prototype"><span class="secnum">4</span> Properties of the Decimal128 Prototype</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-decimal.prototype.isnan" title="Decimal128.prototype.isNaN"><span class="secnum">4.1</span> Decimal128.prototype.isNaN</a></li><li><span class="item-toggle-none"></span><a href="#sec-decimal.prototype.isfinite" title="Decimale128.prototype.isFinite"><span class="secnum">4.2</span> Decimale128.prototype.isFinite</a></li><li><span class="item-toggle-none"></span><a href="#sec-decimal.prototype.significand" title="Decimale128.prototype.significand"><span class="secnum">4.3</span> Decimale128.prototype.significand</a></li><li><span class="item-toggle-none"></span><a href="#sec-decimal.prototype.exponent" title="Decimale128.prototype.exponent"><span class="secnum">4.4</span> Decimale128.prototype.exponent</a></li><li><span class="item-toggle-none"></span><a href="#sec-decimal.prototype.abs" title="Decimal128.prototype.abs ( x )"><span class="secnum">4.5</span> Decimal128.prototype.abs ( <var>x</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-decimal.prototype.add" title="Decimal128.prototype.add ( x [ , options ] )"><span class="secnum">4.6</span> Decimal128.prototype.add ( <var>x</var> [ , <var>options</var> ] )</a></li><li><span class="item-toggle-none"></span><a href="#sec-decimal.prototype.subtract" title="Decimal128.prototype.subtract ( x [ , options ] )"><span class="secnum">4.7</span> Decimal128.prototype.subtract ( <var>x</var> [ , <var>options</var> ] )</a></li><li><span class="item-toggle-none"></span><a href="#sec-decimal.prototype.multiply" title="Decimal128.prototype.multiply ( x [ , options ] )"><span class="secnum">4.8</span> Decimal128.prototype.multiply ( <var>x</var> [ , <var>options</var> ] )</a></li><li><span class="item-toggle-none"></span><a href="#sec-decimal.prototype.divide" title="Decimal128.prototype.divide ( x [ , options ] )"><span class="secnum">4.9</span> Decimal128.prototype.divide ( <var>x</var> [ , <var>options</var> ] )</a></li><li><span class="item-toggle-none"></span><a href="#sec-decimal.prototype.remainder" title="Decimal128.prototype.remainder ( x [ , options ] )"><span class="secnum">4.10</span> Decimal128.prototype.remainder ( <var>x</var> [ , <var>options</var> ] )</a></li><li><span class="item-toggle-none"></span><a href="#sec-decimal.prototype.equals" title="Decimal128.prototype.equals ( x [ , options ] )"><span class="secnum">4.11</span> Decimal128.prototype.equals ( <var>x</var> [ , <var>options</var> ] )</a></li><li><span class="item-toggle-none"></span><a href="#sec-decimal.prototype.lessthan" title="Decimal128.prototype.lessThan ( x [ , options ] )"><span class="secnum">4.12</span> Decimal128.prototype.lessThan ( <var>x</var> [ , <var>options</var> ] )</a></li><li><span class="item-toggle-none"></span><a href="#sec-decimal-method-round" title="Decimal128.prototype.round ( numFractionalDigits [ , mode ] )"><span class="secnum">4.13</span> Decimal128.prototype.round ( <var>numFractionalDigits</var> [ , <var>mode</var> ] )</a></li><li><span class="item-toggle-none"></span><a href="#sec-decimal.prototype.tostring" title="Decimal128.prototype.toString ( [ options ] )"><span class="secnum">4.14</span> Decimal128.prototype.toString ( [ <var>options</var> ] )</a></li><li><span class="item-toggle-none"></span><a href="#sec-decimal.prototype.valueof" title="Decimal128.prototype.valueOf ( x )"><span class="secnum">4.15</span> Decimal128.prototype.valueOf ( <var>x</var> )</a></li></ol></li><li><span class="item-toggle-none"></span><a href="#sec-copyright-and-software-license" title="Copyright &amp; Software License"><span class="secnum">A</span> Copyright &amp; Software License</a></li></ol></div></div><div id="spec-container"><h1 class="version">Stage 1 Draft / April 4, 2024</h1><h1 class="title">Decimal</h1>
<emu-clause id="sec-scope">
<h1><span class="secnum">1</span> Scope</h1>
Expand Down Expand Up @@ -3111,7 +3111,7 @@ <h1><span class="secnum">4.13</span> Decimal128.prototype.round ( <var>numFracti
<emu-clause id="sec-decimal.prototype.tostring">
<h1><span class="secnum">4.14</span> Decimal128.prototype.toString ( [ <var>options</var> ] )</h1>
<p>Renders <emu-val>this</emu-val> value as a <emu-xref href="#dfn-signed-decimal-string" id="_ref_46"><a href="#dfn-signed-decimal-string">signed decimal string</a></emu-xref>. <var>options</var>, is defined, is supposed to be a plain object. If <var>options</var> has the property <emu-val>numDecimal128Digits</emu-val> and the value of that property is a non-negative Number, the return value will be a string that has exactly that many digits after the decimal point, possibly with the addition of trailing zeros.</p>
<emu-alg><ol><li>Let <var>roundingMode</var> be <var class="field">[[_options_]]</var>[roundingMode]].</li><li>If <var>roundingMode</var> is not one of <emu-val>"ceil"</emu-val>, <emu-val>"floor"</emu-val>, <emu-val>"expand"</emu-val>, <emu-val>"trunc"</emu-val>, <emu-val>"halfEven"</emu-val>, <emu-val>"halfExpand"</emu-val>, <emu-val>"halfCeil"</emu-val>, <emu-val>"halfFloor"</emu-val>, or <emu-val>"halfTrunc"</emu-val>, then<ol><li>set <var>roundingMode</var> to <emu-val>"halfEven"</emu-val>.</li></ol></li><li>Let <var>format</var> be <var class="field">[[_options_]]</var>[format]].</li><li>If <var>format</var> is not one of <emu-val>"decimal"</emu-val> or <emu-val>"exponential"</emu-val>, then<ol><li>set <var>format</var> to <emu-val>"decimal"</emu-val>.</li></ol></li><li>If <var>format</var> is <emu-val>"decimal</emu-val>", then<ol><li>return the result of calling IEEE 754's convertToDecimalCharacter with a second argument ensuring that a <emu-xref href="#dfn-signed-decimal-string" id="_ref_47"><a href="#dfn-signed-decimal-string">signed decimal string</a></emu-xref> is generated.</li></ol></li><li>Return the result of calling IEEE 754's convertToDecimalCharacter with a second argument ensuring that a <emu-xref href="#dfn-signed-exponential-string" id="_ref_48"><a href="#dfn-signed-exponential-string">signed exponential string</a></emu-xref> is generated.</li></ol></emu-alg>
<emu-alg><ol><li>Let <var>roundingMode</var> be <var class="field">[[_options_]]</var>[roundingMode]].</li><li>If <var>roundingMode</var> is not one of <emu-val>"ceil"</emu-val>, <emu-val>"floor"</emu-val>, <emu-val>"expand"</emu-val>, <emu-val>"trunc"</emu-val>, <emu-val>"halfEven"</emu-val>, <emu-val>"halfExpand"</emu-val>, <emu-val>"halfCeil"</emu-val>, <emu-val>"halfFloor"</emu-val>, or <emu-val>"halfTrunc"</emu-val>, then<ol><li>set <var>roundingMode</var> to <emu-val>"halfEven"</emu-val>.</li></ol></li><li>Let <var>format</var> be <var class="field">[[_options_]]</var>[format]].</li><li>If <var>format</var> is not one of <emu-val>"decimal"</emu-val> or <emu-val>"exponential"</emu-val>, then<ol><li>set <var>format</var> to <emu-val>"decimal"</emu-val>.</li></ol></li><li>If <var>format</var> is <emu-val>"decimal</emu-val>", then<ol><li>return the result of calling IEEE 754's convertToDecimalCharacter with a second argument ensuring that a <emu-xref href="#dfn-signed-decimal-string" id="_ref_47"><a href="#dfn-signed-decimal-string">signed decimal string</a></emu-xref> is generated. TODO convertToDecimalCharacter is unspecified, so we need to do that work here.</li></ol></li><li>Return the result of calling IEEE 754's convertToDecimalCharacter with a second argument ensuring that a <emu-xref href="#dfn-signed-exponential-string" id="_ref_48"><a href="#dfn-signed-exponential-string">signed exponential string</a></emu-xref> is generated. TODO convertToDecimalCharacter is unspecified, so we need to do that work here.</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-decimal.prototype.valueof">
<h1><span class="secnum">4.15</span> Decimal128.prototype.valueOf ( <var>x</var> )</h1>
Expand Down
4 changes: 2 additions & 2 deletions spec.emu
Original file line number Diff line number Diff line change
Expand Up @@ -209,8 +209,8 @@ location: https://github.com/tc39/proposal-decimal/
1. If _format_ is not one of *"decimal"* or *"exponential"*, then
1. set _format_ to *"decimal"*.
1. If _format_ is *"decimal*", then
1. return the result of calling IEEE 754's convertToDecimalCharacter with a second argument ensuring that a <emu-xref href="#dfn-signed-decimal-string">signed decimal string</emu-xref> is generated.
1. Return the result of calling IEEE 754's convertToDecimalCharacter with a second argument ensuring that a <emu-xref href="#dfn-signed-exponential-string">signed exponential string</emu-xref> is generated.
1. return the result of calling IEEE 754's convertToDecimalCharacter with a second argument ensuring that a <emu-xref href="#dfn-signed-decimal-string">signed decimal string</emu-xref> is generated. TODO convertToDecimalCharacter is unspecified, so we need to do that work here.
1. Return the result of calling IEEE 754's convertToDecimalCharacter with a second argument ensuring that a <emu-xref href="#dfn-signed-exponential-string">signed exponential string</emu-xref> is generated. TODO convertToDecimalCharacter is unspecified, so we need to do that work here.
</emu-alg>
</emu-clause>
<emu-clause id="sec-decimal.prototype.valueof">
Expand Down

0 comments on commit a4c761c

Please sign in to comment.