UNPKG

decimal128

Version:

Partial implementation of IEEE 754 Decimal128 decimal floating-point numbers

1 lines 55 kB
{"version":3,"file":"Decimal128.cjs","sources":["../../src/Decimal128.mts"],"sourcesContent":["/**\n * decimal128.js -- Decimal128 implementation in JavaScript\n *\n * The purpose of this module is to provide a userland implementation of\n * IEEE 758 Decimal128, which are exact decimal floating point numbers fit into\n * 128 bits. This library provides basic arithmetic operations (addition, multiplication).\n * It's main purpose is to help gather data and experience about using Decimal128\n * in JavaScript programs. Speed is not a concern; the main goal is to simply\n * make Decimal128 values available in some form in JavaScript. In the future,\n * JavaScript may get exact decimal numbers as a built-in data type, which will\n * surely be much faster than what this library can provide.\n *\n * @author Jesse Alama <jesse@igalia.com>\n */\nimport { ROUNDING_MODES, ROUNDING_MODE_HALF_EVEN, ROUNDING_MODE_TRUNCATE, } from \"./common.mjs\";\nimport { Rational } from \"./Rational.mjs\";\nimport { Decimal } from \"./Decimal.mjs\";\nconst EXPONENT_MIN = -6176;\nconst NORMAL_EXPONENT_MIN = -6143;\nconst EXPONENT_MAX = 6111;\nconst NORMAL_EXPONENT_MAX = 6144;\nconst MAX_SIGNIFICANT_DIGITS = 34;\nconst bigTen = BigInt(10);\nconst NAN = \"NaN\";\nconst POSITIVE_INFINITY = \"Infinity\";\nconst NEGATIVE_INFINITY = \"-Infinity\";\nconst TEN_MAX_EXPONENT = bigTen ** BigInt(MAX_SIGNIFICANT_DIGITS);\nfunction pickQuantum(d, preferredQuantum) {\n if (preferredQuantum < EXPONENT_MIN) {\n return EXPONENT_MIN;\n }\n if (preferredQuantum > EXPONENT_MAX) {\n return EXPONENT_MAX;\n }\n return preferredQuantum;\n}\nfunction adjustDecimal128(d) {\n let v = d.cohort;\n let q = d.quantum;\n if (v === \"0\" || v === \"-0\") {\n return new Decimal({ cohort: v, quantum: pickQuantum(v, q) });\n }\n if (d.isNegative()) {\n let adjusted = adjustDecimal128(d.negate());\n if (adjusted === \"Infinity\") {\n return \"-Infinity\";\n }\n return adjusted.negate();\n }\n let coef = d.coefficient();\n if (coef <= TEN_MAX_EXPONENT && EXPONENT_MIN <= q && q <= EXPONENT_MAX) {\n return d;\n }\n let renderedCohort = v.toFixed(Infinity);\n let [integerPart, _] = renderedCohort.split(/[.]/);\n if (integerPart === \"0\") {\n integerPart = \"\";\n }\n if (integerPart.length > MAX_SIGNIFICANT_DIGITS) {\n return \"Infinity\";\n }\n let scaledSig = v.scale10(MAX_SIGNIFICANT_DIGITS - integerPart.length);\n let rounded = scaledSig.round(0, \"halfEven\");\n let rescaled = rounded.scale10(0 - MAX_SIGNIFICANT_DIGITS + integerPart.length);\n if (rescaled.isZero()) {\n return new Decimal({ cohort: \"0\", quantum: pickQuantum(\"0\", q) });\n }\n let rescaledAsString = rescaled.toFixed(Infinity);\n return new Decimal(rescaledAsString);\n}\nfunction validateConstructorData(x) {\n if (x === \"NaN\" || x === \"Infinity\" || x === \"-Infinity\") {\n return x; // no further validation needed\n }\n let val = x;\n let v = val.cohort;\n let q = val.quantum;\n let d = new Decimal({ cohort: v, quantum: q });\n return adjustDecimal128(d);\n}\nfunction handleDecimalNotation(s) {\n if (s.match(/^[+]/)) {\n return handleDecimalNotation(s.substring(1));\n }\n if (s.match(/_/)) {\n return handleDecimalNotation(s.replace(/_/g, \"\"));\n }\n if (\"\" === s) {\n throw new SyntaxError(\"Empty string not permitted\");\n }\n if (\".\" === s) {\n throw new SyntaxError(\"Lone decimal point not permitted\");\n }\n if (\"-\" === s) {\n throw new SyntaxError(\"Lone minus sign not permitted\");\n }\n if (\"-.\" === s) {\n throw new SyntaxError(\"Lone minus sign and period not permitted\");\n }\n if (s === \"NaN\") {\n return \"NaN\";\n }\n if (s.match(/^-?Infinity$/)) {\n return s.match(/^-/) ? \"-Infinity\" : \"Infinity\";\n }\n return new Decimal(s);\n}\nexport class Decimal128 {\n constructor(n) {\n this.d = undefined;\n this._isNaN = false;\n this._isFinite = true;\n this._isNegative = false;\n let data;\n if (\"object\" === typeof n) {\n data = n;\n }\n else {\n let s;\n if (\"number\" === typeof n) {\n s = Object.is(n, -0) ? \"-0\" : n.toString();\n }\n else if (\"bigint\" === typeof n) {\n s = n.toString();\n }\n else {\n s = n;\n }\n data = handleDecimalNotation(s);\n }\n data = validateConstructorData(data);\n if (data == \"NaN\") {\n this._isNaN = true;\n }\n else if (data == \"Infinity\") {\n this._isFinite = false;\n }\n else if (data == \"-Infinity\") {\n this._isFinite = false;\n this._isNegative = true;\n }\n else {\n let v = data.cohort;\n if (v === \"-0\") {\n this._isNegative = true;\n }\n else if (v === \"0\") {\n this._isNegative = false;\n }\n else {\n this._isNegative = v.isNegative;\n }\n this.d = data;\n }\n }\n isNaN() {\n return this._isNaN;\n }\n isFinite() {\n return this._isFinite;\n }\n isNegative() {\n return this._isNegative;\n }\n cohort() {\n let d = this.d;\n return d.cohort;\n }\n quantum() {\n let d = this.d;\n return d.quantum;\n }\n isZero() {\n if (this.isNaN()) {\n return false;\n }\n if (!this.isFinite()) {\n return false;\n }\n let v = this.cohort();\n return v === \"0\" || v === \"-0\";\n }\n exponent() {\n let mantissa = this.mantissa();\n let mantissaQuantum = mantissa.quantum();\n let ourQuantum = this.quantum();\n return ourQuantum - mantissaQuantum;\n }\n mantissa() {\n if (this.isZero()) {\n throw new RangeError(\"Zero does not have a mantissa\");\n }\n if (this.isNegative()) {\n return this.negate().mantissa().negate();\n }\n let x = this;\n let decimalOne = new Decimal128(\"1\");\n let decimalTen = new Decimal128(\"10\");\n while (0 <= x.cmp(decimalTen)) {\n x = x.scale10(-1);\n }\n while (x.cmp(decimalOne) === -1) {\n x = x.scale10(1);\n }\n return x;\n }\n scale10(n) {\n if (this.isNaN()) {\n throw new RangeError(\"NaN cannot be scaled\");\n }\n if (!this.isFinite()) {\n throw new RangeError(\"Infinity cannot be scaled\");\n }\n if (!Number.isInteger(n)) {\n throw new TypeError(\"Argument must be an integer\");\n }\n if (n === 0) {\n return this.clone();\n }\n let v = this.cohort();\n if (v === \"0\" || v === \"-0\") {\n return this.clone();\n }\n let q = this.quantum();\n return new Decimal128(new Decimal({ cohort: v.scale10(n), quantum: q + n }));\n }\n coefficient() {\n let d = this.d;\n return d.coefficient();\n }\n emitExponential() {\n let v = this.cohort();\n let q = this.quantum();\n let p = this._isNegative ? \"-\" : \"\";\n if (v === \"0\" || v === \"-0\") {\n return v + \"e\" + (q < 0 ? \"-\" : \"+\") + Math.abs(q);\n }\n let m = this.mantissa();\n let e = this.exponent();\n let mAsString = m.toFixed({ digits: Infinity });\n let expPart = (e < 0 ? \"-\" : \"+\") + Math.abs(e);\n return p + mAsString + \"e\" + expPart;\n }\n emitDecimal() {\n let v = this.cohort();\n let q = this.quantum();\n if (v === \"0\") {\n if (q < 0) {\n return \"0\" + \".\" + \"0\".repeat(0 - q);\n }\n return \"0\";\n }\n if (v === \"-0\") {\n if (q < 0) {\n return \"-0\" + \".\" + \"0\".repeat(0 - q);\n }\n return \"-0\";\n }\n let c = v.scale10(0 - q);\n let s = c.numerator.toString();\n let p = this._isNegative ? \"-\" : \"\";\n if (q > 0) {\n return p + s + \"0\".repeat(q);\n }\n if (q === 0) {\n return p + s;\n }\n if (s.length < Math.abs(q)) {\n let numZeroesNeeded = Math.abs(q) - s.length;\n return p + \"0.\" + \"0\".repeat(numZeroesNeeded) + s;\n }\n let integerPart = s.substring(0, s.length + q);\n let fractionalPart = s.substring(s.length + q);\n if (integerPart === \"\") {\n integerPart = \"0\";\n }\n return p + integerPart + \".\" + fractionalPart;\n }\n /**\n * Returns a digit string representing this Decimal128.\n */\n toString() {\n if (this.isNaN()) {\n return NAN;\n }\n if (!this.isFinite()) {\n return (this.isNegative() ? \"-\" : \"\") + POSITIVE_INFINITY;\n }\n let asDecimalString = this.emitDecimal();\n if (asDecimalString.match(/[.]/)) {\n asDecimalString = asDecimalString.replace(/0+$/, \"\");\n if (asDecimalString.match(/[.]$/)) {\n asDecimalString = asDecimalString.substring(0, asDecimalString.length - 1);\n }\n }\n return asDecimalString;\n }\n toFixed(opts) {\n if (undefined === opts) {\n return this.toString();\n }\n if (\"object\" !== typeof opts) {\n throw new TypeError(\"Argument must be an object\");\n }\n if (undefined === opts.digits) {\n return this.toString();\n }\n let n = opts.digits;\n if (n < 0) {\n throw new RangeError(\"Argument must be greater than or equal to 0\");\n }\n if (n === Infinity) {\n return this.emitDecimal();\n }\n if (!Number.isInteger(n)) {\n throw new RangeError(\"Argument must be an integer or positive infinity\");\n }\n if (this.isNaN()) {\n return NAN;\n }\n if (!this.isFinite()) {\n return this.isNegative()\n ? \"-\" + POSITIVE_INFINITY\n : POSITIVE_INFINITY;\n }\n let rounded = this.round(n);\n let roundedRendered = rounded.emitDecimal();\n if (roundedRendered.match(/[.]/)) {\n let [lhs, rhs] = roundedRendered.split(/[.]/);\n return lhs + \".\" + rhs.substring(0, n);\n }\n return roundedRendered;\n }\n toPrecision(opts) {\n if (undefined === opts) {\n return this.toString();\n }\n if (\"object\" !== typeof opts) {\n throw new TypeError(\"Argument must be an object\");\n }\n if (undefined === opts.digits) {\n return this.toString();\n }\n let n = opts.digits;\n if (n <= 0) {\n throw new RangeError(\"Argument must be positive\");\n }\n if (!Number.isInteger(n)) {\n throw new RangeError(\"Argument must be an integer\");\n }\n if (this.isNaN()) {\n return \"NaN\";\n }\n if (!this.isFinite()) {\n return (this.isNegative() ? \"-\" : \"\") + \"Infinity\";\n }\n let s = this.abs().emitDecimal();\n let [lhs, rhs] = s.split(/[.]/);\n let p = this.isNegative() ? \"-\" : \"\";\n if (n <= lhs.length) {\n if (lhs.length === n) {\n return p + lhs;\n }\n return p + s.substring(0, n) + \"e+\" + `${lhs.length - n + 1}`;\n }\n if (n <= lhs.length + rhs.length) {\n let rounded = this.round(n - lhs.length);\n return rounded.emitDecimal();\n }\n return p + lhs + \".\" + rhs + \"0\".repeat(n - lhs.length - rhs.length);\n }\n toExponential(opts) {\n if (this.isNaN()) {\n return \"NaN\";\n }\n if (!this.isFinite()) {\n return (this.isNegative() ? \"-\" : \"\") + \"Infinity\";\n }\n if (undefined === opts) {\n return this.emitExponential();\n }\n if (\"object\" !== typeof opts) {\n throw new TypeError(\"Argument must be an object\");\n }\n if (undefined === opts.digits) {\n return this.emitExponential();\n }\n let n = opts.digits;\n if (n <= 0) {\n throw new RangeError(\"Argument must be positive\");\n }\n if (!Number.isInteger(n)) {\n throw new RangeError(\"Argument must be an integer\");\n }\n let s = this.abs().emitExponential();\n let [lhs, rhsWithEsign] = s.split(/[.]/);\n let [rhs, exp] = rhsWithEsign.split(/[eE]/);\n let p = this.isNegative() ? \"-\" : \"\";\n if (rhs.length <= n) {\n return p + lhs + \".\" + rhs + \"0\".repeat(n - rhs.length) + \"e\" + exp;\n }\n return p + lhs + \".\" + rhs.substring(0, n) + \"e\" + exp;\n }\n isInteger() {\n let s = this.toString();\n let [_, rhs] = s.split(/[.]/);\n if (rhs === undefined) {\n return true;\n }\n return !!rhs.match(/^0+$/);\n }\n toBigInt() {\n if (this.isNaN()) {\n throw new RangeError(\"NaN cannot be converted to a BigInt\");\n }\n if (!this.isFinite()) {\n throw new RangeError(\"Infinity cannot be converted to a BigInt\");\n }\n if (!this.isInteger()) {\n throw new RangeError(\"Non-integer decimal cannot be converted to a BigInt\");\n }\n return BigInt(this.toString());\n }\n toNumber() {\n if (this.isNaN()) {\n return NaN;\n }\n if (!this.isFinite()) {\n if (this.isNegative()) {\n return -Infinity;\n }\n return Infinity;\n }\n return Number(this.toString());\n }\n /**\n * Compare two values. Return\n *\n * * NaN if either argument is a decimal NaN\n * + -1 if the mathematical value of this decimal is strictly less than that of the other,\n * + 0 if the mathematical values are equal, and\n * + 1 otherwise.\n *\n * @param x\n */\n cmp(x) {\n if (this.isNaN() || x.isNaN()) {\n return NaN;\n }\n if (!this.isFinite()) {\n if (!x.isFinite()) {\n if (this.isNegative() === x.isNegative()) {\n return 0;\n }\n return this.isNegative() ? -1 : 1;\n }\n if (this.isNegative()) {\n return -1;\n }\n return 1;\n }\n if (!x.isFinite()) {\n return x.isNegative() ? 1 : -1;\n }\n if (this.isZero()) {\n if (x.isZero()) {\n return 0;\n }\n return x.isNegative() ? 1 : -1;\n }\n let ourCohort = this.cohort();\n let theirCohort = x.cohort();\n return ourCohort.cmp(theirCohort);\n }\n abs() {\n if (this.isNaN()) {\n return new Decimal128(NAN);\n }\n if (!this.isFinite()) {\n if (this.isNegative()) {\n return this.negate();\n }\n return this.clone();\n }\n if (this.isNegative()) {\n return this.negate();\n }\n return this.clone();\n }\n /**\n * Add this Decimal128 value to one or more Decimal128 values.\n *\n * @param x\n */\n add(x) {\n if (this.isNaN() || x.isNaN()) {\n return new Decimal128(NAN);\n }\n if (!this.isFinite()) {\n if (!x.isFinite()) {\n if (this.isNegative() === x.isNegative()) {\n return x.clone();\n }\n return new Decimal128(NAN);\n }\n return this.clone();\n }\n if (!x.isFinite()) {\n return x.clone();\n }\n if (this.isNegative() && x.isNegative()) {\n return this.negate().add(x.negate()).negate();\n }\n if (this.isZero()) {\n return x.clone();\n }\n if (x.isZero()) {\n return this.clone();\n }\n let ourCohort = this.cohort();\n let theirCohort = x.cohort();\n let ourQuantum = this.quantum();\n let theirQuantum = x.quantum();\n let sum = Rational.add(ourCohort, theirCohort);\n let preferredQuantum = Math.min(ourQuantum, theirQuantum);\n if (sum.isZero()) {\n if (this._isNegative) {\n return new Decimal128(\"-0\");\n }\n return new Decimal128(\"0\");\n }\n return new Decimal128(new Decimal({\n cohort: sum,\n quantum: pickQuantum(sum, preferredQuantum),\n }));\n }\n /**\n * Subtract another Decimal128 value from one or more Decimal128 values.\n *\n * @param x\n */\n subtract(x) {\n if (this.isNaN() || x.isNaN()) {\n return new Decimal128(NAN);\n }\n if (!this.isFinite()) {\n if (!x.isFinite()) {\n if (this.isNegative() === x.isNegative()) {\n return new Decimal128(NAN);\n }\n return this.clone();\n }\n return this.clone();\n }\n if (!x.isFinite()) {\n return x.negate();\n }\n if (x.isNegative()) {\n return this.add(x.negate());\n }\n if (this.isZero()) {\n return x.negate();\n }\n if (x.isZero()) {\n return this.clone();\n }\n let ourCohort = this.cohort();\n let theirCohort = x.cohort();\n let ourExponent = this.quantum();\n let theirExponent = x.quantum();\n let difference = Rational.subtract(ourCohort, theirCohort);\n let preferredQuantum = Math.min(ourExponent, theirExponent);\n if (difference.isZero()) {\n difference = \"0\";\n }\n return new Decimal128(new Decimal({\n cohort: difference,\n quantum: pickQuantum(difference, preferredQuantum),\n }));\n }\n /**\n * Multiply this Decimal128 value by an array of other Decimal128 values.\n *\n * If no arguments are given, return this value.\n *\n * @param x\n */\n multiply(x) {\n if (this.isNaN() || x.isNaN()) {\n return new Decimal128(NAN);\n }\n if (!this.isFinite()) {\n if (x.isZero()) {\n return new Decimal128(NAN);\n }\n if (this.isNegative() === x.isNegative()) {\n return new Decimal128(POSITIVE_INFINITY);\n }\n return new Decimal128(NEGATIVE_INFINITY);\n }\n if (!x.isFinite()) {\n if (this.isZero()) {\n return new Decimal128(NAN);\n }\n if (this.isNegative() === x.isNegative()) {\n return new Decimal128(POSITIVE_INFINITY);\n }\n return new Decimal128(NEGATIVE_INFINITY);\n }\n if (this.isNegative()) {\n return this.negate().multiply(x).negate();\n }\n if (x.isNegative()) {\n return this.multiply(x.negate()).negate();\n }\n let ourCohort = this.cohort();\n let theirCohort = x.cohort();\n let ourQuantum = this.quantum();\n let theirQuantum = x.quantum();\n let preferredQuantum = ourQuantum + theirQuantum;\n if (this.isZero()) {\n return new Decimal128(new Decimal({\n cohort: this.cohort(),\n quantum: preferredQuantum,\n }));\n }\n if (x.isZero()) {\n return new Decimal128(new Decimal({\n cohort: x.cohort(),\n quantum: preferredQuantum,\n }));\n }\n let product = Rational.multiply(ourCohort, theirCohort);\n let actualQuantum = pickQuantum(product, preferredQuantum);\n return new Decimal128(new Decimal({\n cohort: product,\n quantum: actualQuantum,\n }));\n }\n clone() {\n if (this.isNaN()) {\n return new Decimal128(NAN);\n }\n if (!this.isFinite()) {\n return new Decimal128(this.isNegative() ? NEGATIVE_INFINITY : POSITIVE_INFINITY);\n }\n return new Decimal128(new Decimal({ cohort: this.cohort(), quantum: this.quantum() }));\n }\n /**\n * Divide this Decimal128 value by another Decimal128 value.\n *\n * @param x\n */\n divide(x) {\n if (this.isNaN() || x.isNaN()) {\n return new Decimal128(NAN);\n }\n if (x.isZero()) {\n return new Decimal128(NAN);\n }\n if (this.isZero()) {\n return this.clone();\n }\n if (!this.isFinite()) {\n if (!x.isFinite()) {\n return new Decimal128(NAN);\n }\n if (this.isNegative() === x.isNegative()) {\n return new Decimal128(POSITIVE_INFINITY);\n }\n if (this.isNegative()) {\n return this.clone();\n }\n return new Decimal128(NEGATIVE_INFINITY);\n }\n if (!x.isFinite()) {\n if (this.isNegative() === x.isNegative()) {\n return new Decimal128(\"0\");\n }\n return new Decimal128(\"-0\");\n }\n if (this.isNegative()) {\n return this.negate().divide(x).negate();\n }\n if (x.isNegative()) {\n return this.divide(x.negate()).negate();\n }\n let adjust = 0;\n let dividendCoefficient = this.coefficient();\n let divisorCoefficient = x.coefficient();\n if (dividendCoefficient !== 0n) {\n while (dividendCoefficient < divisorCoefficient) {\n dividendCoefficient = dividendCoefficient * 10n;\n adjust++;\n }\n }\n while (dividendCoefficient > divisorCoefficient * 10n) {\n divisorCoefficient = divisorCoefficient * 10n;\n adjust--;\n }\n let resultCoefficient = 0n;\n let done = false;\n while (!done) {\n while (divisorCoefficient <= dividendCoefficient) {\n dividendCoefficient = dividendCoefficient - divisorCoefficient;\n resultCoefficient++;\n }\n if ((dividendCoefficient === 0n && adjust >= 0) ||\n resultCoefficient.toString().length > MAX_SIGNIFICANT_DIGITS) {\n done = true;\n }\n else {\n resultCoefficient = resultCoefficient * 10n;\n dividendCoefficient = dividendCoefficient * 10n;\n adjust++;\n }\n }\n let ourExponent = this.quantum();\n let theirExponent = x.quantum();\n let resultExponent = ourExponent - (theirExponent + adjust);\n return new Decimal128(`${resultCoefficient}E${resultExponent}`);\n }\n /**\n *\n * @param numDecimalDigits\n * @param {RoundingMode} mode (default: ROUNDING_MODE_DEFAULT)\n */\n round(numDecimalDigits = 0, mode = ROUNDING_MODE_HALF_EVEN) {\n if (!ROUNDING_MODES.includes(mode)) {\n throw new RangeError(`Invalid rounding mode \"${mode}\"`);\n }\n if (this.isNaN() || !this.isFinite()) {\n return this.clone();\n }\n if (this.isZero()) {\n return this.clone();\n }\n let v = this.cohort();\n let roundedV = v.round(numDecimalDigits, mode);\n if (roundedV.isZero()) {\n return new Decimal128(new Decimal({\n cohort: v.isNegative ? \"-0\" : \"0\",\n quantum: 0 - numDecimalDigits,\n }));\n }\n return new Decimal128(new Decimal({ cohort: roundedV, quantum: 0 - numDecimalDigits }));\n }\n negate() {\n if (this.isNaN()) {\n return this.clone();\n }\n if (!this.isFinite()) {\n return new Decimal128(this.isNegative() ? POSITIVE_INFINITY : NEGATIVE_INFINITY);\n }\n let v = this.cohort();\n if (v === \"0\") {\n return new Decimal128(new Decimal({ cohort: \"-0\", quantum: this.quantum() }));\n }\n if (v === \"-0\") {\n return new Decimal128(new Decimal({ cohort: \"0\", quantum: this.quantum() }));\n }\n return new Decimal128(new Decimal({\n cohort: v.negate(),\n quantum: this.quantum(),\n }));\n }\n /**\n * Return the remainder of this Decimal128 value divided by another Decimal128 value.\n *\n * @param d\n * @throws RangeError If argument is zero\n */\n remainder(d) {\n if (this.isNaN() || d.isNaN()) {\n return new Decimal128(NAN);\n }\n if (this.isNegative()) {\n return this.negate().remainder(d).negate();\n }\n if (d.isNegative()) {\n return this.remainder(d.negate());\n }\n if (!this.isFinite()) {\n return new Decimal128(NAN);\n }\n if (!d.isFinite()) {\n return this.clone();\n }\n if (d.isZero()) {\n return new Decimal128(NAN);\n }\n if (this.cmp(d) === -1) {\n return this.clone();\n }\n let q = this.divide(d).round(0, ROUNDING_MODE_TRUNCATE);\n return this.subtract(d.multiply(q));\n }\n isNormal() {\n if (this.isNaN()) {\n throw new RangeError(\"Cannot determine whether NaN is normal\");\n }\n if (!this.isFinite()) {\n throw new RangeError(\"Only finite numbers can be said to be normal or not\");\n }\n if (this.isZero()) {\n throw new RangeError(\"Only non-zero numbers can be said to be normal or not\");\n }\n let exp = this.exponent();\n return exp >= NORMAL_EXPONENT_MIN && exp <= NORMAL_EXPONENT_MAX;\n }\n isSubnormal() {\n if (this.isNaN()) {\n throw new RangeError(\"Cannot determine whether NaN is subnormal\");\n }\n if (!this.isFinite()) {\n throw new RangeError(\"Only finite numbers can be said to be subnormal or not\");\n }\n let exp = this.exponent();\n return exp < NORMAL_EXPONENT_MIN;\n }\n truncatedExponent() {\n if (this.isZero() || this.isSubnormal()) {\n return NORMAL_EXPONENT_MIN;\n }\n return this.exponent();\n }\n scaledSignificand() {\n if (this.isNaN()) {\n throw new RangeError(\"NaN does not have a scaled significand\");\n }\n if (!this.isFinite()) {\n throw new RangeError(\"Infinity does not have a scaled significand\");\n }\n if (this.isZero()) {\n return 0n;\n }\n let v = this.cohort();\n let te = this.truncatedExponent();\n let ss = v.scale10(MAX_SIGNIFICANT_DIGITS - 1 - te);\n return ss.numerator;\n }\n}\nDecimal128.prototype.valueOf = function () {\n throw TypeError(\"Decimal128.prototype.valueOf throws unconditionally\");\n};\n"],"names":["Decimal","Rational","ROUNDING_MODE_HALF_EVEN","ROUNDING_MODES","ROUNDING_MODE_TRUNCATE"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAIA,MAAM,YAAY,GAAG,CAAC,IAAI;AAC1B,MAAM,mBAAmB,GAAG,CAAC,IAAI;AACjC,MAAM,YAAY,GAAG,IAAI;AACzB,MAAM,mBAAmB,GAAG,IAAI;AAChC,MAAM,sBAAsB,GAAG,EAAE;AACjC,MAAM,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;AACzB,MAAM,GAAG,GAAG,KAAK;AACjB,MAAM,iBAAiB,GAAG,UAAU;AACpC,MAAM,iBAAiB,GAAG,WAAW;AACrC,MAAM,gBAAgB,GAAG,MAAM,IAAI,MAAM,CAAC,sBAAsB,CAAC;AACjE,SAAS,WAAW,CAAC,CAA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