diff --git a/index.html b/index.html index 07fdb2d..8971f36 100644 --- a/index.html +++ b/index.html @@ -3645,7 +3645,7 @@

2.19 Decimal128.prototype.round ( numFracti

2.20 Decimal128.prototype.scale10 ( n )

This method multiplies the current Decimal128 object by 10 raised to the given power.

It performs the following steps when called:

-
  1. Let O be the this value.
  2. Perform ? RequireInternalSlot(O, [[Decimal128Data]]).
  3. If n is not a Number, throw a TypeError exception.
  4. If n is not one of ยซ NaN๐”ฝ, +โˆž๐”ฝ, -โˆž๐”ฝ ยป, then
    1. If โ„(n) is not an integer, throw a RangeError exception.
  5. Let d be O.[[Decimal128Data]].
  6. If d is NaN๐”ป, +โˆž๐”ป, or -โˆž๐”ป, return Decimal128ValueToObject(d).
  7. If d is either +0๐”ป or โˆ’0๐”ป, return Decimal128ValueToObject(d).
  8. If n is NaN๐”ฝ, return Decimal128ValueToObject(NaN๐”ป).
  9. If n is +โˆž๐”ฝ, then
    1. If d > 0, return Decimal128ValueToObject(+โˆž๐”ป).
    2. Otherwise, return Decimal128ValueToObject(-โˆž๐”ป).
  10. If n is -โˆž๐”ฝ, then
    1. If d > 0, return Decimal128ValueToObject(+0๐”ป).
    2. Otherwise, return Decimal128ValueToObject(โˆ’0๐”ป).
  11. Let w be v ร— 10โ„(n).
  12. Return Decimal128ValueToObject(RoundToDecimal128Domain(w)).
+
  1. Let O be the this value.
  2. Perform ? RequireInternalSlot(O, [[Decimal128Data]]).
  3. If n is not a Number, throw a TypeError exception.
  4. If n is not one of ยซ NaN๐”ฝ, +โˆž๐”ฝ, -โˆž๐”ฝ ยป, then
    1. If โ„(n) is not an integer, throw a RangeError exception.
  5. Let d be O.[[Decimal128Data]].
  6. If d is NaN๐”ป, +โˆž๐”ป, or -โˆž๐”ป, return Decimal128ValueToObject(d).
  7. If d is either +0๐”ป or โˆ’0๐”ป, return Decimal128ValueToObject(d).
  8. If n is NaN๐”ฝ, return Decimal128ValueToObject(NaN๐”ป).
  9. If n is +โˆž๐”ฝ, then
    1. If d > 0, return Decimal128ValueToObject(+โˆž๐”ป).
    2. Otherwise, return Decimal128ValueToObject(-โˆž๐”ป).
  10. If n is -โˆž๐”ฝ, then
    1. If d > 0, return Decimal128ValueToObject(+0๐”ป).
    2. Otherwise, return Decimal128ValueToObject(โˆ’0๐”ป).
  11. Let w be d ร— 10โ„(n).
  12. Return Decimal128ValueToObject(RoundToDecimal128Domain(w)).
Note

This operation follows the specification of the scaleB operation discussed in Section 5.3.3 of IEEE 754-2019.