From b45d15b49ee5152e7c6f41ab1ec4815aa225061a Mon Sep 17 00:00:00 2001 From: Jesse Alama Date: Thu, 30 May 2024 17:20:24 +0200 Subject: [PATCH] Compress by using `Decimal128ValueToObject` --- spec.emu | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/spec.emu b/spec.emu index c23d737a..24b912b0 100644 --- a/spec.emu +++ b/spec.emu @@ -608,9 +608,7 @@ location: https://github.com/tc39/proposal-decimal/ 1. If _v_ is *+0*𝔻, return _O_. 1. If _v_ is *-0*𝔻, return _O_. 1. Let _n_ be the integer such that v × 10-_q_ = _n_ and 0 < abs(_n_) < 1034. - 1. Let _N_ be ? OrdinaryCreateFromConstructor(%Decimal128%, *"%Decimal128.prototype%"*, « [[Decimal128Data]] »). - 1. Set _N_.[[Decimal128Data]] to ? EnsureDecimal128Value(v × 10-_numFractionalDigits_, _q_ + _numFractionalDigits_, _roundingMode_). - 1. Return _N_. + 1. Return Decimal128ValueToObject(? EnsureDecimal128Value(v × 10-_numFractionalDigits_, _q_ + _numFractionalDigits_, _roundingMode_)).

This operation follows the specification of the rounding mode attributes discussed in Section 4.3 of IEEE 754-2019.