You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 26, 2022. It is now read-only.
<emu-clause id="sec-formatnumberstring" aoid="FormatNumberToString">
<h1>FormatNumberToString ( _intlObject_, _x_ )</h1>
<p>
The FormatNumberToString abstract operation is called with arguments _intlObject_ (which must be an object with [[MinimumSignificantDigits]], [[MaximumSignificantDigits]], [[MinimumIntegerDigits]], [[MinimumFractionDigits]], and [[MaximumFractionDigits]] internal slots), and _x_ (which must be a Number value), and returns _x_ as a string value with digits formatted according to the five formatting parameters.
</p>
<emu-alg>
1. If _intlObject_.[[MinimumSignificantDigits]] and _intlObject_.[[MaximumSignificantDigits]] are both not *undefined*, then
1. Let _result_ be ToRawPrecision(_x_, _intlObject_.[[MinimumSignificantDigits]], _intlObject_.[[MaximumSignificantDigits]]).
1. Else,
1. Let _result_ be ToRawFixed(_x_, _intlObject_.[[MinimumIntegerDigits]], _intlObject_.[[MinimumFractionDigits]], _intlObject_.[[MaximumFractionDigits]]).
1. Return _result_.
</emu-alg>
</emu-clause>
MinimumIntegerDigits is used in ToRawFixed but not ToRawPrecision. Since it does not affect rounding behavior, MinimumIntegerDigits should be removed from ToRawFixed and should be applied to the string result after the two helper methods perform their rounding operation.
The text was updated successfully, but these errors were encountered:
In this section:
MinimumIntegerDigits
is used inToRawFixed
but notToRawPrecision
. Since it does not affect rounding behavior,MinimumIntegerDigits
should be removed fromToRawFixed
and should be applied to the stringresult
after the two helper methods perform their rounding operation.The text was updated successfully, but these errors were encountered: