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
<p>Decimal128.Amount values are intended to contain a Decimal128 value together with a precision, as well as information about how the precision that number should be understood. The two ways precision can be understood are in terms of fractional digits and significant digits.</p>
<dd>It computes whether the decimal string rendering of the given mathematical value is the same if expressed in terms of the given number of significant digits and the given number of fractional digits. Rounding may be necessary to make this determination; if so, the round-half-to-even method will be applied.</dd>
428
-
</dl>
429
-
<emu-alg>
430
-
1. If _v_ < 0, set _v_ to -_v_.
431
-
1. If _v_ = 0, then
432
-
1. If _significantDigits_ = _fractionalDigits_, return *true*.
433
-
1. Otherwise, return *false*.
434
-
1. Let _whole_ be floor(_v_).
435
-
1. Let _scaledByFractionalDigits_ be _v_ × 10<sup>_fractionalDigits_</sup>.
436
-
1. Let _log10_ be the log-base-10 of _whole_.
437
-
1. Let _numWholeDigits_ be floor(_log10_) + 1.
438
-
1. If _numWholeDigits_ ≤ _significantDigits_, let _scaledBySignificantDigits_ be _v_ × 10<sup>_significantDigits_</sup>, else let _scaledBySignificantDigits_ be _v_ - _v_ × 10<sup>-_significantDigits_</sup>.
439
-
1. Set _scaledBySignificantDigits_ to ApplyRoundingModeToPositive(_scaledBySignificantDigits_, *"halfEven"*).
440
-
1. Set _scaledByFractionalDigits_ to ApplyRoundingModeToPositive(_scaledByFractionalDigits_, *"halfEven"*).
441
-
1. If _scaledBySignificantDigits_ = _scaledByFractionalDigits_, return *true*.
<li>is the initial value of the the *"Decimal128Amount"* property of the global object.</li>
453
422
<li>creates and initializes a new Decimal128.Amount object when called as a constructor</li>
454
-
<li>may be used as the value of an *extends* clause of a class definition. Subclass constructors that intend to inherit the specified Decimal128.Amount behaviour must include a *super* call to the Decimal128.Amount constructor to create and initialize the subclass instance with the [[Decimal128AmountData]], [[Decimal128AmountPrecision]], and [[Decimal128AmountPrecisionMode]] internal slots.</li>
423
+
<li>may be used as the value of an *extends* clause of a class definition. Subclass constructors that intend to inherit the specified Decimal128.Amount behaviour must include a *super* call to the Decimal128.Amount constructor to create and initialize the subclass instance with the [[Decimal128AmountData]]and [[Decimal128AmountPrecision]] internal slots.</li>
0 commit comments