@eternl/big 0.10.18 → 0.10.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +99 -0
- package/dist/index.cjs +35 -19
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +35 -19
- package/dist/index.mjs.map +1 -1
- package/llms.txt +2 -1
- package/package.json +5 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
License text copyright (c) 2026 Tastenkunst GmbH, All Rights Reserved.
|
|
2
|
+
"Business Source License" is a trademark of MariaDB Corporation Ab.
|
|
3
|
+
|
|
4
|
+
Parameters
|
|
5
|
+
|
|
6
|
+
Licensor: Tastenkunst GmbH (Germany)
|
|
7
|
+
Licensed Work: @eternl/big, as made available in this package
|
|
8
|
+
version.
|
|
9
|
+
Additional Use Grant: None
|
|
10
|
+
|
|
11
|
+
Change Date: The fourth anniversary of the first publicly available
|
|
12
|
+
distribution of each specific version of the Licensed Work.
|
|
13
|
+
|
|
14
|
+
Change License: Version 2 or later of the GNU General Public License as
|
|
15
|
+
published by the Free Software Foundation.
|
|
16
|
+
|
|
17
|
+
For information about alternative licensing arrangements for the Software,
|
|
18
|
+
please visit: https://tastenkunst.com/
|
|
19
|
+
|
|
20
|
+
Notice
|
|
21
|
+
|
|
22
|
+
The Business Source License (this document, or the "License") is not an Open
|
|
23
|
+
Source license. However, the Licensed Work will eventually be made available
|
|
24
|
+
under an Open Source License, as stated in this License.
|
|
25
|
+
|
|
26
|
+
For more information on the use of the Business Source License generally,
|
|
27
|
+
please visit the Adopting and Developing Business Source License FAQ at
|
|
28
|
+
https://mariadb.com/bsl-faq-adopting.
|
|
29
|
+
|
|
30
|
+
-----------------------------------------------------------------------------
|
|
31
|
+
|
|
32
|
+
Business Source License 1.1
|
|
33
|
+
|
|
34
|
+
Terms
|
|
35
|
+
|
|
36
|
+
The Licensor hereby grants you the right to copy, modify, create derivative
|
|
37
|
+
works, redistribute, and make non-production use of the Licensed Work. The
|
|
38
|
+
Licensor may make an Additional Use Grant, above, permitting limited
|
|
39
|
+
production use.
|
|
40
|
+
|
|
41
|
+
Effective on the Change Date, or the fourth anniversary of the first publicly
|
|
42
|
+
available distribution of a specific version of the Licensed Work under this
|
|
43
|
+
License, whichever comes first, the Licensor hereby grants you rights under
|
|
44
|
+
the terms of the Change License, and the rights granted in the paragraph
|
|
45
|
+
above terminate.
|
|
46
|
+
|
|
47
|
+
If your use of the Licensed Work does not comply with the requirements
|
|
48
|
+
currently in effect as described in this License, you must purchase a
|
|
49
|
+
commercial license from the Licensor, its affiliated entities, or authorized
|
|
50
|
+
resellers, or you must refrain from using the Licensed Work.
|
|
51
|
+
|
|
52
|
+
All copies of the original and modified Licensed Work, and derivative works
|
|
53
|
+
of the Licensed Work, are subject to this License. This License applies
|
|
54
|
+
separately for each version of the Licensed Work and the Change Date may vary
|
|
55
|
+
for each version of the Licensed Work released by Licensor.
|
|
56
|
+
|
|
57
|
+
You must conspicuously display this License on each original or modified copy
|
|
58
|
+
of the Licensed Work. If you receive the Licensed Work in original or
|
|
59
|
+
modified form from a third party, the terms and conditions set forth in this
|
|
60
|
+
License apply to your use of that work.
|
|
61
|
+
|
|
62
|
+
Any use of the Licensed Work in violation of this License will automatically
|
|
63
|
+
terminate your rights under this License for the current and all other
|
|
64
|
+
versions of the Licensed Work.
|
|
65
|
+
|
|
66
|
+
This License does not grant you any right in any trademark or logo of
|
|
67
|
+
Licensor or its affiliates (provided that you may use a trademark or logo of
|
|
68
|
+
Licensor as expressly required by this License).
|
|
69
|
+
|
|
70
|
+
TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON
|
|
71
|
+
AN "AS IS" BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS,
|
|
72
|
+
EXPRESS OR IMPLIED, INCLUDING (WITHOUT LIMITATION) WARRANTIES OF
|
|
73
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND
|
|
74
|
+
TITLE.
|
|
75
|
+
|
|
76
|
+
MariaDB hereby grants you permission to use this License's text to license
|
|
77
|
+
your works, and to refer to it using the trademark "Business Source License",
|
|
78
|
+
as long as you comply with the Covenants of Licensor below.
|
|
79
|
+
|
|
80
|
+
Covenants of Licensor
|
|
81
|
+
|
|
82
|
+
In consideration of the right to use this License's text and the "Business
|
|
83
|
+
Source License" name and trademark, Licensor covenants to MariaDB, and to all
|
|
84
|
+
other recipients of the licensed work to be provided by Licensor:
|
|
85
|
+
|
|
86
|
+
1. To specify as the Change License the GPL Version 2.0 or any later version,
|
|
87
|
+
or a license that is compatible with GPL Version 2.0 or a later version,
|
|
88
|
+
where "compatible" means that software provided under the Change License can
|
|
89
|
+
be included in a program with software provided under GPL Version 2.0 or a
|
|
90
|
+
later version. Licensor may specify additional Change Licenses without
|
|
91
|
+
limitation.
|
|
92
|
+
|
|
93
|
+
2. To either: (a) specify an additional grant of rights to use that does not
|
|
94
|
+
impose any additional restriction on the right granted in this License, as
|
|
95
|
+
the Additional Use Grant; or (b) insert the text "None".
|
|
96
|
+
|
|
97
|
+
3. To specify a Change Date.
|
|
98
|
+
|
|
99
|
+
4. Not to modify this License in any other way.
|
package/dist/index.cjs
CHANGED
|
@@ -356,7 +356,10 @@ P._minus = P._sub = function(y) {
|
|
|
356
356
|
return x._plus(yBig);
|
|
357
357
|
}
|
|
358
358
|
if (!xc[0] || !yc[0]) {
|
|
359
|
-
if (!yc[0])
|
|
359
|
+
if (!yc[0]) {
|
|
360
|
+
if (!xc[0]) x.s = xSign < 0 && ySign > 0 ? -1 : 1;
|
|
361
|
+
return x;
|
|
362
|
+
}
|
|
360
363
|
x.c = yc.slice();
|
|
361
364
|
x.e = ye;
|
|
362
365
|
x.s = negateSign(ySign);
|
|
@@ -439,9 +442,12 @@ P._mod = function(y) {
|
|
|
439
442
|
rm = Big.RM;
|
|
440
443
|
Big.DP = 0;
|
|
441
444
|
Big.RM = 0;
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
+
try {
|
|
446
|
+
quotient = new Big(x).div(yBig);
|
|
447
|
+
} finally {
|
|
448
|
+
Big.DP = dp;
|
|
449
|
+
Big.RM = rm;
|
|
450
|
+
}
|
|
445
451
|
return x._minus(quotient.times(yBig));
|
|
446
452
|
};
|
|
447
453
|
P.neg = function() {
|
|
@@ -510,7 +516,10 @@ P._plus = P._add = function(y) {
|
|
|
510
516
|
const xLen = xc.length;
|
|
511
517
|
const yLen = yc.length;
|
|
512
518
|
if (!xc[0] || !yc[0]) {
|
|
513
|
-
if (!yc[0])
|
|
519
|
+
if (!yc[0]) {
|
|
520
|
+
if (!xc[0]) x.s = xs < 0 && ys < 0 ? -1 : 1;
|
|
521
|
+
return x;
|
|
522
|
+
}
|
|
514
523
|
xc.length = yLen;
|
|
515
524
|
for (let i = 0; i < yLen; i++) xc[i] = yc[i] ?? 0;
|
|
516
525
|
x.e = ye;
|
|
@@ -547,13 +556,15 @@ P._plus = P._add = function(y) {
|
|
|
547
556
|
}
|
|
548
557
|
let cmp = 0;
|
|
549
558
|
if (xe != ye) cmp = xe > ye ? 1 : -1;
|
|
550
|
-
else
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
559
|
+
else {
|
|
560
|
+
const maxLen = xLen > yLen ? xLen : yLen;
|
|
561
|
+
for (let i = 0; i < maxLen; i++) {
|
|
562
|
+
const xd = i < xLen ? xc[i] ?? 0 : 0;
|
|
563
|
+
const yd = i < yLen ? yc[i] ?? 0 : 0;
|
|
564
|
+
if (xd != yd) {
|
|
565
|
+
cmp = xd > yd ? 1 : -1;
|
|
566
|
+
break;
|
|
567
|
+
}
|
|
557
568
|
}
|
|
558
569
|
}
|
|
559
570
|
if (cmp === 0) {
|
|
@@ -618,7 +629,7 @@ P.pow = function(n) {
|
|
|
618
629
|
return isneg ? one.div(y) : y;
|
|
619
630
|
};
|
|
620
631
|
P._pow = function(n) {
|
|
621
|
-
var x = this, one = new x.constructor("1"), y =
|
|
632
|
+
var x = this, one = new x.constructor("1"), y = new x.constructor("1"), base = new x.constructor(x), isneg = n < 0;
|
|
622
633
|
if (n !== ~~n || n < -MAX_POWER || n > MAX_POWER) throw Error(INVALID + "exponent");
|
|
623
634
|
if (isneg) n = -n;
|
|
624
635
|
for (;;) {
|
|
@@ -686,12 +697,17 @@ P._sqrt = function() {
|
|
|
686
697
|
r = new Big(c.slice(0, c.indexOf("e") + 1) + e);
|
|
687
698
|
}
|
|
688
699
|
} else r = new Big(s + "");
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
700
|
+
Big.DP += 4;
|
|
701
|
+
e = r.e + Big.DP;
|
|
702
|
+
try {
|
|
703
|
+
do {
|
|
704
|
+
t = r;
|
|
705
|
+
r = half.times(t.plus(x.div(t)));
|
|
706
|
+
} while (t.c.slice(0, e).join("") !== r.c.slice(0, e).join(""));
|
|
707
|
+
} finally {
|
|
708
|
+
Big.DP -= 4;
|
|
709
|
+
}
|
|
710
|
+
return mutateFrom(x, round(r, Big.DP + r.e + 1, Big.RM));
|
|
695
711
|
};
|
|
696
712
|
P.times = P.mul = function(y) {
|
|
697
713
|
var c, x = this, Big = x.constructor, xc = x.c, yBig = new Big(y), yc = yBig.c, a = xc.length, b = yc.length, i = x.e, j = yBig.e;
|
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","names":[],"sources":["../src/index.ts"],"sourcesContent":["declare namespace Big {\n type BigSource = number | string | bigint | Big;\n\n /**\n * GT = 1, EQ = 0, LT = -1\n */\n type Comparison = -1 | 0 | 1;\n\n /**\n * RoundDown = 0, RoundHalfUp = 1, RoundHalfEven = 2, RoundUp = 3\n */\n type RoundingMode = 0 | 1 | 2 | 3;\n\n interface BigConstructor {\n /**\n * Returns a new instance of a Big number object\n *\n * String values may be in exponential, as well as normal (non-exponential) notation.\n * There is no limit to the number of digits of a string value (other than that of Javascript's maximum array size), but the largest recommended exponent magnitude is 1e+6.\n * Infinity, NaN and hexadecimal literal strings, e.g. '0xff', are not valid.\n * String values in octal literal form will be interpreted as decimals, e.g. '011' is 11, not 9.\n *\n * @throws `NaN` on an invalid value.\n */\n new(value: BigSource): Big;\n\n /**\n * Returns a new instance of a Big number object\n *\n * String values may be in exponential, as well as normal (non-exponential) notation.\n * There is no limit to the number of digits of a string value (other than that of Javascript's maximum array size), but the largest recommended exponent magnitude is 1e+6.\n * Infinity, NaN and hexadecimal literal strings, e.g. '0xff', are not valid.\n * String values in octal literal form will be interpreted as decimals, e.g. '011' is 11, not 9.\n *\n * @throws `NaN` on an invalid value.\n */\n (value: BigSource): Big;\n\n /**\n * Create an additional Big number constructor\n *\n * Values created with the returned constructor will have a separate set of configuration values.\n * This can be used to create Big objects with different DP and RM values.\n * Big numbers created by different constructors can be used together in operations, and it is the DP and RM setting of the Big number that an operation is called upon that will apply.\n * In the interest of memory efficiency, all Big number constructors share the same prototype object,\n * so while the DP and RM (and other own properties) of a constructor are isolated and untouchable by another, its prototype methods are not.\n */\n (): BigConstructor;\n\n /**\n * The maximum number of decimal places of the results of operations involving division.\n * It is relevant only to the div and sqrt methods, and the pow method when the exponent is negative.\n *\n * 0 to 1e+6 inclusive\n * Default value: 20\n */\n DP: number;\n /**\n * The rounding mode used in the above operations and by round, toExponential, toFixed and toPrecision.\n * Default value: 1\n */\n RM: number;\n /**\n * The negative exponent value at and below which toString returns exponential notation.\n *\n * -1e+6 to 0 inclusive\n * Default value: -7\n */\n NE: number;\n /**\n * The positive exponent value at and above which toString returns exponential notation.\n *\n * 0 to 1e+6 inclusive\n * Default value: 21\n */\n PE: number;\n /**\n * When set to true, an error will be thrown if a primitive number is passed to the Big constructor,\n * or if valueOf is called, or if toNumber is called on a Big which cannot be converted to a primitive number without a loss of precision.\n *\n * true|false\n * Default value: false\n */\n strict: boolean;\n\n /** Readonly rounding modes */\n\n /**\n * Rounds towards zero.\n * I.e. truncate, no rounding.\n */\n readonly roundDown: 0;\n /**\n * Rounds towards nearest neighbour.\n * If equidistant, rounds away from zero.\n */\n readonly roundHalfUp: 1;\n /**\n * Rounds towards nearest neighbour.\n * If equidistant, rounds towards even neighbour.\n */\n readonly roundHalfEven: 2;\n /**\n * Rounds away from zero.\n */\n readonly roundUp: 3;\n\n readonly Big: BigConstructor;\n }\n\n interface Big {\n /** Returns a Big number whose value is the absolute value, i.e. the magnitude, of this Big number. */\n abs(): Big;\n /**\n * Returns a Big number whose value is the value of this Big number plus n - alias for .plus().\n *\n * @throws `NaN` if n is invalid.\n */\n add(n: BigSource): Big;\n /**\n * Compare the values.\n *\n * @throws `NaN` if n is invalid.\n */\n cmp(n: BigSource): Comparison;\n /**\n * Returns a Big number whose value is the value of this Big number divided by n.\n *\n * If the result has more fraction digits than is specified by Big.DP, it will be rounded to Big.DP decimal places using rounding mode Big.RM.\n *\n * @throws `NaN` if n is invalid.\n * @throws `±Infinity` on division by zero.\n * @throws `NaN` on division of zero by zero.\n */\n div(n: BigSource): Big;\n /**\n * Returns true if the value of this Big equals the value of n, otherwise returns false.\n *\n * @throws `NaN` if n is invalid.\n */\n eq(n: BigSource): boolean;\n /**\n * Returns true if the value of this Big is greater than the value of n, otherwise returns false.\n *\n * @throws `NaN` if n is invalid.\n */\n gt(n: BigSource): boolean;\n /**\n * Returns true if the value of this Big is greater than or equal to the value of n, otherwise returns false.\n *\n * @throws `NaN` if n is invalid.\n */\n gte(n: BigSource): boolean;\n /**\n * Returns true if the value of this Big is less than the value of n, otherwise returns false.\n *\n * @throws `NaN` if n is invalid.\n */\n lt(n: BigSource): boolean;\n /**\n * Returns true if the value of this Big is less than or equal to the value of n, otherwise returns false.\n *\n * @throws `NaN` if n is invalid.\n */\n lte(n: BigSource): boolean;\n /**\n * Returns a Big number whose value is the value of this Big number minus n.\n *\n * @throws `NaN` if n is invalid.\n */\n minus(n: BigSource): Big;\n /**\n * Returns a Big number whose value is the value of this Big number modulo n, i.e. the integer remainder of dividing this Big number by n.\n *\n * The result will have the same sign as this Big number, and it will match that of Javascript's % operator (within the limits of its precision) and BigDecimal's remainder method.\n *\n * @throws `NaN` if n is negative or otherwise invalid.\n */\n mod(n: BigSource): Big;\n /**\n * Returns a Big number whose value is the value of this Big number times n - alias for .times().\n *\n * @throws `NaN` if n is invalid.\n */\n mul(n: BigSource): Big;\n /**\n * Return a new Big whose value is the value of this Big negated.\n */\n neg(): Big;\n /** Mutates this Big to its absolute value and returns this instance. */\n _abs(): Big;\n /** Mutates this Big to its negated value and returns this instance. */\n _neg(): Big;\n /**\n * Returns a Big number whose value is the value of this Big number plus n.\n *\n * @throws `NaN` if n is invalid.\n */\n plus(n: BigSource): Big;\n /** Mutates this Big to the provided source value and returns this instance. */\n _set(n: BigSource): Big;\n /** In-place alias for plus. */\n _plus(n: BigSource): Big;\n /** In-place alias for plus. */\n _add(n: BigSource): Big;\n /** In-place alias for minus. */\n _minus(n: BigSource): Big;\n /** In-place alias for minus. */\n _sub(n: BigSource): Big;\n /** In-place alias for times. */\n _times(n: BigSource): Big;\n /** In-place alias for times. */\n _mul(n: BigSource): Big;\n /** In-place variant of div. */\n _div(n: BigSource): Big;\n /** In-place variant of mod. */\n _mod(n: BigSource): Big;\n /**\n * Returns a Big number whose value is the value of this Big number raised to the power exp.\n *\n * If exp is negative and the result has more fraction digits than is specified by Big.DP, it will be rounded to Big.DP decimal places using rounding mode Big.RM.\n *\n * @param exp The power to raise the number to, -1e+6 to 1e+6 inclusive\n * @throws `!pow!` if exp is invalid.\n *\n * Note: High value exponents may cause this method to be slow to return.\n */\n pow(exp: number): Big;\n /** In-place variant of pow. */\n _pow(exp: number): Big;\n /**\n * Return a new Big whose value is the value of this Big rounded to a maximum precision of sd\n * significant digits using rounding mode rm, or Big.RM if rm is not specified.\n *\n * @param sd Significant digits: integer, 1 to MAX_DP inclusive.\n * @param rm Rounding mode: 0 (down), 1 (half-up), 2 (half-even) or 3 (up).\n * @throws `!prec!` if sd is invalid.\n * @throws `!Big.RM!` if rm is invalid.\n */\n prec(sd: number, rm?: RoundingMode): Big;\n /** In-place variant of prec. */\n _prec(sd: number, rm?: RoundingMode): Big;\n /**\n * Returns a Big number whose value is the value of this Big number rounded using rounding mode rm to a maximum of dp decimal places.\n *\n * @param dp Decimal places, 0 to 1e+6 inclusive\n * @param rm Rounding mode: 0 (down), 1 (half-up), 2 (half-even) or 3 (up).\n * @throws `!round!` if dp is invalid.\n * @throws `!Big.RM!` if rm is invalid.\n */\n round(dp?: number, rm?: RoundingMode): Big;\n /** In-place variant of round. */\n _round(dp?: number, rm?: RoundingMode): Big;\n /**\n * Returns a Big number whose value is the square root of this Big number.\n *\n * If the result has more fraction digits than is specified by Big.DP, it will be rounded to Big.DP decimal places using rounding mode Big.RM.\n *\n * @throws `NaN` if this Big number is negative.\n */\n sqrt(): Big;\n /** In-place variant of sqrt. */\n _sqrt(): Big;\n /**\n * Returns a Big number whose value is the value of this Big number minus n - alias for .minus().\n *\n * @throws `NaN` if n is invalid.\n */\n sub(n: BigSource): Big;\n /**\n * Returns a Big number whose value is the value of this Big number times n.\n *\n * @throws `NaN` if n is invalid.\n */\n times(n: BigSource): Big;\n /**\n * Returns a string representing the value of this Big number in exponential notation to a fixed number of decimal places dp.\n *\n * If the value of this Big number in exponential notation has more digits to the right of the decimal point than is specified by dp,\n * the return value will be rounded to dp decimal places using rounding mode Big.RM.\n *\n * If the value of this Big number in exponential notation has fewer digits to the right of the decimal point than is specified by dp, the return value will be appended with zeros accordingly.\n *\n * If dp is omitted, or is null or undefined, the number of digits after the decimal point defaults to the minimum number of digits necessary to represent the value exactly.\n *\n * @param dp Decimal places, 0 to 1e+6 inclusive\n * @param rm Rounding mode: 0 (down), 1 (half-up), 2 (half-even) or 3 (up).\n * @throws `!toFix!` if dp is invalid.\n */\n toExponential(dp?: number, rm?: RoundingMode): string;\n /**\n * Returns a string representing the value of this Big number in normal notation to a fixed number of decimal places dp.\n *\n * If the value of this Big number in normal notation has more digits to the right of the decimal point than is specified by dp,\n * the return value will be rounded to dp decimal places using rounding mode Big.RM.\n *\n * If the value of this Big number in normal notation has fewer fraction digits then is specified by dp, the return value will be appended with zeros accordingly.\n *\n * Unlike Number.prototype.toFixed, which returns exponential notation if a number is greater or equal to 1021, this method will always return normal notation.\n *\n * If dp is omitted, or is null or undefined, then the return value is simply the value in normal notation.\n * This is also unlike Number.prototype.toFixed, which returns the value to zero decimal places.\n *\n * @param dp Decimal places, 0 to 1e+6 inclusive\n * @param rm Rounding mode: 0 (down), 1 (half-up), 2 (half-even) or 3 (up).\n * @throws `!toFix!` if dp is invalid.\n */\n toFixed(dp?: number, rm?: RoundingMode): string;\n /**\n * Returns a string representing the value of this Big number to the specified number of significant digits sd.\n *\n * If the value of this Big number has more digits than is specified by sd, the return value will be rounded to sd significant digits using rounding mode Big.RM.\n *\n * If the value of this Big number has fewer digits than is specified by sd, the return value will be appended with zeros accordingly.\n *\n * If sd is less than the number of digits necessary to represent the integer part of the value in normal notation, then exponential notation is used.\n *\n * If sd is omitted, or is null or undefined, then the return value is the same as .toString().\n *\n * @param sd Significant digits, 1 to 1e+6 inclusive\n * @param rm Rounding mode: 0 (down), 1 (half-up), 2 (half-even) or 3 (up).\n * @throws `!toPre!` if sd is invalid.\n */\n toPrecision(sd?: number, rm?: RoundingMode): string;\n /**\n * Returns a string representing the value of this Big number.\n *\n * If this Big number has a positive exponent that is equal to or greater than 21, or a negative exponent equal to or less than -7, then exponential notation is returned.\n *\n * The point at which toString returns exponential rather than normal notation can be adjusted by changing\n * the value of Big.E_POS and Big.E_NEG. By default, Big numbers correspond to Javascript's number type in this regard.\n */\n toString(): string;\n /**\n * Returns a primitive number representing the value of this Big number.\n *\n * If Big.strict is true an error will be thrown if toNumber is called on a Big number which cannot be converted to a primitive number without a loss of precision.\n *\n * @since 6.0\n */\n toNumber(): number;\n /**\n * Returns a primitive bigint representing the value of this Big number.\n *\n * @throws if this Big number is not an integer.\n */\n toBigInt(): bigint;\n /**\n * Returns a string representing the value of this Big number.\n *\n * If this Big number has a positive exponent that is equal to or greater than 21, or a negative exponent equal to or less than -7, then exponential notation is returned.\n *\n * The point at which toString returns exponential rather than normal notation can be adjusted by changing\n * the value of Big.E_POS and Big.E_NEG. By default, Big numbers correspond to Javascript's number type in this regard.\n */\n valueOf(): string;\n /**\n * Returns a string representing the value of this Big number.\n *\n * If this Big number has a positive exponent that is equal to or greater than 21, or a negative exponent equal to or less than -7, then exponential notation is returned.\n *\n * The point at which toString returns exponential rather than normal notation can be adjusted by changing\n * the value of Big.E_POS and Big.E_NEG. By default, Big numbers correspond to Javascript's number type in this regard.\n */\n toJSON(): string;\n /**\n * Returns an array of single digits\n */\n c: number[];\n /**\n * Returns the exponent, Integer, -1e+6 to 1e+6 inclusive\n */\n e: number;\n /**\n * Returns the sign, -1 or 1\n */\n s: number;\n }\n}\n\ntype Big = Big.Big\ntype BigConstructor = Big.BigConstructor\n\nexport type BigSource = Big.BigSource\nexport type Comparison = Big.Comparison\nexport type RoundingMode = Big.RoundingMode\nexport type BigInstance = Big\n\ntype InternalSign = 1 | -1\ntype InternalDigits = number[]\ntype InternalSource = BigSource | InternalBig\n\ninterface InternalBig extends InternalBigProto {\n c: InternalDigits\n e: number\n s: InternalSign\n constructor: InternalBigConstructor\n}\n\ninterface InternalBigConstructor {\n (): InternalBigConstructor\n (value: InternalSource): InternalBig\n new (value: InternalSource): InternalBig\n DP: number\n RM: RoundingMode\n NE: number\n PE: number\n strict: boolean\n roundDown: 0\n roundHalfUp: 1\n roundHalfEven: 2\n roundUp: 3\n prototype: InternalBigProto\n}\n\ninterface InternalBigProto {\n abs(this: InternalBig): InternalBig\n _abs(this: InternalBig): InternalBig\n _set(this: InternalBig, y: InternalSource): InternalBig\n cmp(this: InternalBig, y: InternalSource): Comparison\n div(this: InternalBig, y: InternalSource): InternalBig\n _div(this: InternalBig, y: InternalSource): InternalBig\n eq(this: InternalBig, y: InternalSource): boolean\n gt(this: InternalBig, y: InternalSource): boolean\n gte(this: InternalBig, y: InternalSource): boolean\n lt(this: InternalBig, y: InternalSource): boolean\n lte(this: InternalBig, y: InternalSource): boolean\n minus(this: InternalBig, y: InternalSource): InternalBig\n sub(this: InternalBig, y: InternalSource): InternalBig\n _minus(this: InternalBig, y: InternalSource): InternalBig\n _sub(this: InternalBig, y: InternalSource): InternalBig\n mod(this: InternalBig, y: InternalSource): InternalBig\n _mod(this: InternalBig, y: InternalSource): InternalBig\n neg(this: InternalBig): InternalBig\n _neg(this: InternalBig): InternalBig\n plus(this: InternalBig, y: InternalSource): InternalBig\n add(this: InternalBig, y: InternalSource): InternalBig\n _plus(this: InternalBig, y: InternalSource): InternalBig\n _add(this: InternalBig, y: InternalSource): InternalBig\n pow(this: InternalBig, n: number): InternalBig\n _pow(this: InternalBig, n: number): InternalBig\n prec(this: InternalBig, sd: number, rm?: RoundingMode): InternalBig\n _prec(this: InternalBig, sd: number, rm?: RoundingMode): InternalBig\n round(this: InternalBig, dp?: number, rm?: RoundingMode): InternalBig\n _round(this: InternalBig, dp?: number, rm?: RoundingMode): InternalBig\n sqrt(this: InternalBig): InternalBig\n _sqrt(this: InternalBig): InternalBig\n times(this: InternalBig, y: InternalSource): InternalBig\n mul(this: InternalBig, y: InternalSource): InternalBig\n _times(this: InternalBig, y: InternalSource): InternalBig\n _mul(this: InternalBig, y: InternalSource): InternalBig\n toExponential(this: InternalBig, dp?: number, rm?: RoundingMode): string\n toFixed(this: InternalBig, dp?: number, rm?: RoundingMode): string\n toJSON(this: InternalBig): string\n toString(this: InternalBig): string\n toNumber(this: InternalBig): number\n toBigInt(this: InternalBig): bigint\n toPrecision(this: InternalBig, sd?: number, rm?: RoundingMode): string\n valueOf(this: InternalBig): string\n [symbolKey: symbol]: ((this: InternalBig) => string) | undefined\n}\n\n/*\n * big.js v7.0.1\n * A small, fast, easy-to-use library for arbitrary-precision decimal arithmetic.\n * Copyright (c) 2025 Michael Mclaughlin\n * https://github.com/MikeMcl/big.js/LICENCE.md\n */\n\n\n/************************************** EDITABLE DEFAULTS *****************************************/\n\n\n // The default values below must be integers within the stated ranges.\n\n /*\n * The maximum number of decimal places (DP) of the results of operations involving division:\n * div and sqrt, and pow with negative exponents.\n */\nvar DP = 20, // 0 to MAX_DP\n\n /*\n * The rounding mode (RM) used when rounding to the above decimal places.\n *\n * 0 Towards zero (i.e. truncate, no rounding). (ROUND_DOWN)\n * 1 To nearest neighbour. If equidistant, round up. (ROUND_HALF_UP)\n * 2 To nearest neighbour. If equidistant, to even. (ROUND_HALF_EVEN)\n * 3 Away from zero. (ROUND_UP)\n */\n RM = 1 as RoundingMode, // 0, 1, 2 or 3\n\n // The maximum value of DP and Big.DP.\n MAX_DP = 1E6, // 0 to 1000000\n\n // The maximum magnitude of the exponent argument to the pow method.\n MAX_POWER = 1E6, // 1 to 1000000\n\n /*\n * The negative exponent (NE) at and beneath which toString returns exponential notation.\n * (JavaScript numbers: -7)\n * -1000000 is the minimum recommended exponent value of a Big.\n */\n NE = -7, // 0 to -1000000\n\n /*\n * The positive exponent (PE) at and above which toString returns exponential notation.\n * (JavaScript numbers: 21)\n * 1000000 is the maximum recommended exponent value of a Big, but this limit is not enforced.\n */\n PE = 21, // 0 to 1000000\n\n /*\n * When true, an error will be thrown if a primitive number is passed to the Big constructor,\n * or if valueOf is called, or if toNumber is called on a Big which cannot be converted to a\n * primitive number without a loss of precision.\n */\n STRICT = false, // true or false\n\n\n/**************************************************************************************************/\n\n\n // Error messages.\n NAME = '[big.js] ',\n INVALID = NAME + 'Invalid ',\n INVALID_DP = INVALID + 'decimal places',\n INVALID_RM = INVALID + 'rounding mode',\n DIV_BY_ZERO = NAME + 'Division by zero',\n\n // The shared prototype object.\n P = {} as unknown as InternalBigProto,\n UNDEFINED = void 0,\n NUMERIC = /^-?(\\d+(\\.\\d*)?|\\.\\d+)(e[+-]?\\d+)?$/i;\n\nconst SOURCE_BUFFER: InternalDigits = []\nlet SOURCE_C: InternalDigits = SOURCE_BUFFER\nlet SOURCE_E = 0\nlet SOURCE_S: InternalSign = 1\n\n\n/*\n * Create and return a Big constructor.\n */\nfunction _Big_(): InternalBigConstructor {\n\n /*\n * The Big constructor and exported function.\n * Create and return a new instance of a Big number object.\n *\n * n {number|string|Big} A numeric value.\n */\n function Big(this: unknown, n?: InternalSource): InternalBig | InternalBigConstructor | void {\n const Ctor = Big as unknown as InternalBigConstructor\n const x = this as unknown\n\n // Enable constructor usage without new.\n if (!(x instanceof Ctor)) {\n return n === UNDEFINED && arguments.length === 0 ? _Big_() : new Ctor(n as InternalSource);\n }\n\n const instance = x as InternalBig\n\n // Duplicate.\n if (n instanceof Ctor) {\n instance.s = n.s;\n instance.e = n.e;\n instance.c = n.c.slice();\n } else {\n let value = n\n\n if (typeof value !== 'string') {\n if (Ctor.strict === true && typeof value !== 'bigint') {\n throw TypeError(INVALID + 'value');\n }\n\n // Minus zero?\n value = value === 0 && 1 / value < 0 ? '-0' : String(value);\n }\n\n parse(instance, value);\n }\n\n // Retain a reference to this Big constructor.\n // Shadow Big.prototype.constructor which points to Object.\n instance.constructor = Ctor;\n }\n\n const Ctor = Big as unknown as InternalBigConstructor\n\n Ctor.prototype = P;\n Ctor.DP = DP;\n Ctor.RM = RM;\n Ctor.NE = NE;\n Ctor.PE = PE;\n Ctor.strict = STRICT;\n Ctor.roundDown = 0;\n Ctor.roundHalfUp = 1;\n Ctor.roundHalfEven = 2;\n Ctor.roundUp = 3;\n\n return Ctor;\n}\n\nfunction negateSign(s: InternalSign): InternalSign {\n return s === 1 ? -1 : 1;\n}\n\nfunction mutateFrom(x: InternalBig, y: InternalBig): InternalBig {\n x.c = y.c;\n x.e = y.e;\n x.s = y.s;\n return x;\n}\n\n\n/*\n * Parse the number or string value passed to a Big constructor.\n *\n * x {Big} A Big number instance.\n * n {number|string} A numeric value.\n */\nfunction parse(x: InternalBig, n: string): InternalBig {\n var e, i, nl;\n\n if (!NUMERIC.test(n)) {\n throw Error(INVALID + 'number');\n }\n\n // Determine sign.\n x.s = n.charAt(0) == '-' ? (n = n.slice(1), -1) : 1;\n\n // Decimal point?\n if ((e = n.indexOf('.')) > -1) n = n.replace('.', '');\n\n // Exponential form?\n if ((i = n.search(/e/i)) > 0) {\n\n // Determine exponent.\n if (e < 0) e = i;\n e += +n.slice(i + 1);\n n = n.substring(0, i);\n } else if (e < 0) {\n\n // Integer.\n e = n.length;\n }\n\n nl = n.length;\n\n // Determine leading zeros.\n for (i = 0; i < nl && n.charAt(i) == '0';) ++i;\n\n if (i == nl) {\n\n // Zero.\n x.c = [x.e = 0];\n } else {\n\n // Determine trailing zeros.\n for (; nl > 0 && n.charAt(--nl) == '0';);\n x.e = e - i - 1;\n x.c = [];\n\n // Convert string to array of digits without leading/trailing zeros.\n for (e = 0; i <= nl;) x.c[e++] = +n.charAt(i++);\n }\n\n return x;\n}\n\nfunction isInternalBigSource(value: InternalSource): value is InternalBig {\n return typeof value === 'object'\n}\n\nfunction parseSourceString(n: string): void {\n let e: number\n let i: number\n let nl: number\n\n if (!NUMERIC.test(n)) {\n throw Error(INVALID + 'number')\n }\n\n SOURCE_S = n.charAt(0) == '-' ? (n = n.slice(1), -1) : 1\n\n if ((e = n.indexOf('.')) > -1) n = n.replace('.', '')\n\n if ((i = n.search(/e/i)) > 0) {\n if (e < 0) e = i\n e += +n.slice(i + 1)\n n = n.substring(0, i)\n } else if (e < 0) {\n e = n.length\n }\n\n nl = n.length\n\n for (i = 0; i < nl && n.charAt(i) == '0';) ++i\n\n if (i == nl) {\n SOURCE_E = 0\n SOURCE_C = SOURCE_BUFFER\n SOURCE_C.length = 1\n SOURCE_C[0] = 0\n return\n }\n\n for (; nl > 0 && n.charAt(--nl) == '0';);\n\n SOURCE_E = e - i - 1\n SOURCE_C = SOURCE_BUFFER\n SOURCE_C.length = 0\n\n for (e = 0; i <= nl;) SOURCE_C[e++] = +n.charAt(i++)\n}\n\nfunction loadSourceParts(Big: InternalBigConstructor, value: InternalSource): void {\n if (isInternalBigSource(value)) {\n SOURCE_C = value.c\n SOURCE_E = value.e\n SOURCE_S = value.s\n return\n }\n\n let n = value\n\n if (typeof n !== 'string') {\n if (Big.strict === true && typeof n !== 'bigint') {\n throw TypeError(INVALID + 'value')\n }\n\n n = n === 0 && 1 / n < 0 ? '-0' : String(n)\n }\n\n parseSourceString(n)\n}\n\n\n/*\n * Round Big x to a maximum of sd significant digits using rounding mode rm.\n *\n * x {Big} The Big to round.\n * sd {number} Significant digits: integer, 0 to MAX_DP inclusive.\n * rm {number} Rounding mode: 0 (down), 1 (half-up), 2 (half-even) or 3 (up).\n * [more] {boolean} Whether the result of division was truncated.\n */\nfunction round(x: InternalBig, sd: number, rm?: RoundingMode, more?: boolean): InternalBig {\n var xc = x.c;\n var d0 = xc[0] ?? 0;\n\n if (rm === UNDEFINED) rm = x.constructor.RM;\n if (rm !== 0 && rm !== 1 && rm !== 2 && rm !== 3) {\n throw Error(INVALID_RM);\n }\n\n if (sd < 1) {\n more =\n rm === 3 && (more || !!xc[0]) || sd === 0 && (\n rm === 1 && d0 >= 5 ||\n rm === 2 && (d0 > 5 || d0 === 5 && (more || xc[1] !== UNDEFINED))\n );\n\n xc.length = 1;\n\n if (more) {\n\n // 1, 0.1, 0.01, 0.001, 0.0001 etc.\n x.e = x.e - sd + 1;\n xc[0] = 1;\n } else {\n\n // Zero.\n xc[0] = x.e = 0;\n }\n } else if (sd < xc.length) {\n d0 = xc[sd] ?? 0;\n\n // xc[sd] is the digit after the digit that may be rounded up.\n more =\n rm === 1 && d0 >= 5 ||\n rm === 2 && (d0 > 5 || d0 === 5 &&\n (more || xc[sd + 1] !== UNDEFINED || ((xc[sd - 1] ?? 0) & 1) === 1)) ||\n rm === 3 && (more || !!xc[0]);\n\n // Remove extra digits after the required precision.\n xc.length = sd;\n\n // Round up?\n if (more) {\n\n // Rounding up may mean the previous digit has to be rounded up.\n for (; ++(xc[--sd]!) > 9;) {\n xc[sd] = 0;\n if (sd === 0) {\n ++x.e;\n xc.unshift(1);\n break;\n }\n }\n }\n\n // Remove trailing zeros.\n for (sd = xc.length; !xc[--sd];) xc.pop();\n }\n\n return x;\n}\n\n\n/*\n * Return a string representing the value of Big x in normal or exponential notation.\n * Handles P.toExponential, P.toFixed, P.toJSON, P.toPrecision, P.toString and P.valueOf.\n */\nfunction stringify(x: InternalBig, doExponential: boolean, isNonzero: boolean): string {\n var e = x.e,\n s = x.c.join(''),\n n = s.length;\n\n // Exponential notation?\n if (doExponential) {\n s = s.charAt(0) + (n > 1 ? '.' + s.slice(1) : '') + (e < 0 ? 'e' : 'e+') + e;\n\n // Normal notation.\n } else if (e < 0) {\n for (; ++e;) s = '0' + s;\n s = '0.' + s;\n } else if (e > 0) {\n if (++e > n) {\n for (e -= n; e--;) s += '0';\n } else if (e < n) {\n s = s.slice(0, e) + '.' + s.slice(e);\n }\n } else if (n > 1) {\n s = s.charAt(0) + '.' + s.slice(1);\n }\n\n return x.s < 0 && isNonzero ? '-' + s : s;\n}\n\n\n// Prototype/instance methods\n\n\n/*\n * Return a new Big whose value is the absolute value of this Big.\n */\nP.abs = function (this: InternalBig) {\n var x = new this.constructor(this);\n x.s = 1;\n return x;\n};\n\nP._abs = function (this: InternalBig): InternalBig {\n if (this.s < 0) this.s = 1;\n return this;\n};\n\nP._set = function (this: InternalBig, y: InternalSource): InternalBig {\n const x = this\n const Big = x.constructor\n\n loadSourceParts(Big, y)\n\n const yc = SOURCE_C\n const yl = yc.length\n\n x.c.length = yl\n for (let i = 0; i < yl; i++) x.c[i] = yc[i] ?? 0\n\n x.e = SOURCE_E\n x.s = SOURCE_S\n\n return x\n};\n\n\n/*\n * Return 1 if the value of this Big is greater than the value of Big y,\n * -1 if the value of this Big is less than the value of Big y, or\n * 0 if they have the same value.\n */\nP.cmp = function (this: InternalBig, y: InternalSource): Comparison {\n var i, j,\n isneg,\n x = this,\n xc = x.c,\n yBig = new x.constructor(y),\n yc = yBig.c,\n xs = x.s,\n ys = yBig.s,\n k = x.e,\n l = yBig.e;\n\n // Either zero?\n if (!xc[0] || !yc[0]) return (!xc[0] ? !yc[0] ? 0 : negateSign(ys) : xs) as Comparison;\n\n // Signs differ?\n if (xs != ys) return xs as Comparison;\n\n isneg = xs < 0;\n\n // Compare exponents.\n if (k != l) return (((k > l ? 1 : 0) ^ (isneg ? 1 : 0)) ? 1 : -1) as Comparison;\n\n j = (k = xc.length) < (l = yc.length) ? k : l;\n\n // Compare digit by digit.\n for (i = -1; ++i < j;) {\n if (xc[i] != yc[i]) return (((xc[i]! > yc[i]! ? 1 : 0) ^ (isneg ? 1 : 0)) ? 1 : -1) as Comparison;\n }\n\n // Compare lengths.\n return (k == l ? 0 : ((k > l ? 1 : 0) ^ (isneg ? 1 : 0)) ? 1 : -1) as Comparison;\n};\n\n\n/*\n * Return a new Big whose value is the value of this Big divided by the value of Big y, rounded,\n * if necessary, to a maximum of Big.DP decimal places using rounding mode Big.RM.\n */\nP.div = function (this: InternalBig, y: InternalSource): InternalBig {\n var x = this,\n Big = x.constructor,\n a = x.c, // dividend\n yBig = new Big(y),\n b = yBig.c, // divisor\n sign: InternalSign = x.s == yBig.s ? 1 : -1,\n dp = Big.DP;\n\n if (dp !== ~~dp || dp < 0 || dp > MAX_DP) {\n throw Error(INVALID_DP);\n }\n\n // Divisor is zero?\n if (!b[0]) {\n throw Error(DIV_BY_ZERO);\n }\n\n // Dividend is 0? Return +-0.\n if (!a[0]) {\n yBig.s = sign;\n yBig.c = [yBig.e = 0];\n return yBig;\n }\n\n var bl, bt, n, cmp, ri,\n bz = b.slice(),\n ai = bl = b.length,\n al = a.length,\n r = a.slice(0, bl) as Array<number | undefined>, // remainder\n rl = r.length,\n q = yBig, // quotient\n qc = q.c = [] as InternalDigits,\n qi = 0,\n p = dp + (q.e = x.e - yBig.e) + 1, // precision of the result\n k = p < 0 ? 0 : p;\n\n q.s = sign;\n\n // Create version of divisor with leading zero.\n bz.unshift(0);\n\n // Add zeros to make remainder as long as divisor.\n for (; rl++ < bl;) r.push(0);\n\n do {\n\n // n is how many times the divisor goes into current remainder.\n for (n = 0; n < 10; n++) {\n\n // Compare divisor and remainder.\n if (bl != (rl = r.length)) {\n cmp = bl > rl ? 1 : -1;\n } else {\n for (ri = -1, cmp = 0; ++ri < bl;) {\n if (b[ri] != r[ri]) {\n cmp = b[ri]! > r[ri]! ? 1 : -1;\n break;\n }\n }\n }\n\n // If divisor < remainder, subtract divisor from remainder.\n if (cmp < 0) {\n\n // Remainder can't be more than 1 digit longer than divisor.\n // Equalise lengths using divisor with extra leading zero?\n for (bt = rl == bl ? b : bz; rl;) {\n if (r[--rl]! < bt[rl]!) {\n ri = rl;\n for (; ri && !r[--ri];) r[ri] = 9;\n --r[ri]!;\n r[rl] = (r[rl] ?? 0) + 10;\n }\n r[rl] = (r[rl] ?? 0) - bt[rl]!;\n }\n\n for (; !r[0];) r.shift();\n } else {\n break;\n }\n }\n\n // Add the digit n to the result array.\n qc[qi++] = cmp ? n : ++n;\n\n // Update the remainder.\n if (r[0] && cmp) r[rl] = a[ai] || 0;\n else r = [a[ai]];\n\n } while ((ai++ < al || r[0] !== UNDEFINED) && k--);\n\n // Leading zero? Do not remove if result is simply zero (qi == 1).\n if (!qc[0] && qi != 1) {\n\n // There can't be more than one zero.\n qc.shift();\n q.e--;\n p--;\n }\n\n // Round?\n if (qi > p) round(q, p, Big.RM, r[0] !== UNDEFINED);\n\n return q;\n};\n\nP._div = function (this: InternalBig, y: InternalSource): InternalBig {\n var x = this,\n Big = x.constructor,\n a = x.c.slice(), // dividend\n yBig = new Big(y),\n b = yBig.c, // divisor\n sign: InternalSign = x.s == yBig.s ? 1 : -1,\n dp = Big.DP;\n\n if (dp !== ~~dp || dp < 0 || dp > MAX_DP) {\n throw Error(INVALID_DP);\n }\n\n // Divisor is zero?\n if (!b[0]) {\n throw Error(DIV_BY_ZERO);\n }\n\n // Dividend is 0? Return +-0.\n if (!a[0]) {\n x.s = sign;\n x.c = [x.e = 0];\n return x;\n }\n\n var bl, bt, n, cmp, ri,\n bz = b.slice(),\n ai = bl = b.length,\n al = a.length,\n r = a.slice(0, bl) as Array<number | undefined>, // remainder\n rl = r.length,\n q = x, // quotient (in place)\n qc = q.c = [] as InternalDigits,\n qi = 0,\n p = dp + (q.e = x.e - yBig.e) + 1, // precision of the result\n k = p < 0 ? 0 : p;\n\n q.s = sign;\n\n // Create version of divisor with leading zero.\n bz.unshift(0);\n\n // Add zeros to make remainder as long as divisor.\n for (; rl++ < bl;) r.push(0);\n\n do {\n\n // n is how many times the divisor goes into current remainder.\n for (n = 0; n < 10; n++) {\n\n // Compare divisor and remainder.\n if (bl != (rl = r.length)) {\n cmp = bl > rl ? 1 : -1;\n } else {\n for (ri = -1, cmp = 0; ++ri < bl;) {\n if (b[ri] != r[ri]) {\n cmp = b[ri]! > r[ri]! ? 1 : -1;\n break;\n }\n }\n }\n\n // If divisor < remainder, subtract divisor from remainder.\n if (cmp < 0) {\n\n // Remainder can't be more than 1 digit longer than divisor.\n // Equalise lengths using divisor with extra leading zero?\n for (bt = rl == bl ? b : bz; rl;) {\n if (r[--rl]! < bt[rl]!) {\n ri = rl;\n for (; ri && !r[--ri];) r[ri] = 9;\n --r[ri]!;\n r[rl] = (r[rl] ?? 0) + 10;\n }\n r[rl] = (r[rl] ?? 0) - bt[rl]!;\n }\n\n for (; !r[0];) r.shift();\n } else {\n break;\n }\n }\n\n // Add the digit n to the result array.\n qc[qi++] = cmp ? n : ++n;\n\n // Update the remainder.\n if (r[0] && cmp) r[rl] = a[ai] || 0;\n else r = [a[ai]];\n\n } while ((ai++ < al || r[0] !== UNDEFINED) && k--);\n\n // Leading zero? Do not remove if result is simply zero (qi == 1).\n if (!qc[0] && qi != 1) {\n\n // There can't be more than one zero.\n qc.shift();\n q.e--;\n p--;\n }\n\n // Round?\n if (qi > p) round(q, p, Big.RM, r[0] !== UNDEFINED);\n\n return q;\n};\n\n\n/*\n * Return true if the value of this Big is equal to the value of Big y, otherwise return false.\n */\nP.eq = function (this: InternalBig, y: InternalSource): boolean {\n return this.cmp(y) === 0;\n};\n\n\n/*\n * Return true if the value of this Big is greater than the value of Big y, otherwise return\n * false.\n */\nP.gt = function (this: InternalBig, y: InternalSource): boolean {\n return this.cmp(y) > 0;\n};\n\n\n/*\n * Return true if the value of this Big is greater than or equal to the value of Big y, otherwise\n * return false.\n */\nP.gte = function (this: InternalBig, y: InternalSource): boolean {\n return this.cmp(y) > -1;\n};\n\n\n/*\n * Return true if the value of this Big is less than the value of Big y, otherwise return false.\n */\nP.lt = function (this: InternalBig, y: InternalSource): boolean {\n return this.cmp(y) < 0;\n};\n\n\n/*\n * Return true if the value of this Big is less than or equal to the value of Big y, otherwise\n * return false.\n */\nP.lte = function (this: InternalBig, y: InternalSource): boolean {\n return this.cmp(y) < 1;\n};\n\n\n/*\n * Return a new Big whose value is the value of this Big minus the value of Big y.\n */\nP.minus = P.sub = function (this: InternalBig, y: InternalSource): InternalBig {\n var i, j, t, xlty,\n x = this,\n Big = x.constructor,\n yBig = new Big(y),\n a = x.s,\n b = yBig.s;\n\n // Signs differ?\n if (a != b) {\n yBig.s = negateSign(b);\n return x.plus(yBig);\n }\n\n var xc = x.c.slice(),\n xe = x.e,\n yc = yBig.c,\n ye = yBig.e,\n aDiff = xe - ye;\n\n // Either zero?\n if (!xc[0] || !yc[0]) {\n if (yc[0]) {\n yBig.s = negateSign(b);\n } else if (xc[0]) {\n yBig = new Big(x);\n } else {\n yBig.s = 1;\n }\n return yBig;\n }\n\n // Determine which is the bigger number. Prepend zeros to equalise exponents.\n if (aDiff) {\n\n if (xlty = aDiff < 0) {\n aDiff = -aDiff;\n t = xc;\n } else {\n ye = xe;\n t = yc;\n }\n\n t.reverse();\n for (j = aDiff; j--;) t.push(0);\n t.reverse();\n } else {\n\n // Exponents equal. Check digit by digit.\n j = ((xlty = xc.length < yc.length) ? xc : yc).length;\n\n for (i = 0; i < j; i++) {\n if (xc[i] != yc[i]) {\n xlty = xc[i]! < yc[i]!;\n break;\n }\n }\n }\n\n // x < y? Point xc to the array of the bigger number.\n if (xlty) {\n t = xc;\n xc = yc;\n yc = t;\n yBig.s = negateSign(yBig.s);\n }\n\n /*\n * Append zeros to xc if shorter. No need to add zeros to yc if shorter as subtraction only\n * needs to start at yc.length.\n */\n if ((j = yc.length - (i = xc.length)) > 0) for (; j--;) xc[i++] = 0;\n\n // Subtract yc from xc.\n for (j = i; j > aDiff;) {\n if (xc[--j]! < (yc[j] ?? 0)) {\n for (i = j; i && !xc[--i];) xc[i] = 9;\n --xc[i]!;\n xc[j] = (xc[j] ?? 0) + 10;\n }\n\n xc[j] = (xc[j] ?? 0) - (yc[j] ?? 0);\n }\n\n // Remove trailing zeros.\n for (j = xc.length; xc[--j] === 0;) xc.pop();\n\n // Remove leading zeros and adjust exponent accordingly.\n for (; xc[0] === 0;) {\n xc.shift();\n --ye;\n }\n\n if (!xc[0]) {\n\n // n - n = +0\n yBig.s = 1;\n\n // Result must be zero.\n xc = [ye = 0];\n }\n\n yBig.c = xc;\n yBig.e = ye;\n\n return yBig;\n};\n\nP._minus = P._sub = function (this: InternalBig, y: InternalSource): InternalBig {\n var i, j, t, xlty,\n x = this,\n Big = x.constructor,\n yBig = new Big(y),\n xSign = x.s,\n ySign = yBig.s,\n xc = x.c.slice(),\n xe = x.e,\n yc = yBig.c,\n ye = yBig.e,\n eDiff = xe - ye;\n\n // Signs differ?\n if (xSign != ySign) {\n yBig.s = negateSign(ySign);\n return x._plus(yBig);\n }\n\n // Either zero?\n if (!xc[0] || !yc[0]) {\n if (!yc[0]) return x;\n\n x.c = yc.slice();\n x.e = ye;\n x.s = negateSign(ySign);\n\n if (!x.c[0]) x.s = 1;\n return x;\n }\n\n // Determine which is the bigger number. Prepend zeros to equalise exponents.\n if (eDiff) {\n\n if (xlty = eDiff < 0) {\n eDiff = -eDiff;\n t = xc;\n } else {\n ye = xe;\n t = yc;\n }\n\n t.reverse();\n for (j = eDiff; j--;) t.push(0);\n t.reverse();\n } else {\n\n // Exponents equal. Check digit by digit.\n j = ((xlty = xc.length < yc.length) ? xc : yc).length;\n\n for (i = 0; i < j; i++) {\n if (xc[i] != yc[i]) {\n xlty = xc[i]! < yc[i]!;\n break;\n }\n }\n }\n\n // x < y? Point xc to the array of the bigger number.\n if (xlty) {\n t = xc;\n xc = yc;\n yc = t;\n xSign = negateSign(xSign);\n }\n\n /*\n * Append zeros to xc if shorter. No need to add zeros to yc if shorter as subtraction only\n * needs to start at yc.length.\n */\n if ((j = yc.length - (i = xc.length)) > 0) for (; j--;) xc[i++] = 0;\n\n // Subtract yc from xc.\n for (j = i; j > eDiff;) {\n if (xc[--j]! < (yc[j] ?? 0)) {\n for (i = j; i && !xc[--i];) xc[i] = 9;\n --xc[i]!;\n xc[j] = (xc[j] ?? 0) + 10;\n }\n\n xc[j] = (xc[j] ?? 0) - (yc[j] ?? 0);\n }\n\n // Remove trailing zeros.\n for (j = xc.length; xc[--j] === 0;) xc.pop();\n\n // Remove leading zeros and adjust exponent accordingly.\n for (; xc[0] === 0;) {\n xc.shift();\n --ye;\n }\n\n if (!xc[0]) {\n\n // n - n = +0\n xSign = 1;\n\n // Result must be zero.\n xc = [ye = 0];\n }\n\n x.c = xc;\n x.e = ye;\n x.s = xSign;\n\n return x;\n};\n\n\n/*\n * Return a new Big whose value is the value of this Big modulo the value of Big y.\n */\nP.mod = function (this: InternalBig, y: InternalSource): InternalBig {\n var ygtx,\n x = this,\n Big = x.constructor,\n yBig = new Big(y),\n xSign = x.s,\n ySign = yBig.s,\n dp: number,\n rm: RoundingMode;\n\n if (!yBig.c[0]) {\n throw Error(DIV_BY_ZERO);\n }\n\n x.s = yBig.s = 1;\n ygtx = yBig.cmp(x) == 1;\n x.s = xSign;\n yBig.s = ySign;\n\n if (ygtx) return new Big(x);\n\n dp = Big.DP;\n rm = Big.RM;\n Big.DP = 0;\n Big.RM = 0;\n x = x.div(yBig);\n Big.DP = dp;\n Big.RM = rm;\n\n return this.minus(x.times(yBig));\n};\n\nP._mod = function (this: InternalBig, y: InternalSource): InternalBig {\n var ygtx,\n x = this,\n Big = x.constructor,\n yBig = new Big(y),\n xSign = x.s,\n ySign = yBig.s,\n dp: number,\n rm: RoundingMode,\n quotient: InternalBig;\n\n if (!yBig.c[0]) {\n throw Error(DIV_BY_ZERO);\n }\n\n x.s = yBig.s = 1;\n ygtx = yBig.cmp(x) == 1;\n x.s = xSign;\n yBig.s = ySign;\n\n if (ygtx) return x;\n\n dp = Big.DP;\n rm = Big.RM;\n Big.DP = 0;\n Big.RM = 0;\n quotient = new Big(x).div(yBig);\n Big.DP = dp;\n Big.RM = rm;\n\n return x._minus(quotient.times(yBig));\n};\n\n\n/*\n * Return a new Big whose value is the value of this Big negated.\n */\nP.neg = function (this: InternalBig): InternalBig {\n var x = new this.constructor(this);\n x.s = negateSign(x.s);\n return x;\n};\n\nP._neg = function (this: InternalBig): InternalBig {\n this.s = negateSign(this.s);\n return this;\n};\n\n\n/*\n * Return a new Big whose value is the value of this Big plus the value of Big y.\n */\nP.plus = P.add = function (this: InternalBig, y: InternalSource): InternalBig {\n var e, k, t,\n x = this,\n Big = x.constructor,\n yBig = new Big(y);\n\n // Signs differ?\n if (x.s != yBig.s) {\n yBig.s = negateSign(yBig.s);\n return x.minus(yBig);\n }\n\n var xe = x.e,\n xc = x.c,\n ye = yBig.e,\n yc = yBig.c;\n\n // Either zero?\n if (!xc[0] || !yc[0]) {\n if (!yc[0]) {\n if (xc[0]) {\n yBig = new Big(x);\n } else {\n yBig.s = x.s;\n }\n }\n return yBig;\n }\n\n xc = xc.slice();\n\n // Prepend zeros to equalise exponents.\n // Note: reverse faster than unshifts.\n if (e = xe - ye) {\n if (e > 0) {\n ye = xe;\n t = yc;\n } else {\n e = -e;\n t = xc;\n }\n\n t.reverse();\n for (; e--;) t.push(0);\n t.reverse();\n }\n\n // Point xc to the longer array.\n if (xc.length - yc.length < 0) {\n t = yc;\n yc = xc;\n xc = t;\n }\n\n // Only start adding at yc.length - 1 as the further digits of xc can be left as they are.\n for (k = 0, e = yc.length; e;) {\n --e;\n k = (xc[e] = (xc[e] ?? 0) + (yc[e] ?? 0) + k) / 10 | 0;\n xc[e]! %= 10;\n }\n\n // No need to check for zero, as +x + +y != 0 && -x + -y != 0\n\n if (k) {\n xc.unshift(k);\n ++ye;\n }\n\n // Remove trailing zeros.\n for (e = xc.length; xc[--e] === 0;) xc.pop();\n\n yBig.c = xc;\n yBig.e = ye;\n\n return yBig;\n};\n\nP._plus = P._add = function (this: InternalBig, y: InternalSource): InternalBig {\n const x = this\n const Big = x.constructor\n\n loadSourceParts(Big, y)\n\n const yc = SOURCE_C\n const ye = SOURCE_E\n const ys = SOURCE_S\n\n const xc = x.c\n const xe = x.e\n const xs = x.s\n\n const xLen = xc.length\n const yLen = yc.length\n\n // Either zero?\n if (!xc[0] || !yc[0]) {\n if (!yc[0]) return x\n\n xc.length = yLen\n for (let i = 0; i < yLen; i++) xc[i] = yc[i] ?? 0\n\n x.e = ye\n x.s = ys\n return x\n }\n\n const topExponent = xe > ye ? xe : ye\n const shiftX = topExponent - xe\n const shiftY = topExponent - ye\n\n // Same sign: magnitude addition.\n if (xs == ys) {\n const lenX = xLen + shiftX\n const lenY = yLen + shiftY\n let len = lenX > lenY ? lenX : lenY\n let carry = 0\n\n xc.length = len\n\n for (let i = len - 1; i >= 0; i--) {\n const ix = i - shiftX\n const iy = i - shiftY\n const dx = ix >= 0 && ix < xLen ? (xc[ix] ?? 0) : 0\n const dy = iy >= 0 && iy < yLen ? (yc[iy] ?? 0) : 0\n const sum = dx + dy + carry\n\n xc[i] = sum % 10\n carry = sum / 10 | 0\n }\n\n if (carry) {\n xc.length = len + 1\n\n for (let i = len; i > 0; i--) xc[i] = xc[i - 1] ?? 0\n\n xc[0] = carry\n len += 1\n x.e = topExponent + 1\n } else {\n x.e = topExponent\n }\n\n while (len > 1 && xc[len - 1] === 0) --len\n xc.length = len\n x.s = xs\n\n return x\n }\n\n // Different signs: magnitude subtraction.\n let cmp = 0\n\n if (xe != ye) {\n cmp = xe > ye ? 1 : -1\n } else if (xLen != yLen) {\n cmp = xLen > yLen ? 1 : -1\n } else {\n for (let i = 0; i < xLen; i++) {\n const xd = xc[i] ?? 0\n const yd = yc[i] ?? 0\n if (xd != yd) {\n cmp = xd > yd ? 1 : -1\n break\n }\n }\n }\n\n if (cmp === 0) {\n xc.length = 1\n xc[0] = 0\n x.e = 0\n x.s = 1\n return x\n }\n\n const ac = cmp > 0 ? xc : yc\n const ae = cmp > 0 ? xe : ye\n const al = cmp > 0 ? xLen : yLen\n const bc = cmp > 0 ? yc : xc\n const be = cmp > 0 ? ye : xe\n const bl = cmp > 0 ? yLen : xLen\n const resultSign = cmp > 0 ? xs : ys\n const alignedExponent = ae > be ? ae : be\n const shiftA = alignedExponent - ae\n const shiftB = alignedExponent - be\n const lenA = al + shiftA\n const lenB = bl + shiftB\n let len = lenA > lenB ? lenA : lenB\n let borrow = 0\n\n xc.length = len\n\n for (let i = len - 1; i >= 0; i--) {\n const ia = i - shiftA\n const ib = i - shiftB\n let da = ia >= 0 && ia < al ? (ac[ia] ?? 0) : 0\n const db = (ib >= 0 && ib < bl ? (bc[ib] ?? 0) : 0) + borrow\n\n if (da < db) {\n da += 10\n borrow = 1\n } else {\n borrow = 0\n }\n\n xc[i] = da - db\n }\n\n let head = 0\n while (head < len - 1 && xc[head] === 0) ++head\n\n if (head) {\n for (let i = 0; i < len - head; i++) xc[i] = xc[i + head] ?? 0\n len -= head\n }\n\n while (len > 1 && xc[len - 1] === 0) --len\n\n xc.length = len\n x.e = alignedExponent - head\n x.s = resultSign\n\n if (!xc[0]) {\n x.e = 0\n x.s = 1\n }\n\n return x\n};\n\n/*\n * Return a Big whose value is the value of this Big raised to the power n.\n * If n is negative, round to a maximum of Big.DP decimal places using rounding\n * mode Big.RM.\n *\n * n {number} Integer, -MAX_POWER to MAX_POWER inclusive.\n */\nP.pow = function (this: InternalBig, n: number): InternalBig {\n var x = this,\n one = new x.constructor('1'),\n y = one,\n isneg = n < 0;\n\n if (n !== ~~n || n < -MAX_POWER || n > MAX_POWER) {\n throw Error(INVALID + 'exponent');\n }\n\n if (isneg) n = -n;\n\n for (;;) {\n if (n & 1) y = y.times(x);\n n >>= 1;\n if (!n) break;\n x = x.times(x);\n }\n\n return isneg ? one.div(y) : y;\n};\n\nP._pow = function (this: InternalBig, n: number): InternalBig {\n var x = this,\n one = new x.constructor('1'),\n y = one,\n base = new x.constructor(x),\n isneg = n < 0;\n\n if (n !== ~~n || n < -MAX_POWER || n > MAX_POWER) {\n throw Error(INVALID + 'exponent');\n }\n\n if (isneg) n = -n;\n\n for (;;) {\n if (n & 1) y._times(base);\n n >>= 1;\n if (!n) break;\n base._times(base);\n }\n\n return isneg ? mutateFrom(x, one._div(y)) : mutateFrom(x, y);\n};\n\n\n/*\n * Return a new Big whose value is the value of this Big rounded to a maximum precision of sd\n * significant digits using rounding mode rm, or Big.RM if rm is not specified.\n *\n * sd {number} Significant digits: integer, 1 to MAX_DP inclusive.\n * rm? {number} Rounding mode: 0 (down), 1 (half-up), 2 (half-even) or 3 (up).\n */\nP.prec = function (this: InternalBig, sd: number, rm?: RoundingMode): InternalBig {\n if (sd !== ~~sd || sd < 1 || sd > MAX_DP) {\n throw Error(INVALID + 'precision');\n }\n return round(new this.constructor(this), sd, rm);\n};\n\nP._prec = function (this: InternalBig, sd: number, rm?: RoundingMode): InternalBig {\n if (sd !== ~~sd || sd < 1 || sd > MAX_DP) {\n throw Error(INVALID + 'precision');\n }\n return round(this, sd, rm);\n};\n\n\n/*\n * Return a new Big whose value is the value of this Big rounded to a maximum of dp decimal places\n * using rounding mode rm, or Big.RM if rm is not specified.\n * If dp is negative, round to an integer which is a multiple of 10**-dp.\n * If dp is not specified, round to 0 decimal places.\n *\n * dp? {number} Integer, -MAX_DP to MAX_DP inclusive.\n * rm? {number} Rounding mode: 0 (down), 1 (half-up), 2 (half-even) or 3 (up).\n */\nP.round = function (this: InternalBig, dp?: number, rm?: RoundingMode): InternalBig {\n if (dp === UNDEFINED) dp = 0;\n else if (dp !== ~~dp || dp < -MAX_DP || dp > MAX_DP) {\n throw Error(INVALID_DP);\n }\n return round(new this.constructor(this), dp + this.e + 1, rm);\n};\n\nP._round = function (this: InternalBig, dp?: number, rm?: RoundingMode): InternalBig {\n if (dp === UNDEFINED) dp = 0;\n else if (dp !== ~~dp || dp < -MAX_DP || dp > MAX_DP) {\n throw Error(INVALID_DP);\n }\n return round(this, dp + this.e + 1, rm);\n};\n\n\n/*\n * Return a new Big whose value is the square root of the value of this Big, rounded, if\n * necessary, to a maximum of Big.DP decimal places using rounding mode Big.RM.\n */\nP.sqrt = function (this: InternalBig): InternalBig {\n var r: InternalBig, c: string, t: InternalBig,\n x = this,\n Big = x.constructor,\n sign = x.s,\n e = x.e,\n half = new Big('0.5'),\n s: number;\n\n // Zero?\n if (!x.c[0]) return new Big(x);\n\n // Negative?\n if (sign < 0) {\n throw Error(NAME + 'No square root');\n }\n\n // Estimate.\n s = Math.sqrt(+stringify(x, true, true));\n\n // Math.sqrt underflow/overflow?\n // Re-estimate: pass x coefficient to Math.sqrt as integer, then adjust the result exponent.\n if (s === 0 || s === 1 / 0) {\n c = x.c.join('');\n if (!(c.length + e & 1)) c += '0';\n s = Math.sqrt(+c);\n e = ((e + 1) / 2 | 0) - ((e < 0 || (e & 1) !== 0) ? 1 : 0);\n if (s == 1 / 0) {\n r = new Big('5e' + e);\n } else {\n c = s.toExponential();\n r = new Big(c.slice(0, c.indexOf('e') + 1) + e);\n }\n } else {\n r = new Big(s + '');\n }\n\n e = r.e + (Big.DP += 4);\n\n // Newton-Raphson iteration.\n do {\n t = r;\n r = half.times(t.plus(x.div(t)));\n } while (t.c.slice(0, e).join('') !== r.c.slice(0, e).join(''));\n\n return round(r, (Big.DP -= 4) + r.e + 1, Big.RM);\n};\n\nP._sqrt = function (this: InternalBig): InternalBig {\n var r: InternalBig, c: string, t: InternalBig,\n x = this,\n Big = x.constructor,\n sign = x.s,\n e = x.e,\n half = new Big('0.5'),\n s: number;\n\n // Zero?\n if (!x.c[0]) return x;\n\n // Negative?\n if (sign < 0) {\n throw Error(NAME + 'No square root');\n }\n\n // Estimate.\n s = Math.sqrt(+stringify(x, true, true));\n\n // Math.sqrt underflow/overflow?\n // Re-estimate: pass x coefficient to Math.sqrt as integer, then adjust the result exponent.\n if (s === 0 || s === 1 / 0) {\n c = x.c.join('');\n if (!(c.length + e & 1)) c += '0';\n s = Math.sqrt(+c);\n e = ((e + 1) / 2 | 0) - ((e < 0 || (e & 1) !== 0) ? 1 : 0);\n if (s == 1 / 0) {\n r = new Big('5e' + e);\n } else {\n c = s.toExponential();\n r = new Big(c.slice(0, c.indexOf('e') + 1) + e);\n }\n } else {\n r = new Big(s + '');\n }\n\n e = r.e + (Big.DP += 4);\n\n // Newton-Raphson iteration.\n do {\n t = r;\n r = half.times(t.plus(x.div(t)));\n } while (t.c.slice(0, e).join('') !== r.c.slice(0, e).join(''));\n\n return mutateFrom(x, round(r, (Big.DP -= 4) + r.e + 1, Big.RM));\n};\n\n\n/*\n * Return a new Big whose value is the value of this Big times the value of Big y.\n */\nP.times = P.mul = function (this: InternalBig, y: InternalSource): InternalBig {\n var c: number[],\n x = this,\n Big = x.constructor,\n xc = x.c,\n yBig = new Big(y),\n yc = yBig.c,\n a = xc.length,\n b = yc.length,\n i = x.e,\n j = yBig.e;\n\n // Determine sign of result.\n yBig.s = x.s == yBig.s ? 1 : -1;\n\n // Return signed 0 if either 0.\n if (!xc[0] || !yc[0]) {\n yBig.c = [yBig.e = 0];\n return yBig;\n }\n\n // Initialise exponent of result as x.e + y.e.\n yBig.e = i + j;\n\n // If array xc has fewer digits than yc, swap xc and yc, and lengths.\n if (a < b) {\n c = xc;\n xc = yc;\n yc = c;\n j = a;\n a = b;\n b = j;\n }\n\n // Initialise coefficient array of result with zeros.\n for (c = new Array(j = a + b); j--;) c[j] = 0;\n\n // Multiply.\n\n // i is initially xc.length.\n for (i = b; i--;) {\n b = 0;\n\n // a is yc.length.\n for (j = a + i; j > i;) {\n\n // Current sum of products at this digit position, plus carry.\n b = (c[j] ?? 0) + (yc[i] ?? 0) * (xc[j - i - 1] ?? 0) + b;\n c[j--] = b % 10;\n\n // carry\n b = b / 10 | 0;\n }\n\n c[j] = b;\n }\n\n // Increment result exponent if there is a final carry, otherwise remove leading zero.\n if (b) ++yBig.e;\n else c.shift();\n\n // Remove trailing zeros.\n for (i = c.length; !c[--i];) c.pop();\n yBig.c = c;\n\n return yBig;\n};\n\nP._times = P._mul = function (this: InternalBig, y: InternalSource): InternalBig {\n var c: number[],\n x = this,\n Big = x.constructor,\n xc = x.c,\n yBig = new Big(y),\n yc = yBig.c,\n a = xc.length,\n b = yc.length,\n i = x.e,\n j = yBig.e,\n sign: InternalSign = x.s == yBig.s ? 1 : -1;\n\n // Return signed 0 if either 0.\n if (!xc[0] || !yc[0]) {\n x.s = sign;\n x.c = [x.e = 0];\n return x;\n }\n\n // Initialise exponent of result as x.e + y.e.\n x.e = i + j;\n\n // If array xc has fewer digits than yc, swap xc and yc, and lengths.\n if (a < b) {\n c = xc;\n xc = yc;\n yc = c;\n j = a;\n a = b;\n b = j;\n }\n\n // Initialise coefficient array of result with zeros.\n for (c = new Array(j = a + b); j--;) c[j] = 0;\n\n // Multiply.\n\n // i is initially xc.length.\n for (i = b; i--;) {\n b = 0;\n\n // a is yc.length.\n for (j = a + i; j > i;) {\n\n // Current sum of products at this digit position, plus carry.\n b = (c[j] ?? 0) + (yc[i] ?? 0) * (xc[j - i - 1] ?? 0) + b;\n c[j--] = b % 10;\n\n // carry\n b = b / 10 | 0;\n }\n\n c[j] = b;\n }\n\n // Increment result exponent if there is a final carry, otherwise remove leading zero.\n if (b) ++x.e;\n else c.shift();\n\n // Remove trailing zeros.\n for (i = c.length; !c[--i];) c.pop();\n\n x.c = c;\n x.s = sign;\n\n return x;\n};\n\n\n/*\n * Return a string representing the value of this Big in exponential notation rounded to dp fixed\n * decimal places using rounding mode rm, or Big.RM if rm is not specified.\n *\n * dp? {number} Decimal places: integer, 0 to MAX_DP inclusive.\n * rm? {number} Rounding mode: 0 (down), 1 (half-up), 2 (half-even) or 3 (up).\n */\nP.toExponential = function (this: InternalBig, dp?: number, rm?: RoundingMode): string {\n var x = this,\n n = x.c[0];\n\n if (dp !== UNDEFINED) {\n if (dp !== ~~dp || dp < 0 || dp > MAX_DP) {\n throw Error(INVALID_DP);\n }\n x = round(new x.constructor(x), ++dp, rm);\n for (; x.c.length < dp;) x.c.push(0);\n }\n\n return stringify(x, true, !!n);\n};\n\n\n/*\n * Return a string representing the value of this Big in normal notation rounded to dp fixed\n * decimal places using rounding mode rm, or Big.RM if rm is not specified.\n *\n * dp? {number} Decimal places: integer, 0 to MAX_DP inclusive.\n * rm? {number} Rounding mode: 0 (down), 1 (half-up), 2 (half-even) or 3 (up).\n *\n * (-0).toFixed(0) is '0', but (-0.1).toFixed(0) is '-0'.\n * (-0).toFixed(1) is '0.0', but (-0.01).toFixed(1) is '-0.0'.\n */\nP.toFixed = function (this: InternalBig, dp?: number, rm?: RoundingMode): string {\n var x = this,\n n = x.c[0];\n\n if (dp !== UNDEFINED) {\n if (dp !== ~~dp || dp < 0 || dp > MAX_DP) {\n throw Error(INVALID_DP);\n }\n x = round(new x.constructor(x), dp + x.e + 1, rm);\n\n // x.e may have changed if the value is rounded up.\n for (dp = dp + x.e + 1; x.c.length < dp;) x.c.push(0);\n }\n\n return stringify(x, false, !!n);\n};\n\n\n/*\n * Return a string representing the value of this Big.\n * Return exponential notation if this Big has a positive exponent equal to or greater than\n * Big.PE, or a negative exponent equal to or less than Big.NE.\n * Omit the sign for negative zero.\n */\nP.toJSON = P.toString = function (this: InternalBig): string {\n var x = this,\n Big = x.constructor;\n return stringify(x, x.e <= Big.NE || x.e >= Big.PE, !!x.c[0]);\n};\n\nif (typeof Symbol !== \"undefined\") {\n P[Symbol.for('nodejs.util.inspect.custom')] = P.toJSON;\n}\n\n\n/*\n * Return the value of this Big as a primitive number.\n */\nP.toNumber = function (this: InternalBig): number {\n var n = +stringify(this, true, true);\n if (this.constructor.strict === true && !this.eq(n.toString())) {\n throw Error(NAME + 'Imprecise conversion');\n }\n return n;\n};\n\n/*\n * Return the value of this Big as a primitive bigint.\n */\nP.toBigInt = function (this: InternalBig): bigint {\n const integer = this.round(0, 0)\n\n if (!this.eq(integer)) {\n throw Error(NAME + 'BigInt conversion requires an integer value')\n }\n\n return BigInt(integer.toFixed(0))\n};\n\n\n/*\n * Return a string representing the value of this Big rounded to sd significant digits using\n * rounding mode rm, or Big.RM if rm is not specified.\n * Use exponential notation if sd is less than the number of digits necessary to represent\n * the integer part of the value in normal notation.\n *\n * sd {number} Significant digits: integer, 1 to MAX_DP inclusive.\n * rm? {number} Rounding mode: 0 (down), 1 (half-up), 2 (half-even) or 3 (up).\n */\nP.toPrecision = function (this: InternalBig, sd?: number, rm?: RoundingMode): string {\n var x = this,\n Big = x.constructor,\n n = x.c[0];\n\n if (sd !== UNDEFINED) {\n if (sd !== ~~sd || sd < 1 || sd > MAX_DP) {\n throw Error(INVALID + 'precision');\n }\n x = round(new Big(x), sd, rm);\n for (; x.c.length < sd;) x.c.push(0);\n }\n\n return stringify(x, (sd !== UNDEFINED && sd <= x.e) || x.e <= Big.NE || x.e >= Big.PE, !!n);\n};\n\n\n/*\n * Return a string representing the value of this Big.\n * Return exponential notation if this Big has a positive exponent equal to or greater than\n * Big.PE, or a negative exponent equal to or less than Big.NE.\n * Include the sign for negative zero.\n */\nP.valueOf = function (this: InternalBig): string {\n var x = this,\n Big = x.constructor;\n if (Big.strict === true) {\n throw Error(NAME + 'valueOf disallowed');\n }\n return stringify(x, x.e <= Big.NE || x.e >= Big.PE, true);\n};\n\nconst Big = _Big_() as unknown as BigConstructor\nexport { Big }\nexport default Big\n"],"mappings":";;;;AA+dA,IAAI,KAAK,IAUP,KAAK,GAGL,SAAS,KAGT,YAAY,KAOZ,KAAK,IAOL,KAAK,IAOL,SAAS,OAOT,OAAO,aACP,UAAU,O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EAAE,KAAK,IAAI,IAAI,KAAK;;AAG3D,MAAM,MAA0B,OAAO"}
|
|
1
|
+
{"version":3,"file":"index.cjs","names":[],"sources":["../src/index.ts"],"sourcesContent":["declare namespace Big {\n type BigSource = number | string | bigint | Big;\n\n /**\n * GT = 1, EQ = 0, LT = -1\n */\n type Comparison = -1 | 0 | 1;\n\n /**\n * RoundDown = 0, RoundHalfUp = 1, RoundHalfEven = 2, RoundUp = 3\n */\n type RoundingMode = 0 | 1 | 2 | 3;\n\n interface BigConstructor {\n /**\n * Returns a new instance of a Big number object\n *\n * String values may be in exponential, as well as normal (non-exponential) notation.\n * There is no limit to the number of digits of a string value (other than that of Javascript's maximum array size), but the largest recommended exponent magnitude is 1e+6.\n * Infinity, NaN and hexadecimal literal strings, e.g. '0xff', are not valid.\n * String values in octal literal form will be interpreted as decimals, e.g. '011' is 11, not 9.\n *\n * @throws `NaN` on an invalid value.\n */\n new(value: BigSource): Big;\n\n /**\n * Returns a new instance of a Big number object\n *\n * String values may be in exponential, as well as normal (non-exponential) notation.\n * There is no limit to the number of digits of a string value (other than that of Javascript's maximum array size), but the largest recommended exponent magnitude is 1e+6.\n * Infinity, NaN and hexadecimal literal strings, e.g. '0xff', are not valid.\n * String values in octal literal form will be interpreted as decimals, e.g. '011' is 11, not 9.\n *\n * @throws `NaN` on an invalid value.\n */\n (value: BigSource): Big;\n\n /**\n * Create an additional Big number constructor\n *\n * Values created with the returned constructor will have a separate set of configuration values.\n * This can be used to create Big objects with different DP and RM values.\n * Big numbers created by different constructors can be used together in operations, and it is the DP and RM setting of the Big number that an operation is called upon that will apply.\n * In the interest of memory efficiency, all Big number constructors share the same prototype object,\n * so while the DP and RM (and other own properties) of a constructor are isolated and untouchable by another, its prototype methods are not.\n */\n (): BigConstructor;\n\n /**\n * The maximum number of decimal places of the results of operations involving division.\n * It is relevant only to the div and sqrt methods, and the pow method when the exponent is negative.\n *\n * 0 to 1e+6 inclusive\n * Default value: 20\n */\n DP: number;\n /**\n * The rounding mode used in the above operations and by round, toExponential, toFixed and toPrecision.\n * Default value: 1\n */\n RM: number;\n /**\n * The negative exponent value at and below which toString returns exponential notation.\n *\n * -1e+6 to 0 inclusive\n * Default value: -7\n */\n NE: number;\n /**\n * The positive exponent value at and above which toString returns exponential notation.\n *\n * 0 to 1e+6 inclusive\n * Default value: 21\n */\n PE: number;\n /**\n * When set to true, an error will be thrown if a primitive number is passed to the Big constructor,\n * or if valueOf is called, or if toNumber is called on a Big which cannot be converted to a primitive number without a loss of precision.\n *\n * true|false\n * Default value: false\n */\n strict: boolean;\n\n /** Readonly rounding modes */\n\n /**\n * Rounds towards zero.\n * I.e. truncate, no rounding.\n */\n readonly roundDown: 0;\n /**\n * Rounds towards nearest neighbour.\n * If equidistant, rounds away from zero.\n */\n readonly roundHalfUp: 1;\n /**\n * Rounds towards nearest neighbour.\n * If equidistant, rounds towards even neighbour.\n */\n readonly roundHalfEven: 2;\n /**\n * Rounds away from zero.\n */\n readonly roundUp: 3;\n\n readonly Big: BigConstructor;\n }\n\n interface Big {\n /** Returns a Big number whose value is the absolute value, i.e. the magnitude, of this Big number. */\n abs(): Big;\n /**\n * Returns a Big number whose value is the value of this Big number plus n - alias for .plus().\n *\n * @throws `NaN` if n is invalid.\n */\n add(n: BigSource): Big;\n /**\n * Compare the values.\n *\n * @throws `NaN` if n is invalid.\n */\n cmp(n: BigSource): Comparison;\n /**\n * Returns a Big number whose value is the value of this Big number divided by n.\n *\n * If the result has more fraction digits than is specified by Big.DP, it will be rounded to Big.DP decimal places using rounding mode Big.RM.\n *\n * @throws `NaN` if n is invalid.\n * @throws `±Infinity` on division by zero.\n * @throws `NaN` on division of zero by zero.\n */\n div(n: BigSource): Big;\n /**\n * Returns true if the value of this Big equals the value of n, otherwise returns false.\n *\n * @throws `NaN` if n is invalid.\n */\n eq(n: BigSource): boolean;\n /**\n * Returns true if the value of this Big is greater than the value of n, otherwise returns false.\n *\n * @throws `NaN` if n is invalid.\n */\n gt(n: BigSource): boolean;\n /**\n * Returns true if the value of this Big is greater than or equal to the value of n, otherwise returns false.\n *\n * @throws `NaN` if n is invalid.\n */\n gte(n: BigSource): boolean;\n /**\n * Returns true if the value of this Big is less than the value of n, otherwise returns false.\n *\n * @throws `NaN` if n is invalid.\n */\n lt(n: BigSource): boolean;\n /**\n * Returns true if the value of this Big is less than or equal to the value of n, otherwise returns false.\n *\n * @throws `NaN` if n is invalid.\n */\n lte(n: BigSource): boolean;\n /**\n * Returns a Big number whose value is the value of this Big number minus n.\n *\n * @throws `NaN` if n is invalid.\n */\n minus(n: BigSource): Big;\n /**\n * Returns a Big number whose value is the value of this Big number modulo n, i.e. the integer remainder of dividing this Big number by n.\n *\n * The result will have the same sign as this Big number, and it will match that of Javascript's % operator (within the limits of its precision) and BigDecimal's remainder method.\n *\n * @throws `NaN` if n is negative or otherwise invalid.\n */\n mod(n: BigSource): Big;\n /**\n * Returns a Big number whose value is the value of this Big number times n - alias for .times().\n *\n * @throws `NaN` if n is invalid.\n */\n mul(n: BigSource): Big;\n /**\n * Return a new Big whose value is the value of this Big negated.\n */\n neg(): Big;\n /** Mutates this Big to its absolute value and returns this instance. */\n _abs(): Big;\n /** Mutates this Big to its negated value and returns this instance. */\n _neg(): Big;\n /**\n * Returns a Big number whose value is the value of this Big number plus n.\n *\n * @throws `NaN` if n is invalid.\n */\n plus(n: BigSource): Big;\n /** Mutates this Big to the provided source value and returns this instance. */\n _set(n: BigSource): Big;\n /** In-place alias for plus. */\n _plus(n: BigSource): Big;\n /** In-place alias for plus. */\n _add(n: BigSource): Big;\n /** In-place alias for minus. */\n _minus(n: BigSource): Big;\n /** In-place alias for minus. */\n _sub(n: BigSource): Big;\n /** In-place alias for times. */\n _times(n: BigSource): Big;\n /** In-place alias for times. */\n _mul(n: BigSource): Big;\n /** In-place variant of div. */\n _div(n: BigSource): Big;\n /** In-place variant of mod. */\n _mod(n: BigSource): Big;\n /**\n * Returns a Big number whose value is the value of this Big number raised to the power exp.\n *\n * If exp is negative and the result has more fraction digits than is specified by Big.DP, it will be rounded to Big.DP decimal places using rounding mode Big.RM.\n *\n * @param exp The power to raise the number to, -1e+6 to 1e+6 inclusive\n * @throws `!pow!` if exp is invalid.\n *\n * Note: High value exponents may cause this method to be slow to return.\n */\n pow(exp: number): Big;\n /** In-place variant of pow. */\n _pow(exp: number): Big;\n /**\n * Return a new Big whose value is the value of this Big rounded to a maximum precision of sd\n * significant digits using rounding mode rm, or Big.RM if rm is not specified.\n *\n * @param sd Significant digits: integer, 1 to MAX_DP inclusive.\n * @param rm Rounding mode: 0 (down), 1 (half-up), 2 (half-even) or 3 (up).\n * @throws `!prec!` if sd is invalid.\n * @throws `!Big.RM!` if rm is invalid.\n */\n prec(sd: number, rm?: RoundingMode): Big;\n /** In-place variant of prec. */\n _prec(sd: number, rm?: RoundingMode): Big;\n /**\n * Returns a Big number whose value is the value of this Big number rounded using rounding mode rm to a maximum of dp decimal places.\n *\n * @param dp Decimal places, 0 to 1e+6 inclusive\n * @param rm Rounding mode: 0 (down), 1 (half-up), 2 (half-even) or 3 (up).\n * @throws `!round!` if dp is invalid.\n * @throws `!Big.RM!` if rm is invalid.\n */\n round(dp?: number, rm?: RoundingMode): Big;\n /** In-place variant of round. */\n _round(dp?: number, rm?: RoundingMode): Big;\n /**\n * Returns a Big number whose value is the square root of this Big number.\n *\n * If the result has more fraction digits than is specified by Big.DP, it will be rounded to Big.DP decimal places using rounding mode Big.RM.\n *\n * @throws `NaN` if this Big number is negative.\n */\n sqrt(): Big;\n /** In-place variant of sqrt. */\n _sqrt(): Big;\n /**\n * Returns a Big number whose value is the value of this Big number minus n - alias for .minus().\n *\n * @throws `NaN` if n is invalid.\n */\n sub(n: BigSource): Big;\n /**\n * Returns a Big number whose value is the value of this Big number times n.\n *\n * @throws `NaN` if n is invalid.\n */\n times(n: BigSource): Big;\n /**\n * Returns a string representing the value of this Big number in exponential notation to a fixed number of decimal places dp.\n *\n * If the value of this Big number in exponential notation has more digits to the right of the decimal point than is specified by dp,\n * the return value will be rounded to dp decimal places using rounding mode Big.RM.\n *\n * If the value of this Big number in exponential notation has fewer digits to the right of the decimal point than is specified by dp, the return value will be appended with zeros accordingly.\n *\n * If dp is omitted, or is null or undefined, the number of digits after the decimal point defaults to the minimum number of digits necessary to represent the value exactly.\n *\n * @param dp Decimal places, 0 to 1e+6 inclusive\n * @param rm Rounding mode: 0 (down), 1 (half-up), 2 (half-even) or 3 (up).\n * @throws `!toFix!` if dp is invalid.\n */\n toExponential(dp?: number, rm?: RoundingMode): string;\n /**\n * Returns a string representing the value of this Big number in normal notation to a fixed number of decimal places dp.\n *\n * If the value of this Big number in normal notation has more digits to the right of the decimal point than is specified by dp,\n * the return value will be rounded to dp decimal places using rounding mode Big.RM.\n *\n * If the value of this Big number in normal notation has fewer fraction digits then is specified by dp, the return value will be appended with zeros accordingly.\n *\n * Unlike Number.prototype.toFixed, which returns exponential notation if a number is greater or equal to 1021, this method will always return normal notation.\n *\n * If dp is omitted, or is null or undefined, then the return value is simply the value in normal notation.\n * This is also unlike Number.prototype.toFixed, which returns the value to zero decimal places.\n *\n * @param dp Decimal places, 0 to 1e+6 inclusive\n * @param rm Rounding mode: 0 (down), 1 (half-up), 2 (half-even) or 3 (up).\n * @throws `!toFix!` if dp is invalid.\n */\n toFixed(dp?: number, rm?: RoundingMode): string;\n /**\n * Returns a string representing the value of this Big number to the specified number of significant digits sd.\n *\n * If the value of this Big number has more digits than is specified by sd, the return value will be rounded to sd significant digits using rounding mode Big.RM.\n *\n * If the value of this Big number has fewer digits than is specified by sd, the return value will be appended with zeros accordingly.\n *\n * If sd is less than the number of digits necessary to represent the integer part of the value in normal notation, then exponential notation is used.\n *\n * If sd is omitted, or is null or undefined, then the return value is the same as .toString().\n *\n * @param sd Significant digits, 1 to 1e+6 inclusive\n * @param rm Rounding mode: 0 (down), 1 (half-up), 2 (half-even) or 3 (up).\n * @throws `!toPre!` if sd is invalid.\n */\n toPrecision(sd?: number, rm?: RoundingMode): string;\n /**\n * Returns a string representing the value of this Big number.\n *\n * If this Big number has a positive exponent that is equal to or greater than 21, or a negative exponent equal to or less than -7, then exponential notation is returned.\n *\n * The point at which toString returns exponential rather than normal notation can be adjusted by changing\n * the value of Big.E_POS and Big.E_NEG. By default, Big numbers correspond to Javascript's number type in this regard.\n */\n toString(): string;\n /**\n * Returns a primitive number representing the value of this Big number.\n *\n * If Big.strict is true an error will be thrown if toNumber is called on a Big number which cannot be converted to a primitive number without a loss of precision.\n *\n * @since 6.0\n */\n toNumber(): number;\n /**\n * Returns a primitive bigint representing the value of this Big number.\n *\n * @throws if this Big number is not an integer.\n */\n toBigInt(): bigint;\n /**\n * Returns a string representing the value of this Big number.\n *\n * If this Big number has a positive exponent that is equal to or greater than 21, or a negative exponent equal to or less than -7, then exponential notation is returned.\n *\n * The point at which toString returns exponential rather than normal notation can be adjusted by changing\n * the value of Big.E_POS and Big.E_NEG. By default, Big numbers correspond to Javascript's number type in this regard.\n */\n valueOf(): string;\n /**\n * Returns a string representing the value of this Big number.\n *\n * If this Big number has a positive exponent that is equal to or greater than 21, or a negative exponent equal to or less than -7, then exponential notation is returned.\n *\n * The point at which toString returns exponential rather than normal notation can be adjusted by changing\n * the value of Big.E_POS and Big.E_NEG. By default, Big numbers correspond to Javascript's number type in this regard.\n */\n toJSON(): string;\n /**\n * Returns an array of single digits\n */\n c: number[];\n /**\n * Returns the exponent, Integer, -1e+6 to 1e+6 inclusive\n */\n e: number;\n /**\n * Returns the sign, -1 or 1\n */\n s: number;\n }\n}\n\ntype Big = Big.Big\ntype BigConstructor = Big.BigConstructor\n\nexport type BigSource = Big.BigSource\nexport type Comparison = Big.Comparison\nexport type RoundingMode = Big.RoundingMode\nexport type BigInstance = Big\n\ntype InternalSign = 1 | -1\ntype InternalDigits = number[]\ntype InternalSource = BigSource | InternalBig\n\ninterface InternalBig extends InternalBigProto {\n c: InternalDigits\n e: number\n s: InternalSign\n constructor: InternalBigConstructor\n}\n\ninterface InternalBigConstructor {\n (): InternalBigConstructor\n (value: InternalSource): InternalBig\n new (value: InternalSource): InternalBig\n DP: number\n RM: RoundingMode\n NE: number\n PE: number\n strict: boolean\n roundDown: 0\n roundHalfUp: 1\n roundHalfEven: 2\n roundUp: 3\n prototype: InternalBigProto\n}\n\ninterface InternalBigProto {\n abs(this: InternalBig): InternalBig\n _abs(this: InternalBig): InternalBig\n _set(this: InternalBig, y: InternalSource): InternalBig\n cmp(this: InternalBig, y: InternalSource): Comparison\n div(this: InternalBig, y: InternalSource): InternalBig\n _div(this: InternalBig, y: InternalSource): InternalBig\n eq(this: InternalBig, y: InternalSource): boolean\n gt(this: InternalBig, y: InternalSource): boolean\n gte(this: InternalBig, y: InternalSource): boolean\n lt(this: InternalBig, y: InternalSource): boolean\n lte(this: InternalBig, y: InternalSource): boolean\n minus(this: InternalBig, y: InternalSource): InternalBig\n sub(this: InternalBig, y: InternalSource): InternalBig\n _minus(this: InternalBig, y: InternalSource): InternalBig\n _sub(this: InternalBig, y: InternalSource): InternalBig\n mod(this: InternalBig, y: InternalSource): InternalBig\n _mod(this: InternalBig, y: InternalSource): InternalBig\n neg(this: InternalBig): InternalBig\n _neg(this: InternalBig): InternalBig\n plus(this: InternalBig, y: InternalSource): InternalBig\n add(this: InternalBig, y: InternalSource): InternalBig\n _plus(this: InternalBig, y: InternalSource): InternalBig\n _add(this: InternalBig, y: InternalSource): InternalBig\n pow(this: InternalBig, n: number): InternalBig\n _pow(this: InternalBig, n: number): InternalBig\n prec(this: InternalBig, sd: number, rm?: RoundingMode): InternalBig\n _prec(this: InternalBig, sd: number, rm?: RoundingMode): InternalBig\n round(this: InternalBig, dp?: number, rm?: RoundingMode): InternalBig\n _round(this: InternalBig, dp?: number, rm?: RoundingMode): InternalBig\n sqrt(this: InternalBig): InternalBig\n _sqrt(this: InternalBig): InternalBig\n times(this: InternalBig, y: InternalSource): InternalBig\n mul(this: InternalBig, y: InternalSource): InternalBig\n _times(this: InternalBig, y: InternalSource): InternalBig\n _mul(this: InternalBig, y: InternalSource): InternalBig\n toExponential(this: InternalBig, dp?: number, rm?: RoundingMode): string\n toFixed(this: InternalBig, dp?: number, rm?: RoundingMode): string\n toJSON(this: InternalBig): string\n toString(this: InternalBig): string\n toNumber(this: InternalBig): number\n toBigInt(this: InternalBig): bigint\n toPrecision(this: InternalBig, sd?: number, rm?: RoundingMode): string\n valueOf(this: InternalBig): string\n [symbolKey: symbol]: ((this: InternalBig) => string) | undefined\n}\n\n/*\n * big.js v7.0.1\n * A small, fast, easy-to-use library for arbitrary-precision decimal arithmetic.\n * Copyright (c) 2025 Michael Mclaughlin\n * https://github.com/MikeMcl/big.js/LICENCE.md\n */\n\n\n/************************************** EDITABLE DEFAULTS *****************************************/\n\n\n // The default values below must be integers within the stated ranges.\n\n /*\n * The maximum number of decimal places (DP) of the results of operations involving division:\n * div and sqrt, and pow with negative exponents.\n */\nvar DP = 20, // 0 to MAX_DP\n\n /*\n * The rounding mode (RM) used when rounding to the above decimal places.\n *\n * 0 Towards zero (i.e. truncate, no rounding). (ROUND_DOWN)\n * 1 To nearest neighbour. If equidistant, round up. (ROUND_HALF_UP)\n * 2 To nearest neighbour. If equidistant, to even. (ROUND_HALF_EVEN)\n * 3 Away from zero. (ROUND_UP)\n */\n RM = 1 as RoundingMode, // 0, 1, 2 or 3\n\n // The maximum value of DP and Big.DP.\n MAX_DP = 1E6, // 0 to 1000000\n\n // The maximum magnitude of the exponent argument to the pow method.\n MAX_POWER = 1E6, // 1 to 1000000\n\n /*\n * The negative exponent (NE) at and beneath which toString returns exponential notation.\n * (JavaScript numbers: -7)\n * -1000000 is the minimum recommended exponent value of a Big.\n */\n NE = -7, // 0 to -1000000\n\n /*\n * The positive exponent (PE) at and above which toString returns exponential notation.\n * (JavaScript numbers: 21)\n * 1000000 is the maximum recommended exponent value of a Big, but this limit is not enforced.\n */\n PE = 21, // 0 to 1000000\n\n /*\n * When true, an error will be thrown if a primitive number is passed to the Big constructor,\n * or if valueOf is called, or if toNumber is called on a Big which cannot be converted to a\n * primitive number without a loss of precision.\n */\n STRICT = false, // true or false\n\n\n/**************************************************************************************************/\n\n\n // Error messages.\n NAME = '[big.js] ',\n INVALID = NAME + 'Invalid ',\n INVALID_DP = INVALID + 'decimal places',\n INVALID_RM = INVALID + 'rounding mode',\n DIV_BY_ZERO = NAME + 'Division by zero',\n\n // The shared prototype object.\n P = {} as unknown as InternalBigProto,\n UNDEFINED = void 0,\n NUMERIC = /^-?(\\d+(\\.\\d*)?|\\.\\d+)(e[+-]?\\d+)?$/i;\n\nconst SOURCE_BUFFER: InternalDigits = []\nlet SOURCE_C: InternalDigits = SOURCE_BUFFER\nlet SOURCE_E = 0\nlet SOURCE_S: InternalSign = 1\n\n\n/*\n * Create and return a Big constructor.\n */\nfunction _Big_(): InternalBigConstructor {\n\n /*\n * The Big constructor and exported function.\n * Create and return a new instance of a Big number object.\n *\n * n {number|string|Big} A numeric value.\n */\n function Big(this: unknown, n?: InternalSource): InternalBig | InternalBigConstructor | void {\n const Ctor = Big as unknown as InternalBigConstructor\n const x = this as unknown\n\n // Enable constructor usage without new.\n if (!(x instanceof Ctor)) {\n return n === UNDEFINED && arguments.length === 0 ? _Big_() : new Ctor(n as InternalSource);\n }\n\n const instance = x as InternalBig\n\n // Duplicate.\n if (n instanceof Ctor) {\n instance.s = n.s;\n instance.e = n.e;\n instance.c = n.c.slice();\n } else {\n let value = n\n\n if (typeof value !== 'string') {\n if (Ctor.strict === true && typeof value !== 'bigint') {\n throw TypeError(INVALID + 'value');\n }\n\n // Minus zero?\n value = value === 0 && 1 / value < 0 ? '-0' : String(value);\n }\n\n parse(instance, value);\n }\n\n // Retain a reference to this Big constructor.\n // Shadow Big.prototype.constructor which points to Object.\n instance.constructor = Ctor;\n }\n\n const Ctor = Big as unknown as InternalBigConstructor\n\n Ctor.prototype = P;\n Ctor.DP = DP;\n Ctor.RM = RM;\n Ctor.NE = NE;\n Ctor.PE = PE;\n Ctor.strict = STRICT;\n Ctor.roundDown = 0;\n Ctor.roundHalfUp = 1;\n Ctor.roundHalfEven = 2;\n Ctor.roundUp = 3;\n\n return Ctor;\n}\n\nfunction negateSign(s: InternalSign): InternalSign {\n return s === 1 ? -1 : 1;\n}\n\nfunction mutateFrom(x: InternalBig, y: InternalBig): InternalBig {\n x.c = y.c;\n x.e = y.e;\n x.s = y.s;\n return x;\n}\n\n\n/*\n * Parse the number or string value passed to a Big constructor.\n *\n * x {Big} A Big number instance.\n * n {number|string} A numeric value.\n */\nfunction parse(x: InternalBig, n: string): InternalBig {\n var e, i, nl;\n\n if (!NUMERIC.test(n)) {\n throw Error(INVALID + 'number');\n }\n\n // Determine sign.\n x.s = n.charAt(0) == '-' ? (n = n.slice(1), -1) : 1;\n\n // Decimal point?\n if ((e = n.indexOf('.')) > -1) n = n.replace('.', '');\n\n // Exponential form?\n if ((i = n.search(/e/i)) > 0) {\n\n // Determine exponent.\n if (e < 0) e = i;\n e += +n.slice(i + 1);\n n = n.substring(0, i);\n } else if (e < 0) {\n\n // Integer.\n e = n.length;\n }\n\n nl = n.length;\n\n // Determine leading zeros.\n for (i = 0; i < nl && n.charAt(i) == '0';) ++i;\n\n if (i == nl) {\n\n // Zero.\n x.c = [x.e = 0];\n } else {\n\n // Determine trailing zeros.\n for (; nl > 0 && n.charAt(--nl) == '0';);\n x.e = e - i - 1;\n x.c = [];\n\n // Convert string to array of digits without leading/trailing zeros.\n for (e = 0; i <= nl;) x.c[e++] = +n.charAt(i++);\n }\n\n return x;\n}\n\nfunction isInternalBigSource(value: InternalSource): value is InternalBig {\n return typeof value === 'object'\n}\n\nfunction parseSourceString(n: string): void {\n let e: number\n let i: number\n let nl: number\n\n if (!NUMERIC.test(n)) {\n throw Error(INVALID + 'number')\n }\n\n SOURCE_S = n.charAt(0) == '-' ? (n = n.slice(1), -1) : 1\n\n if ((e = n.indexOf('.')) > -1) n = n.replace('.', '')\n\n if ((i = n.search(/e/i)) > 0) {\n if (e < 0) e = i\n e += +n.slice(i + 1)\n n = n.substring(0, i)\n } else if (e < 0) {\n e = n.length\n }\n\n nl = n.length\n\n for (i = 0; i < nl && n.charAt(i) == '0';) ++i\n\n if (i == nl) {\n SOURCE_E = 0\n SOURCE_C = SOURCE_BUFFER\n SOURCE_C.length = 1\n SOURCE_C[0] = 0\n return\n }\n\n for (; nl > 0 && n.charAt(--nl) == '0';);\n\n SOURCE_E = e - i - 1\n SOURCE_C = SOURCE_BUFFER\n SOURCE_C.length = 0\n\n for (e = 0; i <= nl;) SOURCE_C[e++] = +n.charAt(i++)\n}\n\nfunction loadSourceParts(Big: InternalBigConstructor, value: InternalSource): void {\n if (isInternalBigSource(value)) {\n SOURCE_C = value.c\n SOURCE_E = value.e\n SOURCE_S = value.s\n return\n }\n\n let n = value\n\n if (typeof n !== 'string') {\n if (Big.strict === true && typeof n !== 'bigint') {\n throw TypeError(INVALID + 'value')\n }\n\n n = n === 0 && 1 / n < 0 ? '-0' : String(n)\n }\n\n parseSourceString(n)\n}\n\n\n/*\n * Round Big x to a maximum of sd significant digits using rounding mode rm.\n *\n * x {Big} The Big to round.\n * sd {number} Significant digits: integer, 0 to MAX_DP inclusive.\n * rm {number} Rounding mode: 0 (down), 1 (half-up), 2 (half-even) or 3 (up).\n * [more] {boolean} Whether the result of division was truncated.\n */\nfunction round(x: InternalBig, sd: number, rm?: RoundingMode, more?: boolean): InternalBig {\n var xc = x.c;\n var d0 = xc[0] ?? 0;\n\n if (rm === UNDEFINED) rm = x.constructor.RM;\n if (rm !== 0 && rm !== 1 && rm !== 2 && rm !== 3) {\n throw Error(INVALID_RM);\n }\n\n if (sd < 1) {\n more =\n rm === 3 && (more || !!xc[0]) || sd === 0 && (\n rm === 1 && d0 >= 5 ||\n rm === 2 && (d0 > 5 || d0 === 5 && (more || xc[1] !== UNDEFINED))\n );\n\n xc.length = 1;\n\n if (more) {\n\n // 1, 0.1, 0.01, 0.001, 0.0001 etc.\n x.e = x.e - sd + 1;\n xc[0] = 1;\n } else {\n\n // Zero.\n xc[0] = x.e = 0;\n }\n } else if (sd < xc.length) {\n d0 = xc[sd] ?? 0;\n\n // xc[sd] is the digit after the digit that may be rounded up.\n more =\n rm === 1 && d0 >= 5 ||\n rm === 2 && (d0 > 5 || d0 === 5 &&\n (more || xc[sd + 1] !== UNDEFINED || ((xc[sd - 1] ?? 0) & 1) === 1)) ||\n rm === 3 && (more || !!xc[0]);\n\n // Remove extra digits after the required precision.\n xc.length = sd;\n\n // Round up?\n if (more) {\n\n // Rounding up may mean the previous digit has to be rounded up.\n for (; ++(xc[--sd]!) > 9;) {\n xc[sd] = 0;\n if (sd === 0) {\n ++x.e;\n xc.unshift(1);\n break;\n }\n }\n }\n\n // Remove trailing zeros.\n for (sd = xc.length; !xc[--sd];) xc.pop();\n }\n\n return x;\n}\n\n\n/*\n * Return a string representing the value of Big x in normal or exponential notation.\n * Handles P.toExponential, P.toFixed, P.toJSON, P.toPrecision, P.toString and P.valueOf.\n */\nfunction stringify(x: InternalBig, doExponential: boolean, isNonzero: boolean): string {\n var e = x.e,\n s = x.c.join(''),\n n = s.length;\n\n // Exponential notation?\n if (doExponential) {\n s = s.charAt(0) + (n > 1 ? '.' + s.slice(1) : '') + (e < 0 ? 'e' : 'e+') + e;\n\n // Normal notation.\n } else if (e < 0) {\n for (; ++e;) s = '0' + s;\n s = '0.' + s;\n } else if (e > 0) {\n if (++e > n) {\n for (e -= n; e--;) s += '0';\n } else if (e < n) {\n s = s.slice(0, e) + '.' + s.slice(e);\n }\n } else if (n > 1) {\n s = s.charAt(0) + '.' + s.slice(1);\n }\n\n return x.s < 0 && isNonzero ? '-' + s : s;\n}\n\n\n// Prototype/instance methods\n\n\n/*\n * Return a new Big whose value is the absolute value of this Big.\n */\nP.abs = function (this: InternalBig) {\n var x = new this.constructor(this);\n x.s = 1;\n return x;\n};\n\nP._abs = function (this: InternalBig): InternalBig {\n if (this.s < 0) this.s = 1;\n return this;\n};\n\nP._set = function (this: InternalBig, y: InternalSource): InternalBig {\n const x = this\n const Big = x.constructor\n\n loadSourceParts(Big, y)\n\n const yc = SOURCE_C\n const yl = yc.length\n\n x.c.length = yl\n for (let i = 0; i < yl; i++) x.c[i] = yc[i] ?? 0\n\n x.e = SOURCE_E\n x.s = SOURCE_S\n\n return x\n};\n\n\n/*\n * Return 1 if the value of this Big is greater than the value of Big y,\n * -1 if the value of this Big is less than the value of Big y, or\n * 0 if they have the same value.\n */\nP.cmp = function (this: InternalBig, y: InternalSource): Comparison {\n var i, j,\n isneg,\n x = this,\n xc = x.c,\n yBig = new x.constructor(y),\n yc = yBig.c,\n xs = x.s,\n ys = yBig.s,\n k = x.e,\n l = yBig.e;\n\n // Either zero?\n if (!xc[0] || !yc[0]) return (!xc[0] ? !yc[0] ? 0 : negateSign(ys) : xs) as Comparison;\n\n // Signs differ?\n if (xs != ys) return xs as Comparison;\n\n isneg = xs < 0;\n\n // Compare exponents.\n if (k != l) return (((k > l ? 1 : 0) ^ (isneg ? 1 : 0)) ? 1 : -1) as Comparison;\n\n j = (k = xc.length) < (l = yc.length) ? k : l;\n\n // Compare digit by digit.\n for (i = -1; ++i < j;) {\n if (xc[i] != yc[i]) return (((xc[i]! > yc[i]! ? 1 : 0) ^ (isneg ? 1 : 0)) ? 1 : -1) as Comparison;\n }\n\n // Compare lengths.\n return (k == l ? 0 : ((k > l ? 1 : 0) ^ (isneg ? 1 : 0)) ? 1 : -1) as Comparison;\n};\n\n\n/*\n * Return a new Big whose value is the value of this Big divided by the value of Big y, rounded,\n * if necessary, to a maximum of Big.DP decimal places using rounding mode Big.RM.\n */\nP.div = function (this: InternalBig, y: InternalSource): InternalBig {\n var x = this,\n Big = x.constructor,\n a = x.c, // dividend\n yBig = new Big(y),\n b = yBig.c, // divisor\n sign: InternalSign = x.s == yBig.s ? 1 : -1,\n dp = Big.DP;\n\n if (dp !== ~~dp || dp < 0 || dp > MAX_DP) {\n throw Error(INVALID_DP);\n }\n\n // Divisor is zero?\n if (!b[0]) {\n throw Error(DIV_BY_ZERO);\n }\n\n // Dividend is 0? Return +-0.\n if (!a[0]) {\n yBig.s = sign;\n yBig.c = [yBig.e = 0];\n return yBig;\n }\n\n var bl, bt, n, cmp, ri,\n bz = b.slice(),\n ai = bl = b.length,\n al = a.length,\n r = a.slice(0, bl) as Array<number | undefined>, // remainder\n rl = r.length,\n q = yBig, // quotient\n qc = q.c = [] as InternalDigits,\n qi = 0,\n p = dp + (q.e = x.e - yBig.e) + 1, // precision of the result\n k = p < 0 ? 0 : p;\n\n q.s = sign;\n\n // Create version of divisor with leading zero.\n bz.unshift(0);\n\n // Add zeros to make remainder as long as divisor.\n for (; rl++ < bl;) r.push(0);\n\n do {\n\n // n is how many times the divisor goes into current remainder.\n for (n = 0; n < 10; n++) {\n\n // Compare divisor and remainder.\n if (bl != (rl = r.length)) {\n cmp = bl > rl ? 1 : -1;\n } else {\n for (ri = -1, cmp = 0; ++ri < bl;) {\n if (b[ri] != r[ri]) {\n cmp = b[ri]! > r[ri]! ? 1 : -1;\n break;\n }\n }\n }\n\n // If divisor < remainder, subtract divisor from remainder.\n if (cmp < 0) {\n\n // Remainder can't be more than 1 digit longer than divisor.\n // Equalise lengths using divisor with extra leading zero?\n for (bt = rl == bl ? b : bz; rl;) {\n if (r[--rl]! < bt[rl]!) {\n ri = rl;\n for (; ri && !r[--ri];) r[ri] = 9;\n --r[ri]!;\n r[rl] = (r[rl] ?? 0) + 10;\n }\n r[rl] = (r[rl] ?? 0) - bt[rl]!;\n }\n\n for (; !r[0];) r.shift();\n } else {\n break;\n }\n }\n\n // Add the digit n to the result array.\n qc[qi++] = cmp ? n : ++n;\n\n // Update the remainder.\n if (r[0] && cmp) r[rl] = a[ai] || 0;\n else r = [a[ai]];\n\n } while ((ai++ < al || r[0] !== UNDEFINED) && k--);\n\n // Leading zero? Do not remove if result is simply zero (qi == 1).\n if (!qc[0] && qi != 1) {\n\n // There can't be more than one zero.\n qc.shift();\n q.e--;\n p--;\n }\n\n // Round?\n if (qi > p) round(q, p, Big.RM, r[0] !== UNDEFINED);\n\n return q;\n};\n\nP._div = function (this: InternalBig, y: InternalSource): InternalBig {\n var x = this,\n Big = x.constructor,\n a = x.c.slice(), // dividend\n yBig = new Big(y),\n b = yBig.c, // divisor\n sign: InternalSign = x.s == yBig.s ? 1 : -1,\n dp = Big.DP;\n\n if (dp !== ~~dp || dp < 0 || dp > MAX_DP) {\n throw Error(INVALID_DP);\n }\n\n // Divisor is zero?\n if (!b[0]) {\n throw Error(DIV_BY_ZERO);\n }\n\n // Dividend is 0? Return +-0.\n if (!a[0]) {\n x.s = sign;\n x.c = [x.e = 0];\n return x;\n }\n\n var bl, bt, n, cmp, ri,\n bz = b.slice(),\n ai = bl = b.length,\n al = a.length,\n r = a.slice(0, bl) as Array<number | undefined>, // remainder\n rl = r.length,\n q = x, // quotient (in place)\n qc = q.c = [] as InternalDigits,\n qi = 0,\n p = dp + (q.e = x.e - yBig.e) + 1, // precision of the result\n k = p < 0 ? 0 : p;\n\n q.s = sign;\n\n // Create version of divisor with leading zero.\n bz.unshift(0);\n\n // Add zeros to make remainder as long as divisor.\n for (; rl++ < bl;) r.push(0);\n\n do {\n\n // n is how many times the divisor goes into current remainder.\n for (n = 0; n < 10; n++) {\n\n // Compare divisor and remainder.\n if (bl != (rl = r.length)) {\n cmp = bl > rl ? 1 : -1;\n } else {\n for (ri = -1, cmp = 0; ++ri < bl;) {\n if (b[ri] != r[ri]) {\n cmp = b[ri]! > r[ri]! ? 1 : -1;\n break;\n }\n }\n }\n\n // If divisor < remainder, subtract divisor from remainder.\n if (cmp < 0) {\n\n // Remainder can't be more than 1 digit longer than divisor.\n // Equalise lengths using divisor with extra leading zero?\n for (bt = rl == bl ? b : bz; rl;) {\n if (r[--rl]! < bt[rl]!) {\n ri = rl;\n for (; ri && !r[--ri];) r[ri] = 9;\n --r[ri]!;\n r[rl] = (r[rl] ?? 0) + 10;\n }\n r[rl] = (r[rl] ?? 0) - bt[rl]!;\n }\n\n for (; !r[0];) r.shift();\n } else {\n break;\n }\n }\n\n // Add the digit n to the result array.\n qc[qi++] = cmp ? n : ++n;\n\n // Update the remainder.\n if (r[0] && cmp) r[rl] = a[ai] || 0;\n else r = [a[ai]];\n\n } while ((ai++ < al || r[0] !== UNDEFINED) && k--);\n\n // Leading zero? Do not remove if result is simply zero (qi == 1).\n if (!qc[0] && qi != 1) {\n\n // There can't be more than one zero.\n qc.shift();\n q.e--;\n p--;\n }\n\n // Round?\n if (qi > p) round(q, p, Big.RM, r[0] !== UNDEFINED);\n\n return q;\n};\n\n\n/*\n * Return true if the value of this Big is equal to the value of Big y, otherwise return false.\n */\nP.eq = function (this: InternalBig, y: InternalSource): boolean {\n return this.cmp(y) === 0;\n};\n\n\n/*\n * Return true if the value of this Big is greater than the value of Big y, otherwise return\n * false.\n */\nP.gt = function (this: InternalBig, y: InternalSource): boolean {\n return this.cmp(y) > 0;\n};\n\n\n/*\n * Return true if the value of this Big is greater than or equal to the value of Big y, otherwise\n * return false.\n */\nP.gte = function (this: InternalBig, y: InternalSource): boolean {\n return this.cmp(y) > -1;\n};\n\n\n/*\n * Return true if the value of this Big is less than the value of Big y, otherwise return false.\n */\nP.lt = function (this: InternalBig, y: InternalSource): boolean {\n return this.cmp(y) < 0;\n};\n\n\n/*\n * Return true if the value of this Big is less than or equal to the value of Big y, otherwise\n * return false.\n */\nP.lte = function (this: InternalBig, y: InternalSource): boolean {\n return this.cmp(y) < 1;\n};\n\n\n/*\n * Return a new Big whose value is the value of this Big minus the value of Big y.\n */\nP.minus = P.sub = function (this: InternalBig, y: InternalSource): InternalBig {\n var i, j, t, xlty,\n x = this,\n Big = x.constructor,\n yBig = new Big(y),\n a = x.s,\n b = yBig.s;\n\n // Signs differ?\n if (a != b) {\n yBig.s = negateSign(b);\n return x.plus(yBig);\n }\n\n var xc = x.c.slice(),\n xe = x.e,\n yc = yBig.c,\n ye = yBig.e,\n aDiff = xe - ye;\n\n // Either zero?\n if (!xc[0] || !yc[0]) {\n if (yc[0]) {\n yBig.s = negateSign(b);\n } else if (xc[0]) {\n yBig = new Big(x);\n } else {\n yBig.s = 1;\n }\n return yBig;\n }\n\n // Determine which is the bigger number. Prepend zeros to equalise exponents.\n if (aDiff) {\n\n if (xlty = aDiff < 0) {\n aDiff = -aDiff;\n t = xc;\n } else {\n ye = xe;\n t = yc;\n }\n\n t.reverse();\n for (j = aDiff; j--;) t.push(0);\n t.reverse();\n } else {\n\n // Exponents equal. Check digit by digit.\n j = ((xlty = xc.length < yc.length) ? xc : yc).length;\n\n for (i = 0; i < j; i++) {\n if (xc[i] != yc[i]) {\n xlty = xc[i]! < yc[i]!;\n break;\n }\n }\n }\n\n // x < y? Point xc to the array of the bigger number.\n if (xlty) {\n t = xc;\n xc = yc;\n yc = t;\n yBig.s = negateSign(yBig.s);\n }\n\n /*\n * Append zeros to xc if shorter. No need to add zeros to yc if shorter as subtraction only\n * needs to start at yc.length.\n */\n if ((j = yc.length - (i = xc.length)) > 0) for (; j--;) xc[i++] = 0;\n\n // Subtract yc from xc.\n for (j = i; j > aDiff;) {\n if (xc[--j]! < (yc[j] ?? 0)) {\n for (i = j; i && !xc[--i];) xc[i] = 9;\n --xc[i]!;\n xc[j] = (xc[j] ?? 0) + 10;\n }\n\n xc[j] = (xc[j] ?? 0) - (yc[j] ?? 0);\n }\n\n // Remove trailing zeros.\n for (j = xc.length; xc[--j] === 0;) xc.pop();\n\n // Remove leading zeros and adjust exponent accordingly.\n for (; xc[0] === 0;) {\n xc.shift();\n --ye;\n }\n\n if (!xc[0]) {\n\n // n - n = +0\n yBig.s = 1;\n\n // Result must be zero.\n xc = [ye = 0];\n }\n\n yBig.c = xc;\n yBig.e = ye;\n\n return yBig;\n};\n\nP._minus = P._sub = function (this: InternalBig, y: InternalSource): InternalBig {\n var i, j, t, xlty,\n x = this,\n Big = x.constructor,\n yBig = new Big(y),\n xSign = x.s,\n ySign = yBig.s,\n xc = x.c.slice(),\n xe = x.e,\n yc = yBig.c,\n ye = yBig.e,\n eDiff = xe - ye;\n\n // Signs differ?\n if (xSign != ySign) {\n yBig.s = negateSign(ySign);\n return x._plus(yBig);\n }\n\n // Either zero?\n if (!xc[0] || !yc[0]) {\n if (!yc[0]) {\n if (!xc[0]) x.s = xSign < 0 && ySign > 0 ? -1 : 1;\n return x;\n }\n\n x.c = yc.slice();\n x.e = ye;\n x.s = negateSign(ySign);\n\n if (!x.c[0]) x.s = 1;\n return x;\n }\n\n // Determine which is the bigger number. Prepend zeros to equalise exponents.\n if (eDiff) {\n\n if (xlty = eDiff < 0) {\n eDiff = -eDiff;\n t = xc;\n } else {\n ye = xe;\n t = yc;\n }\n\n t.reverse();\n for (j = eDiff; j--;) t.push(0);\n t.reverse();\n } else {\n\n // Exponents equal. Check digit by digit.\n j = ((xlty = xc.length < yc.length) ? xc : yc).length;\n\n for (i = 0; i < j; i++) {\n if (xc[i] != yc[i]) {\n xlty = xc[i]! < yc[i]!;\n break;\n }\n }\n }\n\n // x < y? Point xc to the array of the bigger number.\n if (xlty) {\n t = xc;\n xc = yc;\n yc = t;\n xSign = negateSign(xSign);\n }\n\n /*\n * Append zeros to xc if shorter. No need to add zeros to yc if shorter as subtraction only\n * needs to start at yc.length.\n */\n if ((j = yc.length - (i = xc.length)) > 0) for (; j--;) xc[i++] = 0;\n\n // Subtract yc from xc.\n for (j = i; j > eDiff;) {\n if (xc[--j]! < (yc[j] ?? 0)) {\n for (i = j; i && !xc[--i];) xc[i] = 9;\n --xc[i]!;\n xc[j] = (xc[j] ?? 0) + 10;\n }\n\n xc[j] = (xc[j] ?? 0) - (yc[j] ?? 0);\n }\n\n // Remove trailing zeros.\n for (j = xc.length; xc[--j] === 0;) xc.pop();\n\n // Remove leading zeros and adjust exponent accordingly.\n for (; xc[0] === 0;) {\n xc.shift();\n --ye;\n }\n\n if (!xc[0]) {\n\n // n - n = +0\n xSign = 1;\n\n // Result must be zero.\n xc = [ye = 0];\n }\n\n x.c = xc;\n x.e = ye;\n x.s = xSign;\n\n return x;\n};\n\n\n/*\n * Return a new Big whose value is the value of this Big modulo the value of Big y.\n */\nP.mod = function (this: InternalBig, y: InternalSource): InternalBig {\n var ygtx,\n x = this,\n Big = x.constructor,\n yBig = new Big(y),\n xSign = x.s,\n ySign = yBig.s,\n dp: number,\n rm: RoundingMode;\n\n if (!yBig.c[0]) {\n throw Error(DIV_BY_ZERO);\n }\n\n x.s = yBig.s = 1;\n ygtx = yBig.cmp(x) == 1;\n x.s = xSign;\n yBig.s = ySign;\n\n if (ygtx) return new Big(x);\n\n dp = Big.DP;\n rm = Big.RM;\n Big.DP = 0;\n Big.RM = 0;\n x = x.div(yBig);\n Big.DP = dp;\n Big.RM = rm;\n\n return this.minus(x.times(yBig));\n};\n\nP._mod = function (this: InternalBig, y: InternalSource): InternalBig {\n var ygtx,\n x = this,\n Big = x.constructor,\n yBig = new Big(y),\n xSign = x.s,\n ySign = yBig.s,\n dp: number,\n rm: RoundingMode,\n quotient: InternalBig;\n\n if (!yBig.c[0]) {\n throw Error(DIV_BY_ZERO);\n }\n\n x.s = yBig.s = 1;\n ygtx = yBig.cmp(x) == 1;\n x.s = xSign;\n yBig.s = ySign;\n\n if (ygtx) return x;\n\n dp = Big.DP;\n rm = Big.RM;\n Big.DP = 0;\n Big.RM = 0;\n try {\n quotient = new Big(x).div(yBig);\n } finally {\n Big.DP = dp;\n Big.RM = rm;\n }\n\n return x._minus(quotient.times(yBig));\n};\n\n\n/*\n * Return a new Big whose value is the value of this Big negated.\n */\nP.neg = function (this: InternalBig): InternalBig {\n var x = new this.constructor(this);\n x.s = negateSign(x.s);\n return x;\n};\n\nP._neg = function (this: InternalBig): InternalBig {\n this.s = negateSign(this.s);\n return this;\n};\n\n\n/*\n * Return a new Big whose value is the value of this Big plus the value of Big y.\n */\nP.plus = P.add = function (this: InternalBig, y: InternalSource): InternalBig {\n var e, k, t,\n x = this,\n Big = x.constructor,\n yBig = new Big(y);\n\n // Signs differ?\n if (x.s != yBig.s) {\n yBig.s = negateSign(yBig.s);\n return x.minus(yBig);\n }\n\n var xe = x.e,\n xc = x.c,\n ye = yBig.e,\n yc = yBig.c;\n\n // Either zero?\n if (!xc[0] || !yc[0]) {\n if (!yc[0]) {\n if (xc[0]) {\n yBig = new Big(x);\n } else {\n yBig.s = x.s;\n }\n }\n return yBig;\n }\n\n xc = xc.slice();\n\n // Prepend zeros to equalise exponents.\n // Note: reverse faster than unshifts.\n if (e = xe - ye) {\n if (e > 0) {\n ye = xe;\n t = yc;\n } else {\n e = -e;\n t = xc;\n }\n\n t.reverse();\n for (; e--;) t.push(0);\n t.reverse();\n }\n\n // Point xc to the longer array.\n if (xc.length - yc.length < 0) {\n t = yc;\n yc = xc;\n xc = t;\n }\n\n // Only start adding at yc.length - 1 as the further digits of xc can be left as they are.\n for (k = 0, e = yc.length; e;) {\n --e;\n k = (xc[e] = (xc[e] ?? 0) + (yc[e] ?? 0) + k) / 10 | 0;\n xc[e]! %= 10;\n }\n\n // No need to check for zero, as +x + +y != 0 && -x + -y != 0\n\n if (k) {\n xc.unshift(k);\n ++ye;\n }\n\n // Remove trailing zeros.\n for (e = xc.length; xc[--e] === 0;) xc.pop();\n\n yBig.c = xc;\n yBig.e = ye;\n\n return yBig;\n};\n\nP._plus = P._add = function (this: InternalBig, y: InternalSource): InternalBig {\n const x = this\n const Big = x.constructor\n\n loadSourceParts(Big, y)\n\n const yc = SOURCE_C\n const ye = SOURCE_E\n const ys = SOURCE_S\n\n const xc = x.c\n const xe = x.e\n const xs = x.s\n\n const xLen = xc.length\n const yLen = yc.length\n\n // Either zero?\n if (!xc[0] || !yc[0]) {\n if (!yc[0]) {\n if (!xc[0]) x.s = xs < 0 && ys < 0 ? -1 : 1\n return x\n }\n\n xc.length = yLen\n for (let i = 0; i < yLen; i++) xc[i] = yc[i] ?? 0\n\n x.e = ye\n x.s = ys\n return x\n }\n\n const topExponent = xe > ye ? xe : ye\n const shiftX = topExponent - xe\n const shiftY = topExponent - ye\n\n // Same sign: magnitude addition.\n if (xs == ys) {\n const lenX = xLen + shiftX\n const lenY = yLen + shiftY\n let len = lenX > lenY ? lenX : lenY\n let carry = 0\n\n xc.length = len\n\n for (let i = len - 1; i >= 0; i--) {\n const ix = i - shiftX\n const iy = i - shiftY\n const dx = ix >= 0 && ix < xLen ? (xc[ix] ?? 0) : 0\n const dy = iy >= 0 && iy < yLen ? (yc[iy] ?? 0) : 0\n const sum = dx + dy + carry\n\n xc[i] = sum % 10\n carry = sum / 10 | 0\n }\n\n if (carry) {\n xc.length = len + 1\n\n for (let i = len; i > 0; i--) xc[i] = xc[i - 1] ?? 0\n\n xc[0] = carry\n len += 1\n x.e = topExponent + 1\n } else {\n x.e = topExponent\n }\n\n while (len > 1 && xc[len - 1] === 0) --len\n xc.length = len\n x.s = xs\n\n return x\n }\n\n // Different signs: magnitude subtraction.\n let cmp = 0\n\n if (xe != ye) {\n cmp = xe > ye ? 1 : -1\n } else {\n const maxLen = xLen > yLen ? xLen : yLen\n for (let i = 0; i < maxLen; i++) {\n const xd = i < xLen ? (xc[i] ?? 0) : 0\n const yd = i < yLen ? (yc[i] ?? 0) : 0\n if (xd != yd) {\n cmp = xd > yd ? 1 : -1\n break\n }\n }\n }\n\n if (cmp === 0) {\n xc.length = 1\n xc[0] = 0\n x.e = 0\n x.s = 1\n return x\n }\n\n // Right-to-left subtraction lets x.c act as the destination and, when needed, one operand.\n const ac = cmp > 0 ? xc : yc\n const ae = cmp > 0 ? xe : ye\n const al = cmp > 0 ? xLen : yLen\n const bc = cmp > 0 ? yc : xc\n const be = cmp > 0 ? ye : xe\n const bl = cmp > 0 ? yLen : xLen\n const resultSign = cmp > 0 ? xs : ys\n const alignedExponent = ae > be ? ae : be\n const shiftA = alignedExponent - ae\n const shiftB = alignedExponent - be\n const lenA = al + shiftA\n const lenB = bl + shiftB\n let len = lenA > lenB ? lenA : lenB\n let borrow = 0\n\n xc.length = len\n\n for (let i = len - 1; i >= 0; i--) {\n const ia = i - shiftA\n const ib = i - shiftB\n let da = ia >= 0 && ia < al ? (ac[ia] ?? 0) : 0\n const db = (ib >= 0 && ib < bl ? (bc[ib] ?? 0) : 0) + borrow\n\n if (da < db) {\n da += 10\n borrow = 1\n } else {\n borrow = 0\n }\n\n xc[i] = da - db\n }\n\n let head = 0\n while (head < len - 1 && xc[head] === 0) ++head\n\n if (head) {\n for (let i = 0; i < len - head; i++) xc[i] = xc[i + head] ?? 0\n len -= head\n }\n\n while (len > 1 && xc[len - 1] === 0) --len\n\n xc.length = len\n x.e = alignedExponent - head\n x.s = resultSign\n\n if (!xc[0]) {\n x.e = 0\n x.s = 1\n }\n\n return x\n};\n\n/*\n * Return a Big whose value is the value of this Big raised to the power n.\n * If n is negative, round to a maximum of Big.DP decimal places using rounding\n * mode Big.RM.\n *\n * n {number} Integer, -MAX_POWER to MAX_POWER inclusive.\n */\nP.pow = function (this: InternalBig, n: number): InternalBig {\n var x = this,\n one = new x.constructor('1'),\n y = one,\n isneg = n < 0;\n\n if (n !== ~~n || n < -MAX_POWER || n > MAX_POWER) {\n throw Error(INVALID + 'exponent');\n }\n\n if (isneg) n = -n;\n\n for (;;) {\n if (n & 1) y = y.times(x);\n n >>= 1;\n if (!n) break;\n x = x.times(x);\n }\n\n return isneg ? one.div(y) : y;\n};\n\nP._pow = function (this: InternalBig, n: number): InternalBig {\n var x = this,\n one = new x.constructor('1'),\n y = new x.constructor('1'),\n base = new x.constructor(x),\n isneg = n < 0;\n\n if (n !== ~~n || n < -MAX_POWER || n > MAX_POWER) {\n throw Error(INVALID + 'exponent');\n }\n\n if (isneg) n = -n;\n\n for (;;) {\n if (n & 1) y._times(base);\n n >>= 1;\n if (!n) break;\n base._times(base);\n }\n\n return isneg ? mutateFrom(x, one._div(y)) : mutateFrom(x, y);\n};\n\n\n/*\n * Return a new Big whose value is the value of this Big rounded to a maximum precision of sd\n * significant digits using rounding mode rm, or Big.RM if rm is not specified.\n *\n * sd {number} Significant digits: integer, 1 to MAX_DP inclusive.\n * rm? {number} Rounding mode: 0 (down), 1 (half-up), 2 (half-even) or 3 (up).\n */\nP.prec = function (this: InternalBig, sd: number, rm?: RoundingMode): InternalBig {\n if (sd !== ~~sd || sd < 1 || sd > MAX_DP) {\n throw Error(INVALID + 'precision');\n }\n return round(new this.constructor(this), sd, rm);\n};\n\nP._prec = function (this: InternalBig, sd: number, rm?: RoundingMode): InternalBig {\n if (sd !== ~~sd || sd < 1 || sd > MAX_DP) {\n throw Error(INVALID + 'precision');\n }\n return round(this, sd, rm);\n};\n\n\n/*\n * Return a new Big whose value is the value of this Big rounded to a maximum of dp decimal places\n * using rounding mode rm, or Big.RM if rm is not specified.\n * If dp is negative, round to an integer which is a multiple of 10**-dp.\n * If dp is not specified, round to 0 decimal places.\n *\n * dp? {number} Integer, -MAX_DP to MAX_DP inclusive.\n * rm? {number} Rounding mode: 0 (down), 1 (half-up), 2 (half-even) or 3 (up).\n */\nP.round = function (this: InternalBig, dp?: number, rm?: RoundingMode): InternalBig {\n if (dp === UNDEFINED) dp = 0;\n else if (dp !== ~~dp || dp < -MAX_DP || dp > MAX_DP) {\n throw Error(INVALID_DP);\n }\n return round(new this.constructor(this), dp + this.e + 1, rm);\n};\n\nP._round = function (this: InternalBig, dp?: number, rm?: RoundingMode): InternalBig {\n if (dp === UNDEFINED) dp = 0;\n else if (dp !== ~~dp || dp < -MAX_DP || dp > MAX_DP) {\n throw Error(INVALID_DP);\n }\n return round(this, dp + this.e + 1, rm);\n};\n\n\n/*\n * Return a new Big whose value is the square root of the value of this Big, rounded, if\n * necessary, to a maximum of Big.DP decimal places using rounding mode Big.RM.\n */\nP.sqrt = function (this: InternalBig): InternalBig {\n var r: InternalBig, c: string, t: InternalBig,\n x = this,\n Big = x.constructor,\n sign = x.s,\n e = x.e,\n half = new Big('0.5'),\n s: number;\n\n // Zero?\n if (!x.c[0]) return new Big(x);\n\n // Negative?\n if (sign < 0) {\n throw Error(NAME + 'No square root');\n }\n\n // Estimate.\n s = Math.sqrt(+stringify(x, true, true));\n\n // Math.sqrt underflow/overflow?\n // Re-estimate: pass x coefficient to Math.sqrt as integer, then adjust the result exponent.\n if (s === 0 || s === 1 / 0) {\n c = x.c.join('');\n if (!(c.length + e & 1)) c += '0';\n s = Math.sqrt(+c);\n e = ((e + 1) / 2 | 0) - ((e < 0 || (e & 1) !== 0) ? 1 : 0);\n if (s == 1 / 0) {\n r = new Big('5e' + e);\n } else {\n c = s.toExponential();\n r = new Big(c.slice(0, c.indexOf('e') + 1) + e);\n }\n } else {\n r = new Big(s + '');\n }\n\n e = r.e + (Big.DP += 4);\n\n // Newton-Raphson iteration.\n do {\n t = r;\n r = half.times(t.plus(x.div(t)));\n } while (t.c.slice(0, e).join('') !== r.c.slice(0, e).join(''));\n\n return round(r, (Big.DP -= 4) + r.e + 1, Big.RM);\n};\n\nP._sqrt = function (this: InternalBig): InternalBig {\n var r: InternalBig, c: string, t: InternalBig,\n x = this,\n Big = x.constructor,\n sign = x.s,\n e = x.e,\n half = new Big('0.5'),\n s: number;\n\n // Zero?\n if (!x.c[0]) return x;\n\n // Negative?\n if (sign < 0) {\n throw Error(NAME + 'No square root');\n }\n\n // Estimate.\n s = Math.sqrt(+stringify(x, true, true));\n\n // Math.sqrt underflow/overflow?\n // Re-estimate: pass x coefficient to Math.sqrt as integer, then adjust the result exponent.\n if (s === 0 || s === 1 / 0) {\n c = x.c.join('');\n if (!(c.length + e & 1)) c += '0';\n s = Math.sqrt(+c);\n e = ((e + 1) / 2 | 0) - ((e < 0 || (e & 1) !== 0) ? 1 : 0);\n if (s == 1 / 0) {\n r = new Big('5e' + e);\n } else {\n c = s.toExponential();\n r = new Big(c.slice(0, c.indexOf('e') + 1) + e);\n }\n } else {\n r = new Big(s + '');\n }\n\n Big.DP += 4;\n e = r.e + Big.DP;\n\n try {\n\n // Newton-Raphson iteration.\n do {\n t = r;\n r = half.times(t.plus(x.div(t)));\n } while (t.c.slice(0, e).join('') !== r.c.slice(0, e).join(''));\n } finally {\n Big.DP -= 4;\n }\n\n return mutateFrom(x, round(r, Big.DP + r.e + 1, Big.RM));\n};\n\n\n/*\n * Return a new Big whose value is the value of this Big times the value of Big y.\n */\nP.times = P.mul = function (this: InternalBig, y: InternalSource): InternalBig {\n var c: number[],\n x = this,\n Big = x.constructor,\n xc = x.c,\n yBig = new Big(y),\n yc = yBig.c,\n a = xc.length,\n b = yc.length,\n i = x.e,\n j = yBig.e;\n\n // Determine sign of result.\n yBig.s = x.s == yBig.s ? 1 : -1;\n\n // Return signed 0 if either 0.\n if (!xc[0] || !yc[0]) {\n yBig.c = [yBig.e = 0];\n return yBig;\n }\n\n // Initialise exponent of result as x.e + y.e.\n yBig.e = i + j;\n\n // If array xc has fewer digits than yc, swap xc and yc, and lengths.\n if (a < b) {\n c = xc;\n xc = yc;\n yc = c;\n j = a;\n a = b;\n b = j;\n }\n\n // Initialise coefficient array of result with zeros.\n for (c = new Array(j = a + b); j--;) c[j] = 0;\n\n // Multiply.\n\n // i is initially xc.length.\n for (i = b; i--;) {\n b = 0;\n\n // a is yc.length.\n for (j = a + i; j > i;) {\n\n // Current sum of products at this digit position, plus carry.\n b = (c[j] ?? 0) + (yc[i] ?? 0) * (xc[j - i - 1] ?? 0) + b;\n c[j--] = b % 10;\n\n // carry\n b = b / 10 | 0;\n }\n\n c[j] = b;\n }\n\n // Increment result exponent if there is a final carry, otherwise remove leading zero.\n if (b) ++yBig.e;\n else c.shift();\n\n // Remove trailing zeros.\n for (i = c.length; !c[--i];) c.pop();\n yBig.c = c;\n\n return yBig;\n};\n\nP._times = P._mul = function (this: InternalBig, y: InternalSource): InternalBig {\n var c: number[],\n x = this,\n Big = x.constructor,\n xc = x.c,\n yBig = new Big(y),\n yc = yBig.c,\n a = xc.length,\n b = yc.length,\n i = x.e,\n j = yBig.e,\n sign: InternalSign = x.s == yBig.s ? 1 : -1;\n\n // Return signed 0 if either 0.\n if (!xc[0] || !yc[0]) {\n x.s = sign;\n x.c = [x.e = 0];\n return x;\n }\n\n // Initialise exponent of result as x.e + y.e.\n x.e = i + j;\n\n // If array xc has fewer digits than yc, swap xc and yc, and lengths.\n if (a < b) {\n c = xc;\n xc = yc;\n yc = c;\n j = a;\n a = b;\n b = j;\n }\n\n // Initialise coefficient array of result with zeros.\n for (c = new Array(j = a + b); j--;) c[j] = 0;\n\n // Multiply.\n\n // i is initially xc.length.\n for (i = b; i--;) {\n b = 0;\n\n // a is yc.length.\n for (j = a + i; j > i;) {\n\n // Current sum of products at this digit position, plus carry.\n b = (c[j] ?? 0) + (yc[i] ?? 0) * (xc[j - i - 1] ?? 0) + b;\n c[j--] = b % 10;\n\n // carry\n b = b / 10 | 0;\n }\n\n c[j] = b;\n }\n\n // Increment result exponent if there is a final carry, otherwise remove leading zero.\n if (b) ++x.e;\n else c.shift();\n\n // Remove trailing zeros.\n for (i = c.length; !c[--i];) c.pop();\n\n x.c = c;\n x.s = sign;\n\n return x;\n};\n\n\n/*\n * Return a string representing the value of this Big in exponential notation rounded to dp fixed\n * decimal places using rounding mode rm, or Big.RM if rm is not specified.\n *\n * dp? {number} Decimal places: integer, 0 to MAX_DP inclusive.\n * rm? {number} Rounding mode: 0 (down), 1 (half-up), 2 (half-even) or 3 (up).\n */\nP.toExponential = function (this: InternalBig, dp?: number, rm?: RoundingMode): string {\n var x = this,\n n = x.c[0];\n\n if (dp !== UNDEFINED) {\n if (dp !== ~~dp || dp < 0 || dp > MAX_DP) {\n throw Error(INVALID_DP);\n }\n x = round(new x.constructor(x), ++dp, rm);\n for (; x.c.length < dp;) x.c.push(0);\n }\n\n return stringify(x, true, !!n);\n};\n\n\n/*\n * Return a string representing the value of this Big in normal notation rounded to dp fixed\n * decimal places using rounding mode rm, or Big.RM if rm is not specified.\n *\n * dp? {number} Decimal places: integer, 0 to MAX_DP inclusive.\n * rm? {number} Rounding mode: 0 (down), 1 (half-up), 2 (half-even) or 3 (up).\n *\n * (-0).toFixed(0) is '0', but (-0.1).toFixed(0) is '-0'.\n * (-0).toFixed(1) is '0.0', but (-0.01).toFixed(1) is '-0.0'.\n */\nP.toFixed = function (this: InternalBig, dp?: number, rm?: RoundingMode): string {\n var x = this,\n n = x.c[0];\n\n if (dp !== UNDEFINED) {\n if (dp !== ~~dp || dp < 0 || dp > MAX_DP) {\n throw Error(INVALID_DP);\n }\n x = round(new x.constructor(x), dp + x.e + 1, rm);\n\n // x.e may have changed if the value is rounded up.\n for (dp = dp + x.e + 1; x.c.length < dp;) x.c.push(0);\n }\n\n return stringify(x, false, !!n);\n};\n\n\n/*\n * Return a string representing the value of this Big.\n * Return exponential notation if this Big has a positive exponent equal to or greater than\n * Big.PE, or a negative exponent equal to or less than Big.NE.\n * Omit the sign for negative zero.\n */\nP.toJSON = P.toString = function (this: InternalBig): string {\n var x = this,\n Big = x.constructor;\n return stringify(x, x.e <= Big.NE || x.e >= Big.PE, !!x.c[0]);\n};\n\nif (typeof Symbol !== \"undefined\") {\n P[Symbol.for('nodejs.util.inspect.custom')] = P.toJSON;\n}\n\n\n/*\n * Return the value of this Big as a primitive number.\n */\nP.toNumber = function (this: InternalBig): number {\n var n = +stringify(this, true, true);\n if (this.constructor.strict === true && !this.eq(n.toString())) {\n throw Error(NAME + 'Imprecise conversion');\n }\n return n;\n};\n\n/*\n * Return the value of this Big as a primitive bigint.\n */\nP.toBigInt = function (this: InternalBig): bigint {\n const integer = this.round(0, 0)\n\n if (!this.eq(integer)) {\n throw Error(NAME + 'BigInt conversion requires an integer value')\n }\n\n return BigInt(integer.toFixed(0))\n};\n\n\n/*\n * Return a string representing the value of this Big rounded to sd significant digits using\n * rounding mode rm, or Big.RM if rm is not specified.\n * Use exponential notation if sd is less than the number of digits necessary to represent\n * the integer part of the value in normal notation.\n *\n * sd {number} Significant digits: integer, 1 to MAX_DP inclusive.\n * rm? {number} Rounding mode: 0 (down), 1 (half-up), 2 (half-even) or 3 (up).\n */\nP.toPrecision = function (this: InternalBig, sd?: number, rm?: RoundingMode): string {\n var x = this,\n Big = x.constructor,\n n = x.c[0];\n\n if (sd !== UNDEFINED) {\n if (sd !== ~~sd || sd < 1 || sd > MAX_DP) {\n throw Error(INVALID + 'precision');\n }\n x = round(new Big(x), sd, rm);\n for (; x.c.length < sd;) x.c.push(0);\n }\n\n return stringify(x, (sd !== UNDEFINED && sd <= x.e) || x.e <= Big.NE || x.e >= Big.PE, !!n);\n};\n\n\n/*\n * Return a string representing the value of this Big.\n * Return exponential notation if this Big has a positive exponent equal to or greater than\n * Big.PE, or a negative exponent equal to or less than Big.NE.\n * Include the sign for negative zero.\n */\nP.valueOf = function (this: InternalBig): string {\n var x = this,\n Big = x.constructor;\n if (Big.strict === true) {\n throw Error(NAME + 'valueOf disallowed');\n }\n return stringify(x, x.e <= Big.NE || x.e >= Big.PE, true);\n};\n\nconst Big = _Big_() as unknown as BigConstructor\nexport { Big }\nexport default Big\n"],"mappings":";;;;AA+dA,IAAI,KAAK,IAUP,KAAK,GAGL,SAAS,KAGT,YAAY,KAOZ,KAAK,IAOL,KAAK,IAOL,SAAS,OAOT,OAAO,aACP,UAAU,OAAO,YACjB,aAAa,UAAU,kBACvB,aAAa,UAAU,iBACvB,cAAc,OAAO,oBAGrB,IAAI,EAAE,EACN,YAAY,KAAK,GACjB,UAAU;AAEZ,MAAM,gBAAgC,EAAE;AACxC,IAAI,WAA2B;AAC/B,IAAI,WAAW;AACf,IAAI,WAAyB;AAM7B,SAAS,QAAgC;CAQvC,SAAS,IAAmB,GAAiE;EAC3F,MAAM,OAAO;EACb,MAAM,IAAI;AAGV,MAAI,EAAE,aAAa,MACjB,QAAO,MAAM,aAAa,UAAU,WAAW,IAAI,OAAO,GAAG,IAAI,KAAK,EAAoB;EAG5F,MAAM,WAAW;AAGjB,MAAI,aAAa,MAAM;AACrB,YAAS,IAAI,EAAE;AACf,YAAS,IAAI,EAAE;AACf,YAAS,IAAI,EAAE,EAAE,OAAO;SACnB;GACL,IAAI,QAAQ;AAEZ,OAAI,OAAO,UAAU,UAAU;AAC7B,QAAI,KAAK,WAAW,QAAQ,OAAO,UAAU,SAC3C,OAAM,UAAU,UAAU,QAAQ;AAIpC,YAAQ,UAAU,KAAK,IAAI,QAAQ,IAAI,OAAO,OAAO,MAAM;;AAG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AA,GAAK,YAAA;;;;;;;;;IAS9B,QAAA;;;;;;;;IAQA,QAAA;;;;;;IAMA,QAAA;;;;;;;;;IASA,OAAA;;;;;;;;;IASA,MAAA;;;;IAIA,CAAA;;;;IAIA,CAAA;;;;IAIA,CAAA;EAAA;AAAA;AAAA,KAIH,GAAA,GAAM,GAAA,CAAI,GAAA;AAAA,KACV,cAAA,GAAiB,GAAA,CAAI,cAAA;AAAA,KAEd,SAAA,GAAY,GAAA,CAAI,SAAA;AAAA,KAChB,UAAA,GAAa,GAAA,CAAI,UAAA;AAAA,KACjB,YAAA,GAAe,GAAA,CAAI,YAAA;AAAA,KACnB,WAAA,GAAc,GAAA;AAAA,cA6xDpB,GAAA,EAAgD,cAAA"}
|
package/dist/index.mjs
CHANGED
|
@@ -354,7 +354,10 @@ P._minus = P._sub = function(y) {
|
|
|
354
354
|
return x._plus(yBig);
|
|
355
355
|
}
|
|
356
356
|
if (!xc[0] || !yc[0]) {
|
|
357
|
-
if (!yc[0])
|
|
357
|
+
if (!yc[0]) {
|
|
358
|
+
if (!xc[0]) x.s = xSign < 0 && ySign > 0 ? -1 : 1;
|
|
359
|
+
return x;
|
|
360
|
+
}
|
|
358
361
|
x.c = yc.slice();
|
|
359
362
|
x.e = ye;
|
|
360
363
|
x.s = negateSign(ySign);
|
|
@@ -437,9 +440,12 @@ P._mod = function(y) {
|
|
|
437
440
|
rm = Big.RM;
|
|
438
441
|
Big.DP = 0;
|
|
439
442
|
Big.RM = 0;
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
+
try {
|
|
444
|
+
quotient = new Big(x).div(yBig);
|
|
445
|
+
} finally {
|
|
446
|
+
Big.DP = dp;
|
|
447
|
+
Big.RM = rm;
|
|
448
|
+
}
|
|
443
449
|
return x._minus(quotient.times(yBig));
|
|
444
450
|
};
|
|
445
451
|
P.neg = function() {
|
|
@@ -508,7 +514,10 @@ P._plus = P._add = function(y) {
|
|
|
508
514
|
const xLen = xc.length;
|
|
509
515
|
const yLen = yc.length;
|
|
510
516
|
if (!xc[0] || !yc[0]) {
|
|
511
|
-
if (!yc[0])
|
|
517
|
+
if (!yc[0]) {
|
|
518
|
+
if (!xc[0]) x.s = xs < 0 && ys < 0 ? -1 : 1;
|
|
519
|
+
return x;
|
|
520
|
+
}
|
|
512
521
|
xc.length = yLen;
|
|
513
522
|
for (let i = 0; i < yLen; i++) xc[i] = yc[i] ?? 0;
|
|
514
523
|
x.e = ye;
|
|
@@ -545,13 +554,15 @@ P._plus = P._add = function(y) {
|
|
|
545
554
|
}
|
|
546
555
|
let cmp = 0;
|
|
547
556
|
if (xe != ye) cmp = xe > ye ? 1 : -1;
|
|
548
|
-
else
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
557
|
+
else {
|
|
558
|
+
const maxLen = xLen > yLen ? xLen : yLen;
|
|
559
|
+
for (let i = 0; i < maxLen; i++) {
|
|
560
|
+
const xd = i < xLen ? xc[i] ?? 0 : 0;
|
|
561
|
+
const yd = i < yLen ? yc[i] ?? 0 : 0;
|
|
562
|
+
if (xd != yd) {
|
|
563
|
+
cmp = xd > yd ? 1 : -1;
|
|
564
|
+
break;
|
|
565
|
+
}
|
|
555
566
|
}
|
|
556
567
|
}
|
|
557
568
|
if (cmp === 0) {
|
|
@@ -616,7 +627,7 @@ P.pow = function(n) {
|
|
|
616
627
|
return isneg ? one.div(y) : y;
|
|
617
628
|
};
|
|
618
629
|
P._pow = function(n) {
|
|
619
|
-
var x = this, one = new x.constructor("1"), y =
|
|
630
|
+
var x = this, one = new x.constructor("1"), y = new x.constructor("1"), base = new x.constructor(x), isneg = n < 0;
|
|
620
631
|
if (n !== ~~n || n < -MAX_POWER || n > MAX_POWER) throw Error(INVALID + "exponent");
|
|
621
632
|
if (isneg) n = -n;
|
|
622
633
|
for (;;) {
|
|
@@ -684,12 +695,17 @@ P._sqrt = function() {
|
|
|
684
695
|
r = new Big(c.slice(0, c.indexOf("e") + 1) + e);
|
|
685
696
|
}
|
|
686
697
|
} else r = new Big(s + "");
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
698
|
+
Big.DP += 4;
|
|
699
|
+
e = r.e + Big.DP;
|
|
700
|
+
try {
|
|
701
|
+
do {
|
|
702
|
+
t = r;
|
|
703
|
+
r = half.times(t.plus(x.div(t)));
|
|
704
|
+
} while (t.c.slice(0, e).join("") !== r.c.slice(0, e).join(""));
|
|
705
|
+
} finally {
|
|
706
|
+
Big.DP -= 4;
|
|
707
|
+
}
|
|
708
|
+
return mutateFrom(x, round(r, Big.DP + r.e + 1, Big.RM));
|
|
693
709
|
};
|
|
694
710
|
P.times = P.mul = function(y) {
|
|
695
711
|
var c, x = this, Big = x.constructor, xc = x.c, yBig = new Big(y), yc = yBig.c, a = xc.length, b = yc.length, i = x.e, j = yBig.e;
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":[],"sources":["../src/index.ts"],"sourcesContent":["declare namespace Big {\n type BigSource = number | string | bigint | Big;\n\n /**\n * GT = 1, EQ = 0, LT = -1\n */\n type Comparison = -1 | 0 | 1;\n\n /**\n * RoundDown = 0, RoundHalfUp = 1, RoundHalfEven = 2, RoundUp = 3\n */\n type RoundingMode = 0 | 1 | 2 | 3;\n\n interface BigConstructor {\n /**\n * Returns a new instance of a Big number object\n *\n * String values may be in exponential, as well as normal (non-exponential) notation.\n * There is no limit to the number of digits of a string value (other than that of Javascript's maximum array size), but the largest recommended exponent magnitude is 1e+6.\n * Infinity, NaN and hexadecimal literal strings, e.g. '0xff', are not valid.\n * String values in octal literal form will be interpreted as decimals, e.g. '011' is 11, not 9.\n *\n * @throws `NaN` on an invalid value.\n */\n new(value: BigSource): Big;\n\n /**\n * Returns a new instance of a Big number object\n *\n * String values may be in exponential, as well as normal (non-exponential) notation.\n * There is no limit to the number of digits of a string value (other than that of Javascript's maximum array size), but the largest recommended exponent magnitude is 1e+6.\n * Infinity, NaN and hexadecimal literal strings, e.g. '0xff', are not valid.\n * String values in octal literal form will be interpreted as decimals, e.g. '011' is 11, not 9.\n *\n * @throws `NaN` on an invalid value.\n */\n (value: BigSource): Big;\n\n /**\n * Create an additional Big number constructor\n *\n * Values created with the returned constructor will have a separate set of configuration values.\n * This can be used to create Big objects with different DP and RM values.\n * Big numbers created by different constructors can be used together in operations, and it is the DP and RM setting of the Big number that an operation is called upon that will apply.\n * In the interest of memory efficiency, all Big number constructors share the same prototype object,\n * so while the DP and RM (and other own properties) of a constructor are isolated and untouchable by another, its prototype methods are not.\n */\n (): BigConstructor;\n\n /**\n * The maximum number of decimal places of the results of operations involving division.\n * It is relevant only to the div and sqrt methods, and the pow method when the exponent is negative.\n *\n * 0 to 1e+6 inclusive\n * Default value: 20\n */\n DP: number;\n /**\n * The rounding mode used in the above operations and by round, toExponential, toFixed and toPrecision.\n * Default value: 1\n */\n RM: number;\n /**\n * The negative exponent value at and below which toString returns exponential notation.\n *\n * -1e+6 to 0 inclusive\n * Default value: -7\n */\n NE: number;\n /**\n * The positive exponent value at and above which toString returns exponential notation.\n *\n * 0 to 1e+6 inclusive\n * Default value: 21\n */\n PE: number;\n /**\n * When set to true, an error will be thrown if a primitive number is passed to the Big constructor,\n * or if valueOf is called, or if toNumber is called on a Big which cannot be converted to a primitive number without a loss of precision.\n *\n * true|false\n * Default value: false\n */\n strict: boolean;\n\n /** Readonly rounding modes */\n\n /**\n * Rounds towards zero.\n * I.e. truncate, no rounding.\n */\n readonly roundDown: 0;\n /**\n * Rounds towards nearest neighbour.\n * If equidistant, rounds away from zero.\n */\n readonly roundHalfUp: 1;\n /**\n * Rounds towards nearest neighbour.\n * If equidistant, rounds towards even neighbour.\n */\n readonly roundHalfEven: 2;\n /**\n * Rounds away from zero.\n */\n readonly roundUp: 3;\n\n readonly Big: BigConstructor;\n }\n\n interface Big {\n /** Returns a Big number whose value is the absolute value, i.e. the magnitude, of this Big number. */\n abs(): Big;\n /**\n * Returns a Big number whose value is the value of this Big number plus n - alias for .plus().\n *\n * @throws `NaN` if n is invalid.\n */\n add(n: BigSource): Big;\n /**\n * Compare the values.\n *\n * @throws `NaN` if n is invalid.\n */\n cmp(n: BigSource): Comparison;\n /**\n * Returns a Big number whose value is the value of this Big number divided by n.\n *\n * If the result has more fraction digits than is specified by Big.DP, it will be rounded to Big.DP decimal places using rounding mode Big.RM.\n *\n * @throws `NaN` if n is invalid.\n * @throws `±Infinity` on division by zero.\n * @throws `NaN` on division of zero by zero.\n */\n div(n: BigSource): Big;\n /**\n * Returns true if the value of this Big equals the value of n, otherwise returns false.\n *\n * @throws `NaN` if n is invalid.\n */\n eq(n: BigSource): boolean;\n /**\n * Returns true if the value of this Big is greater than the value of n, otherwise returns false.\n *\n * @throws `NaN` if n is invalid.\n */\n gt(n: BigSource): boolean;\n /**\n * Returns true if the value of this Big is greater than or equal to the value of n, otherwise returns false.\n *\n * @throws `NaN` if n is invalid.\n */\n gte(n: BigSource): boolean;\n /**\n * Returns true if the value of this Big is less than the value of n, otherwise returns false.\n *\n * @throws `NaN` if n is invalid.\n */\n lt(n: BigSource): boolean;\n /**\n * Returns true if the value of this Big is less than or equal to the value of n, otherwise returns false.\n *\n * @throws `NaN` if n is invalid.\n */\n lte(n: BigSource): boolean;\n /**\n * Returns a Big number whose value is the value of this Big number minus n.\n *\n * @throws `NaN` if n is invalid.\n */\n minus(n: BigSource): Big;\n /**\n * Returns a Big number whose value is the value of this Big number modulo n, i.e. the integer remainder of dividing this Big number by n.\n *\n * The result will have the same sign as this Big number, and it will match that of Javascript's % operator (within the limits of its precision) and BigDecimal's remainder method.\n *\n * @throws `NaN` if n is negative or otherwise invalid.\n */\n mod(n: BigSource): Big;\n /**\n * Returns a Big number whose value is the value of this Big number times n - alias for .times().\n *\n * @throws `NaN` if n is invalid.\n */\n mul(n: BigSource): Big;\n /**\n * Return a new Big whose value is the value of this Big negated.\n */\n neg(): Big;\n /** Mutates this Big to its absolute value and returns this instance. */\n _abs(): Big;\n /** Mutates this Big to its negated value and returns this instance. */\n _neg(): Big;\n /**\n * Returns a Big number whose value is the value of this Big number plus n.\n *\n * @throws `NaN` if n is invalid.\n */\n plus(n: BigSource): Big;\n /** Mutates this Big to the provided source value and returns this instance. */\n _set(n: BigSource): Big;\n /** In-place alias for plus. */\n _plus(n: BigSource): Big;\n /** In-place alias for plus. */\n _add(n: BigSource): Big;\n /** In-place alias for minus. */\n _minus(n: BigSource): Big;\n /** In-place alias for minus. */\n _sub(n: BigSource): Big;\n /** In-place alias for times. */\n _times(n: BigSource): Big;\n /** In-place alias for times. */\n _mul(n: BigSource): Big;\n /** In-place variant of div. */\n _div(n: BigSource): Big;\n /** In-place variant of mod. */\n _mod(n: BigSource): Big;\n /**\n * Returns a Big number whose value is the value of this Big number raised to the power exp.\n *\n * If exp is negative and the result has more fraction digits than is specified by Big.DP, it will be rounded to Big.DP decimal places using rounding mode Big.RM.\n *\n * @param exp The power to raise the number to, -1e+6 to 1e+6 inclusive\n * @throws `!pow!` if exp is invalid.\n *\n * Note: High value exponents may cause this method to be slow to return.\n */\n pow(exp: number): Big;\n /** In-place variant of pow. */\n _pow(exp: number): Big;\n /**\n * Return a new Big whose value is the value of this Big rounded to a maximum precision of sd\n * significant digits using rounding mode rm, or Big.RM if rm is not specified.\n *\n * @param sd Significant digits: integer, 1 to MAX_DP inclusive.\n * @param rm Rounding mode: 0 (down), 1 (half-up), 2 (half-even) or 3 (up).\n * @throws `!prec!` if sd is invalid.\n * @throws `!Big.RM!` if rm is invalid.\n */\n prec(sd: number, rm?: RoundingMode): Big;\n /** In-place variant of prec. */\n _prec(sd: number, rm?: RoundingMode): Big;\n /**\n * Returns a Big number whose value is the value of this Big number rounded using rounding mode rm to a maximum of dp decimal places.\n *\n * @param dp Decimal places, 0 to 1e+6 inclusive\n * @param rm Rounding mode: 0 (down), 1 (half-up), 2 (half-even) or 3 (up).\n * @throws `!round!` if dp is invalid.\n * @throws `!Big.RM!` if rm is invalid.\n */\n round(dp?: number, rm?: RoundingMode): Big;\n /** In-place variant of round. */\n _round(dp?: number, rm?: RoundingMode): Big;\n /**\n * Returns a Big number whose value is the square root of this Big number.\n *\n * If the result has more fraction digits than is specified by Big.DP, it will be rounded to Big.DP decimal places using rounding mode Big.RM.\n *\n * @throws `NaN` if this Big number is negative.\n */\n sqrt(): Big;\n /** In-place variant of sqrt. */\n _sqrt(): Big;\n /**\n * Returns a Big number whose value is the value of this Big number minus n - alias for .minus().\n *\n * @throws `NaN` if n is invalid.\n */\n sub(n: BigSource): Big;\n /**\n * Returns a Big number whose value is the value of this Big number times n.\n *\n * @throws `NaN` if n is invalid.\n */\n times(n: BigSource): Big;\n /**\n * Returns a string representing the value of this Big number in exponential notation to a fixed number of decimal places dp.\n *\n * If the value of this Big number in exponential notation has more digits to the right of the decimal point than is specified by dp,\n * the return value will be rounded to dp decimal places using rounding mode Big.RM.\n *\n * If the value of this Big number in exponential notation has fewer digits to the right of the decimal point than is specified by dp, the return value will be appended with zeros accordingly.\n *\n * If dp is omitted, or is null or undefined, the number of digits after the decimal point defaults to the minimum number of digits necessary to represent the value exactly.\n *\n * @param dp Decimal places, 0 to 1e+6 inclusive\n * @param rm Rounding mode: 0 (down), 1 (half-up), 2 (half-even) or 3 (up).\n * @throws `!toFix!` if dp is invalid.\n */\n toExponential(dp?: number, rm?: RoundingMode): string;\n /**\n * Returns a string representing the value of this Big number in normal notation to a fixed number of decimal places dp.\n *\n * If the value of this Big number in normal notation has more digits to the right of the decimal point than is specified by dp,\n * the return value will be rounded to dp decimal places using rounding mode Big.RM.\n *\n * If the value of this Big number in normal notation has fewer fraction digits then is specified by dp, the return value will be appended with zeros accordingly.\n *\n * Unlike Number.prototype.toFixed, which returns exponential notation if a number is greater or equal to 1021, this method will always return normal notation.\n *\n * If dp is omitted, or is null or undefined, then the return value is simply the value in normal notation.\n * This is also unlike Number.prototype.toFixed, which returns the value to zero decimal places.\n *\n * @param dp Decimal places, 0 to 1e+6 inclusive\n * @param rm Rounding mode: 0 (down), 1 (half-up), 2 (half-even) or 3 (up).\n * @throws `!toFix!` if dp is invalid.\n */\n toFixed(dp?: number, rm?: RoundingMode): string;\n /**\n * Returns a string representing the value of this Big number to the specified number of significant digits sd.\n *\n * If the value of this Big number has more digits than is specified by sd, the return value will be rounded to sd significant digits using rounding mode Big.RM.\n *\n * If the value of this Big number has fewer digits than is specified by sd, the return value will be appended with zeros accordingly.\n *\n * If sd is less than the number of digits necessary to represent the integer part of the value in normal notation, then exponential notation is used.\n *\n * If sd is omitted, or is null or undefined, then the return value is the same as .toString().\n *\n * @param sd Significant digits, 1 to 1e+6 inclusive\n * @param rm Rounding mode: 0 (down), 1 (half-up), 2 (half-even) or 3 (up).\n * @throws `!toPre!` if sd is invalid.\n */\n toPrecision(sd?: number, rm?: RoundingMode): string;\n /**\n * Returns a string representing the value of this Big number.\n *\n * If this Big number has a positive exponent that is equal to or greater than 21, or a negative exponent equal to or less than -7, then exponential notation is returned.\n *\n * The point at which toString returns exponential rather than normal notation can be adjusted by changing\n * the value of Big.E_POS and Big.E_NEG. By default, Big numbers correspond to Javascript's number type in this regard.\n */\n toString(): string;\n /**\n * Returns a primitive number representing the value of this Big number.\n *\n * If Big.strict is true an error will be thrown if toNumber is called on a Big number which cannot be converted to a primitive number without a loss of precision.\n *\n * @since 6.0\n */\n toNumber(): number;\n /**\n * Returns a primitive bigint representing the value of this Big number.\n *\n * @throws if this Big number is not an integer.\n */\n toBigInt(): bigint;\n /**\n * Returns a string representing the value of this Big number.\n *\n * If this Big number has a positive exponent that is equal to or greater than 21, or a negative exponent equal to or less than -7, then exponential notation is returned.\n *\n * The point at which toString returns exponential rather than normal notation can be adjusted by changing\n * the value of Big.E_POS and Big.E_NEG. By default, Big numbers correspond to Javascript's number type in this regard.\n */\n valueOf(): string;\n /**\n * Returns a string representing the value of this Big number.\n *\n * If this Big number has a positive exponent that is equal to or greater than 21, or a negative exponent equal to or less than -7, then exponential notation is returned.\n *\n * The point at which toString returns exponential rather than normal notation can be adjusted by changing\n * the value of Big.E_POS and Big.E_NEG. By default, Big numbers correspond to Javascript's number type in this regard.\n */\n toJSON(): string;\n /**\n * Returns an array of single digits\n */\n c: number[];\n /**\n * Returns the exponent, Integer, -1e+6 to 1e+6 inclusive\n */\n e: number;\n /**\n * Returns the sign, -1 or 1\n */\n s: number;\n }\n}\n\ntype Big = Big.Big\ntype BigConstructor = Big.BigConstructor\n\nexport type BigSource = Big.BigSource\nexport type Comparison = Big.Comparison\nexport type RoundingMode = Big.RoundingMode\nexport type BigInstance = Big\n\ntype InternalSign = 1 | -1\ntype InternalDigits = number[]\ntype InternalSource = BigSource | InternalBig\n\ninterface InternalBig extends InternalBigProto {\n c: InternalDigits\n e: number\n s: InternalSign\n constructor: InternalBigConstructor\n}\n\ninterface InternalBigConstructor {\n (): InternalBigConstructor\n (value: InternalSource): InternalBig\n new (value: InternalSource): InternalBig\n DP: number\n RM: RoundingMode\n NE: number\n PE: number\n strict: boolean\n roundDown: 0\n roundHalfUp: 1\n roundHalfEven: 2\n roundUp: 3\n prototype: InternalBigProto\n}\n\ninterface InternalBigProto {\n abs(this: InternalBig): InternalBig\n _abs(this: InternalBig): InternalBig\n _set(this: InternalBig, y: InternalSource): InternalBig\n cmp(this: InternalBig, y: InternalSource): Comparison\n div(this: InternalBig, y: InternalSource): InternalBig\n _div(this: InternalBig, y: InternalSource): InternalBig\n eq(this: InternalBig, y: InternalSource): boolean\n gt(this: InternalBig, y: InternalSource): boolean\n gte(this: InternalBig, y: InternalSource): boolean\n lt(this: InternalBig, y: InternalSource): boolean\n lte(this: InternalBig, y: InternalSource): boolean\n minus(this: InternalBig, y: InternalSource): InternalBig\n sub(this: InternalBig, y: InternalSource): InternalBig\n _minus(this: InternalBig, y: InternalSource): InternalBig\n _sub(this: InternalBig, y: InternalSource): InternalBig\n mod(this: InternalBig, y: InternalSource): InternalBig\n _mod(this: InternalBig, y: InternalSource): InternalBig\n neg(this: InternalBig): InternalBig\n _neg(this: InternalBig): InternalBig\n plus(this: InternalBig, y: InternalSource): InternalBig\n add(this: InternalBig, y: InternalSource): InternalBig\n _plus(this: InternalBig, y: InternalSource): InternalBig\n _add(this: InternalBig, y: InternalSource): InternalBig\n pow(this: InternalBig, n: number): InternalBig\n _pow(this: InternalBig, n: number): InternalBig\n prec(this: InternalBig, sd: number, rm?: RoundingMode): InternalBig\n _prec(this: InternalBig, sd: number, rm?: RoundingMode): InternalBig\n round(this: InternalBig, dp?: number, rm?: RoundingMode): InternalBig\n _round(this: InternalBig, dp?: number, rm?: RoundingMode): InternalBig\n sqrt(this: InternalBig): InternalBig\n _sqrt(this: InternalBig): InternalBig\n times(this: InternalBig, y: InternalSource): InternalBig\n mul(this: InternalBig, y: InternalSource): InternalBig\n _times(this: InternalBig, y: InternalSource): InternalBig\n _mul(this: InternalBig, y: InternalSource): InternalBig\n toExponential(this: InternalBig, dp?: number, rm?: RoundingMode): string\n toFixed(this: InternalBig, dp?: number, rm?: RoundingMode): string\n toJSON(this: InternalBig): string\n toString(this: InternalBig): string\n toNumber(this: InternalBig): number\n toBigInt(this: InternalBig): bigint\n toPrecision(this: InternalBig, sd?: number, rm?: RoundingMode): string\n valueOf(this: InternalBig): string\n [symbolKey: symbol]: ((this: InternalBig) => string) | undefined\n}\n\n/*\n * big.js v7.0.1\n * A small, fast, easy-to-use library for arbitrary-precision decimal arithmetic.\n * Copyright (c) 2025 Michael Mclaughlin\n * https://github.com/MikeMcl/big.js/LICENCE.md\n */\n\n\n/************************************** EDITABLE DEFAULTS *****************************************/\n\n\n // The default values below must be integers within the stated ranges.\n\n /*\n * The maximum number of decimal places (DP) of the results of operations involving division:\n * div and sqrt, and pow with negative exponents.\n */\nvar DP = 20, // 0 to MAX_DP\n\n /*\n * The rounding mode (RM) used when rounding to the above decimal places.\n *\n * 0 Towards zero (i.e. truncate, no rounding). (ROUND_DOWN)\n * 1 To nearest neighbour. If equidistant, round up. (ROUND_HALF_UP)\n * 2 To nearest neighbour. If equidistant, to even. (ROUND_HALF_EVEN)\n * 3 Away from zero. (ROUND_UP)\n */\n RM = 1 as RoundingMode, // 0, 1, 2 or 3\n\n // The maximum value of DP and Big.DP.\n MAX_DP = 1E6, // 0 to 1000000\n\n // The maximum magnitude of the exponent argument to the pow method.\n MAX_POWER = 1E6, // 1 to 1000000\n\n /*\n * The negative exponent (NE) at and beneath which toString returns exponential notation.\n * (JavaScript numbers: -7)\n * -1000000 is the minimum recommended exponent value of a Big.\n */\n NE = -7, // 0 to -1000000\n\n /*\n * The positive exponent (PE) at and above which toString returns exponential notation.\n * (JavaScript numbers: 21)\n * 1000000 is the maximum recommended exponent value of a Big, but this limit is not enforced.\n */\n PE = 21, // 0 to 1000000\n\n /*\n * When true, an error will be thrown if a primitive number is passed to the Big constructor,\n * or if valueOf is called, or if toNumber is called on a Big which cannot be converted to a\n * primitive number without a loss of precision.\n */\n STRICT = false, // true or false\n\n\n/**************************************************************************************************/\n\n\n // Error messages.\n NAME = '[big.js] ',\n INVALID = NAME + 'Invalid ',\n INVALID_DP = INVALID + 'decimal places',\n INVALID_RM = INVALID + 'rounding mode',\n DIV_BY_ZERO = NAME + 'Division by zero',\n\n // The shared prototype object.\n P = {} as unknown as InternalBigProto,\n UNDEFINED = void 0,\n NUMERIC = /^-?(\\d+(\\.\\d*)?|\\.\\d+)(e[+-]?\\d+)?$/i;\n\nconst SOURCE_BUFFER: InternalDigits = []\nlet SOURCE_C: InternalDigits = SOURCE_BUFFER\nlet SOURCE_E = 0\nlet SOURCE_S: InternalSign = 1\n\n\n/*\n * Create and return a Big constructor.\n */\nfunction _Big_(): InternalBigConstructor {\n\n /*\n * The Big constructor and exported function.\n * Create and return a new instance of a Big number object.\n *\n * n {number|string|Big} A numeric value.\n */\n function Big(this: unknown, n?: InternalSource): InternalBig | InternalBigConstructor | void {\n const Ctor = Big as unknown as InternalBigConstructor\n const x = this as unknown\n\n // Enable constructor usage without new.\n if (!(x instanceof Ctor)) {\n return n === UNDEFINED && arguments.length === 0 ? _Big_() : new Ctor(n as InternalSource);\n }\n\n const instance = x as InternalBig\n\n // Duplicate.\n if (n instanceof Ctor) {\n instance.s = n.s;\n instance.e = n.e;\n instance.c = n.c.slice();\n } else {\n let value = n\n\n if (typeof value !== 'string') {\n if (Ctor.strict === true && typeof value !== 'bigint') {\n throw TypeError(INVALID + 'value');\n }\n\n // Minus zero?\n value = value === 0 && 1 / value < 0 ? '-0' : String(value);\n }\n\n parse(instance, value);\n }\n\n // Retain a reference to this Big constructor.\n // Shadow Big.prototype.constructor which points to Object.\n instance.constructor = Ctor;\n }\n\n const Ctor = Big as unknown as InternalBigConstructor\n\n Ctor.prototype = P;\n Ctor.DP = DP;\n Ctor.RM = RM;\n Ctor.NE = NE;\n Ctor.PE = PE;\n Ctor.strict = STRICT;\n Ctor.roundDown = 0;\n Ctor.roundHalfUp = 1;\n Ctor.roundHalfEven = 2;\n Ctor.roundUp = 3;\n\n return Ctor;\n}\n\nfunction negateSign(s: InternalSign): InternalSign {\n return s === 1 ? -1 : 1;\n}\n\nfunction mutateFrom(x: InternalBig, y: InternalBig): InternalBig {\n x.c = y.c;\n x.e = y.e;\n x.s = y.s;\n return x;\n}\n\n\n/*\n * Parse the number or string value passed to a Big constructor.\n *\n * x {Big} A Big number instance.\n * n {number|string} A numeric value.\n */\nfunction parse(x: InternalBig, n: string): InternalBig {\n var e, i, nl;\n\n if (!NUMERIC.test(n)) {\n throw Error(INVALID + 'number');\n }\n\n // Determine sign.\n x.s = n.charAt(0) == '-' ? (n = n.slice(1), -1) : 1;\n\n // Decimal point?\n if ((e = n.indexOf('.')) > -1) n = n.replace('.', '');\n\n // Exponential form?\n if ((i = n.search(/e/i)) > 0) {\n\n // Determine exponent.\n if (e < 0) e = i;\n e += +n.slice(i + 1);\n n = n.substring(0, i);\n } else if (e < 0) {\n\n // Integer.\n e = n.length;\n }\n\n nl = n.length;\n\n // Determine leading zeros.\n for (i = 0; i < nl && n.charAt(i) == '0';) ++i;\n\n if (i == nl) {\n\n // Zero.\n x.c = [x.e = 0];\n } else {\n\n // Determine trailing zeros.\n for (; nl > 0 && n.charAt(--nl) == '0';);\n x.e = e - i - 1;\n x.c = [];\n\n // Convert string to array of digits without leading/trailing zeros.\n for (e = 0; i <= nl;) x.c[e++] = +n.charAt(i++);\n }\n\n return x;\n}\n\nfunction isInternalBigSource(value: InternalSource): value is InternalBig {\n return typeof value === 'object'\n}\n\nfunction parseSourceString(n: string): void {\n let e: number\n let i: number\n let nl: number\n\n if (!NUMERIC.test(n)) {\n throw Error(INVALID + 'number')\n }\n\n SOURCE_S = n.charAt(0) == '-' ? (n = n.slice(1), -1) : 1\n\n if ((e = n.indexOf('.')) > -1) n = n.replace('.', '')\n\n if ((i = n.search(/e/i)) > 0) {\n if (e < 0) e = i\n e += +n.slice(i + 1)\n n = n.substring(0, i)\n } else if (e < 0) {\n e = n.length\n }\n\n nl = n.length\n\n for (i = 0; i < nl && n.charAt(i) == '0';) ++i\n\n if (i == nl) {\n SOURCE_E = 0\n SOURCE_C = SOURCE_BUFFER\n SOURCE_C.length = 1\n SOURCE_C[0] = 0\n return\n }\n\n for (; nl > 0 && n.charAt(--nl) == '0';);\n\n SOURCE_E = e - i - 1\n SOURCE_C = SOURCE_BUFFER\n SOURCE_C.length = 0\n\n for (e = 0; i <= nl;) SOURCE_C[e++] = +n.charAt(i++)\n}\n\nfunction loadSourceParts(Big: InternalBigConstructor, value: InternalSource): void {\n if (isInternalBigSource(value)) {\n SOURCE_C = value.c\n SOURCE_E = value.e\n SOURCE_S = value.s\n return\n }\n\n let n = value\n\n if (typeof n !== 'string') {\n if (Big.strict === true && typeof n !== 'bigint') {\n throw TypeError(INVALID + 'value')\n }\n\n n = n === 0 && 1 / n < 0 ? '-0' : String(n)\n }\n\n parseSourceString(n)\n}\n\n\n/*\n * Round Big x to a maximum of sd significant digits using rounding mode rm.\n *\n * x {Big} The Big to round.\n * sd {number} Significant digits: integer, 0 to MAX_DP inclusive.\n * rm {number} Rounding mode: 0 (down), 1 (half-up), 2 (half-even) or 3 (up).\n * [more] {boolean} Whether the result of division was truncated.\n */\nfunction round(x: InternalBig, sd: number, rm?: RoundingMode, more?: boolean): InternalBig {\n var xc = x.c;\n var d0 = xc[0] ?? 0;\n\n if (rm === UNDEFINED) rm = x.constructor.RM;\n if (rm !== 0 && rm !== 1 && rm !== 2 && rm !== 3) {\n throw Error(INVALID_RM);\n }\n\n if (sd < 1) {\n more =\n rm === 3 && (more || !!xc[0]) || sd === 0 && (\n rm === 1 && d0 >= 5 ||\n rm === 2 && (d0 > 5 || d0 === 5 && (more || xc[1] !== UNDEFINED))\n );\n\n xc.length = 1;\n\n if (more) {\n\n // 1, 0.1, 0.01, 0.001, 0.0001 etc.\n x.e = x.e - sd + 1;\n xc[0] = 1;\n } else {\n\n // Zero.\n xc[0] = x.e = 0;\n }\n } else if (sd < xc.length) {\n d0 = xc[sd] ?? 0;\n\n // xc[sd] is the digit after the digit that may be rounded up.\n more =\n rm === 1 && d0 >= 5 ||\n rm === 2 && (d0 > 5 || d0 === 5 &&\n (more || xc[sd + 1] !== UNDEFINED || ((xc[sd - 1] ?? 0) & 1) === 1)) ||\n rm === 3 && (more || !!xc[0]);\n\n // Remove extra digits after the required precision.\n xc.length = sd;\n\n // Round up?\n if (more) {\n\n // Rounding up may mean the previous digit has to be rounded up.\n for (; ++(xc[--sd]!) > 9;) {\n xc[sd] = 0;\n if (sd === 0) {\n ++x.e;\n xc.unshift(1);\n break;\n }\n }\n }\n\n // Remove trailing zeros.\n for (sd = xc.length; !xc[--sd];) xc.pop();\n }\n\n return x;\n}\n\n\n/*\n * Return a string representing the value of Big x in normal or exponential notation.\n * Handles P.toExponential, P.toFixed, P.toJSON, P.toPrecision, P.toString and P.valueOf.\n */\nfunction stringify(x: InternalBig, doExponential: boolean, isNonzero: boolean): string {\n var e = x.e,\n s = x.c.join(''),\n n = s.length;\n\n // Exponential notation?\n if (doExponential) {\n s = s.charAt(0) + (n > 1 ? '.' + s.slice(1) : '') + (e < 0 ? 'e' : 'e+') + e;\n\n // Normal notation.\n } else if (e < 0) {\n for (; ++e;) s = '0' + s;\n s = '0.' + s;\n } else if (e > 0) {\n if (++e > n) {\n for (e -= n; e--;) s += '0';\n } else if (e < n) {\n s = s.slice(0, e) + '.' + s.slice(e);\n }\n } else if (n > 1) {\n s = s.charAt(0) + '.' + s.slice(1);\n }\n\n return x.s < 0 && isNonzero ? '-' + s : s;\n}\n\n\n// Prototype/instance methods\n\n\n/*\n * Return a new Big whose value is the absolute value of this Big.\n */\nP.abs = function (this: InternalBig) {\n var x = new this.constructor(this);\n x.s = 1;\n return x;\n};\n\nP._abs = function (this: InternalBig): InternalBig {\n if (this.s < 0) this.s = 1;\n return this;\n};\n\nP._set = function (this: InternalBig, y: InternalSource): InternalBig {\n const x = this\n const Big = x.constructor\n\n loadSourceParts(Big, y)\n\n const yc = SOURCE_C\n const yl = yc.length\n\n x.c.length = yl\n for (let i = 0; i < yl; i++) x.c[i] = yc[i] ?? 0\n\n x.e = SOURCE_E\n x.s = SOURCE_S\n\n return x\n};\n\n\n/*\n * Return 1 if the value of this Big is greater than the value of Big y,\n * -1 if the value of this Big is less than the value of Big y, or\n * 0 if they have the same value.\n */\nP.cmp = function (this: InternalBig, y: InternalSource): Comparison {\n var i, j,\n isneg,\n x = this,\n xc = x.c,\n yBig = new x.constructor(y),\n yc = yBig.c,\n xs = x.s,\n ys = yBig.s,\n k = x.e,\n l = yBig.e;\n\n // Either zero?\n if (!xc[0] || !yc[0]) return (!xc[0] ? !yc[0] ? 0 : negateSign(ys) : xs) as Comparison;\n\n // Signs differ?\n if (xs != ys) return xs as Comparison;\n\n isneg = xs < 0;\n\n // Compare exponents.\n if (k != l) return (((k > l ? 1 : 0) ^ (isneg ? 1 : 0)) ? 1 : -1) as Comparison;\n\n j = (k = xc.length) < (l = yc.length) ? k : l;\n\n // Compare digit by digit.\n for (i = -1; ++i < j;) {\n if (xc[i] != yc[i]) return (((xc[i]! > yc[i]! ? 1 : 0) ^ (isneg ? 1 : 0)) ? 1 : -1) as Comparison;\n }\n\n // Compare lengths.\n return (k == l ? 0 : ((k > l ? 1 : 0) ^ (isneg ? 1 : 0)) ? 1 : -1) as Comparison;\n};\n\n\n/*\n * Return a new Big whose value is the value of this Big divided by the value of Big y, rounded,\n * if necessary, to a maximum of Big.DP decimal places using rounding mode Big.RM.\n */\nP.div = function (this: InternalBig, y: InternalSource): InternalBig {\n var x = this,\n Big = x.constructor,\n a = x.c, // dividend\n yBig = new Big(y),\n b = yBig.c, // divisor\n sign: InternalSign = x.s == yBig.s ? 1 : -1,\n dp = Big.DP;\n\n if (dp !== ~~dp || dp < 0 || dp > MAX_DP) {\n throw Error(INVALID_DP);\n }\n\n // Divisor is zero?\n if (!b[0]) {\n throw Error(DIV_BY_ZERO);\n }\n\n // Dividend is 0? Return +-0.\n if (!a[0]) {\n yBig.s = sign;\n yBig.c = [yBig.e = 0];\n return yBig;\n }\n\n var bl, bt, n, cmp, ri,\n bz = b.slice(),\n ai = bl = b.length,\n al = a.length,\n r = a.slice(0, bl) as Array<number | undefined>, // remainder\n rl = r.length,\n q = yBig, // quotient\n qc = q.c = [] as InternalDigits,\n qi = 0,\n p = dp + (q.e = x.e - yBig.e) + 1, // precision of the result\n k = p < 0 ? 0 : p;\n\n q.s = sign;\n\n // Create version of divisor with leading zero.\n bz.unshift(0);\n\n // Add zeros to make remainder as long as divisor.\n for (; rl++ < bl;) r.push(0);\n\n do {\n\n // n is how many times the divisor goes into current remainder.\n for (n = 0; n < 10; n++) {\n\n // Compare divisor and remainder.\n if (bl != (rl = r.length)) {\n cmp = bl > rl ? 1 : -1;\n } else {\n for (ri = -1, cmp = 0; ++ri < bl;) {\n if (b[ri] != r[ri]) {\n cmp = b[ri]! > r[ri]! ? 1 : -1;\n break;\n }\n }\n }\n\n // If divisor < remainder, subtract divisor from remainder.\n if (cmp < 0) {\n\n // Remainder can't be more than 1 digit longer than divisor.\n // Equalise lengths using divisor with extra leading zero?\n for (bt = rl == bl ? b : bz; rl;) {\n if (r[--rl]! < bt[rl]!) {\n ri = rl;\n for (; ri && !r[--ri];) r[ri] = 9;\n --r[ri]!;\n r[rl] = (r[rl] ?? 0) + 10;\n }\n r[rl] = (r[rl] ?? 0) - bt[rl]!;\n }\n\n for (; !r[0];) r.shift();\n } else {\n break;\n }\n }\n\n // Add the digit n to the result array.\n qc[qi++] = cmp ? n : ++n;\n\n // Update the remainder.\n if (r[0] && cmp) r[rl] = a[ai] || 0;\n else r = [a[ai]];\n\n } while ((ai++ < al || r[0] !== UNDEFINED) && k--);\n\n // Leading zero? Do not remove if result is simply zero (qi == 1).\n if (!qc[0] && qi != 1) {\n\n // There can't be more than one zero.\n qc.shift();\n q.e--;\n p--;\n }\n\n // Round?\n if (qi > p) round(q, p, Big.RM, r[0] !== UNDEFINED);\n\n return q;\n};\n\nP._div = function (this: InternalBig, y: InternalSource): InternalBig {\n var x = this,\n Big = x.constructor,\n a = x.c.slice(), // dividend\n yBig = new Big(y),\n b = yBig.c, // divisor\n sign: InternalSign = x.s == yBig.s ? 1 : -1,\n dp = Big.DP;\n\n if (dp !== ~~dp || dp < 0 || dp > MAX_DP) {\n throw Error(INVALID_DP);\n }\n\n // Divisor is zero?\n if (!b[0]) {\n throw Error(DIV_BY_ZERO);\n }\n\n // Dividend is 0? Return +-0.\n if (!a[0]) {\n x.s = sign;\n x.c = [x.e = 0];\n return x;\n }\n\n var bl, bt, n, cmp, ri,\n bz = b.slice(),\n ai = bl = b.length,\n al = a.length,\n r = a.slice(0, bl) as Array<number | undefined>, // remainder\n rl = r.length,\n q = x, // quotient (in place)\n qc = q.c = [] as InternalDigits,\n qi = 0,\n p = dp + (q.e = x.e - yBig.e) + 1, // precision of the result\n k = p < 0 ? 0 : p;\n\n q.s = sign;\n\n // Create version of divisor with leading zero.\n bz.unshift(0);\n\n // Add zeros to make remainder as long as divisor.\n for (; rl++ < bl;) r.push(0);\n\n do {\n\n // n is how many times the divisor goes into current remainder.\n for (n = 0; n < 10; n++) {\n\n // Compare divisor and remainder.\n if (bl != (rl = r.length)) {\n cmp = bl > rl ? 1 : -1;\n } else {\n for (ri = -1, cmp = 0; ++ri < bl;) {\n if (b[ri] != r[ri]) {\n cmp = b[ri]! > r[ri]! ? 1 : -1;\n break;\n }\n }\n }\n\n // If divisor < remainder, subtract divisor from remainder.\n if (cmp < 0) {\n\n // Remainder can't be more than 1 digit longer than divisor.\n // Equalise lengths using divisor with extra leading zero?\n for (bt = rl == bl ? b : bz; rl;) {\n if (r[--rl]! < bt[rl]!) {\n ri = rl;\n for (; ri && !r[--ri];) r[ri] = 9;\n --r[ri]!;\n r[rl] = (r[rl] ?? 0) + 10;\n }\n r[rl] = (r[rl] ?? 0) - bt[rl]!;\n }\n\n for (; !r[0];) r.shift();\n } else {\n break;\n }\n }\n\n // Add the digit n to the result array.\n qc[qi++] = cmp ? n : ++n;\n\n // Update the remainder.\n if (r[0] && cmp) r[rl] = a[ai] || 0;\n else r = [a[ai]];\n\n } while ((ai++ < al || r[0] !== UNDEFINED) && k--);\n\n // Leading zero? Do not remove if result is simply zero (qi == 1).\n if (!qc[0] && qi != 1) {\n\n // There can't be more than one zero.\n qc.shift();\n q.e--;\n p--;\n }\n\n // Round?\n if (qi > p) round(q, p, Big.RM, r[0] !== UNDEFINED);\n\n return q;\n};\n\n\n/*\n * Return true if the value of this Big is equal to the value of Big y, otherwise return false.\n */\nP.eq = function (this: InternalBig, y: InternalSource): boolean {\n return this.cmp(y) === 0;\n};\n\n\n/*\n * Return true if the value of this Big is greater than the value of Big y, otherwise return\n * false.\n */\nP.gt = function (this: InternalBig, y: InternalSource): boolean {\n return this.cmp(y) > 0;\n};\n\n\n/*\n * Return true if the value of this Big is greater than or equal to the value of Big y, otherwise\n * return false.\n */\nP.gte = function (this: InternalBig, y: InternalSource): boolean {\n return this.cmp(y) > -1;\n};\n\n\n/*\n * Return true if the value of this Big is less than the value of Big y, otherwise return false.\n */\nP.lt = function (this: InternalBig, y: InternalSource): boolean {\n return this.cmp(y) < 0;\n};\n\n\n/*\n * Return true if the value of this Big is less than or equal to the value of Big y, otherwise\n * return false.\n */\nP.lte = function (this: InternalBig, y: InternalSource): boolean {\n return this.cmp(y) < 1;\n};\n\n\n/*\n * Return a new Big whose value is the value of this Big minus the value of Big y.\n */\nP.minus = P.sub = function (this: InternalBig, y: InternalSource): InternalBig {\n var i, j, t, xlty,\n x = this,\n Big = x.constructor,\n yBig = new Big(y),\n a = x.s,\n b = yBig.s;\n\n // Signs differ?\n if (a != b) {\n yBig.s = negateSign(b);\n return x.plus(yBig);\n }\n\n var xc = x.c.slice(),\n xe = x.e,\n yc = yBig.c,\n ye = yBig.e,\n aDiff = xe - ye;\n\n // Either zero?\n if (!xc[0] || !yc[0]) {\n if (yc[0]) {\n yBig.s = negateSign(b);\n } else if (xc[0]) {\n yBig = new Big(x);\n } else {\n yBig.s = 1;\n }\n return yBig;\n }\n\n // Determine which is the bigger number. Prepend zeros to equalise exponents.\n if (aDiff) {\n\n if (xlty = aDiff < 0) {\n aDiff = -aDiff;\n t = xc;\n } else {\n ye = xe;\n t = yc;\n }\n\n t.reverse();\n for (j = aDiff; j--;) t.push(0);\n t.reverse();\n } else {\n\n // Exponents equal. Check digit by digit.\n j = ((xlty = xc.length < yc.length) ? xc : yc).length;\n\n for (i = 0; i < j; i++) {\n if (xc[i] != yc[i]) {\n xlty = xc[i]! < yc[i]!;\n break;\n }\n }\n }\n\n // x < y? Point xc to the array of the bigger number.\n if (xlty) {\n t = xc;\n xc = yc;\n yc = t;\n yBig.s = negateSign(yBig.s);\n }\n\n /*\n * Append zeros to xc if shorter. No need to add zeros to yc if shorter as subtraction only\n * needs to start at yc.length.\n */\n if ((j = yc.length - (i = xc.length)) > 0) for (; j--;) xc[i++] = 0;\n\n // Subtract yc from xc.\n for (j = i; j > aDiff;) {\n if (xc[--j]! < (yc[j] ?? 0)) {\n for (i = j; i && !xc[--i];) xc[i] = 9;\n --xc[i]!;\n xc[j] = (xc[j] ?? 0) + 10;\n }\n\n xc[j] = (xc[j] ?? 0) - (yc[j] ?? 0);\n }\n\n // Remove trailing zeros.\n for (j = xc.length; xc[--j] === 0;) xc.pop();\n\n // Remove leading zeros and adjust exponent accordingly.\n for (; xc[0] === 0;) {\n xc.shift();\n --ye;\n }\n\n if (!xc[0]) {\n\n // n - n = +0\n yBig.s = 1;\n\n // Result must be zero.\n xc = [ye = 0];\n }\n\n yBig.c = xc;\n yBig.e = ye;\n\n return yBig;\n};\n\nP._minus = P._sub = function (this: InternalBig, y: InternalSource): InternalBig {\n var i, j, t, xlty,\n x = this,\n Big = x.constructor,\n yBig = new Big(y),\n xSign = x.s,\n ySign = yBig.s,\n xc = x.c.slice(),\n xe = x.e,\n yc = yBig.c,\n ye = yBig.e,\n eDiff = xe - ye;\n\n // Signs differ?\n if (xSign != ySign) {\n yBig.s = negateSign(ySign);\n return x._plus(yBig);\n }\n\n // Either zero?\n if (!xc[0] || !yc[0]) {\n if (!yc[0]) return x;\n\n x.c = yc.slice();\n x.e = ye;\n x.s = negateSign(ySign);\n\n if (!x.c[0]) x.s = 1;\n return x;\n }\n\n // Determine which is the bigger number. Prepend zeros to equalise exponents.\n if (eDiff) {\n\n if (xlty = eDiff < 0) {\n eDiff = -eDiff;\n t = xc;\n } else {\n ye = xe;\n t = yc;\n }\n\n t.reverse();\n for (j = eDiff; j--;) t.push(0);\n t.reverse();\n } else {\n\n // Exponents equal. Check digit by digit.\n j = ((xlty = xc.length < yc.length) ? xc : yc).length;\n\n for (i = 0; i < j; i++) {\n if (xc[i] != yc[i]) {\n xlty = xc[i]! < yc[i]!;\n break;\n }\n }\n }\n\n // x < y? Point xc to the array of the bigger number.\n if (xlty) {\n t = xc;\n xc = yc;\n yc = t;\n xSign = negateSign(xSign);\n }\n\n /*\n * Append zeros to xc if shorter. No need to add zeros to yc if shorter as subtraction only\n * needs to start at yc.length.\n */\n if ((j = yc.length - (i = xc.length)) > 0) for (; j--;) xc[i++] = 0;\n\n // Subtract yc from xc.\n for (j = i; j > eDiff;) {\n if (xc[--j]! < (yc[j] ?? 0)) {\n for (i = j; i && !xc[--i];) xc[i] = 9;\n --xc[i]!;\n xc[j] = (xc[j] ?? 0) + 10;\n }\n\n xc[j] = (xc[j] ?? 0) - (yc[j] ?? 0);\n }\n\n // Remove trailing zeros.\n for (j = xc.length; xc[--j] === 0;) xc.pop();\n\n // Remove leading zeros and adjust exponent accordingly.\n for (; xc[0] === 0;) {\n xc.shift();\n --ye;\n }\n\n if (!xc[0]) {\n\n // n - n = +0\n xSign = 1;\n\n // Result must be zero.\n xc = [ye = 0];\n }\n\n x.c = xc;\n x.e = ye;\n x.s = xSign;\n\n return x;\n};\n\n\n/*\n * Return a new Big whose value is the value of this Big modulo the value of Big y.\n */\nP.mod = function (this: InternalBig, y: InternalSource): InternalBig {\n var ygtx,\n x = this,\n Big = x.constructor,\n yBig = new Big(y),\n xSign = x.s,\n ySign = yBig.s,\n dp: number,\n rm: RoundingMode;\n\n if (!yBig.c[0]) {\n throw Error(DIV_BY_ZERO);\n }\n\n x.s = yBig.s = 1;\n ygtx = yBig.cmp(x) == 1;\n x.s = xSign;\n yBig.s = ySign;\n\n if (ygtx) return new Big(x);\n\n dp = Big.DP;\n rm = Big.RM;\n Big.DP = 0;\n Big.RM = 0;\n x = x.div(yBig);\n Big.DP = dp;\n Big.RM = rm;\n\n return this.minus(x.times(yBig));\n};\n\nP._mod = function (this: InternalBig, y: InternalSource): InternalBig {\n var ygtx,\n x = this,\n Big = x.constructor,\n yBig = new Big(y),\n xSign = x.s,\n ySign = yBig.s,\n dp: number,\n rm: RoundingMode,\n quotient: InternalBig;\n\n if (!yBig.c[0]) {\n throw Error(DIV_BY_ZERO);\n }\n\n x.s = yBig.s = 1;\n ygtx = yBig.cmp(x) == 1;\n x.s = xSign;\n yBig.s = ySign;\n\n if (ygtx) return x;\n\n dp = Big.DP;\n rm = Big.RM;\n Big.DP = 0;\n Big.RM = 0;\n quotient = new Big(x).div(yBig);\n Big.DP = dp;\n Big.RM = rm;\n\n return x._minus(quotient.times(yBig));\n};\n\n\n/*\n * Return a new Big whose value is the value of this Big negated.\n */\nP.neg = function (this: InternalBig): InternalBig {\n var x = new this.constructor(this);\n x.s = negateSign(x.s);\n return x;\n};\n\nP._neg = function (this: InternalBig): InternalBig {\n this.s = negateSign(this.s);\n return this;\n};\n\n\n/*\n * Return a new Big whose value is the value of this Big plus the value of Big y.\n */\nP.plus = P.add = function (this: InternalBig, y: InternalSource): InternalBig {\n var e, k, t,\n x = this,\n Big = x.constructor,\n yBig = new Big(y);\n\n // Signs differ?\n if (x.s != yBig.s) {\n yBig.s = negateSign(yBig.s);\n return x.minus(yBig);\n }\n\n var xe = x.e,\n xc = x.c,\n ye = yBig.e,\n yc = yBig.c;\n\n // Either zero?\n if (!xc[0] || !yc[0]) {\n if (!yc[0]) {\n if (xc[0]) {\n yBig = new Big(x);\n } else {\n yBig.s = x.s;\n }\n }\n return yBig;\n }\n\n xc = xc.slice();\n\n // Prepend zeros to equalise exponents.\n // Note: reverse faster than unshifts.\n if (e = xe - ye) {\n if (e > 0) {\n ye = xe;\n t = yc;\n } else {\n e = -e;\n t = xc;\n }\n\n t.reverse();\n for (; e--;) t.push(0);\n t.reverse();\n }\n\n // Point xc to the longer array.\n if (xc.length - yc.length < 0) {\n t = yc;\n yc = xc;\n xc = t;\n }\n\n // Only start adding at yc.length - 1 as the further digits of xc can be left as they are.\n for (k = 0, e = yc.length; e;) {\n --e;\n k = (xc[e] = (xc[e] ?? 0) + (yc[e] ?? 0) + k) / 10 | 0;\n xc[e]! %= 10;\n }\n\n // No need to check for zero, as +x + +y != 0 && -x + -y != 0\n\n if (k) {\n xc.unshift(k);\n ++ye;\n }\n\n // Remove trailing zeros.\n for (e = xc.length; xc[--e] === 0;) xc.pop();\n\n yBig.c = xc;\n yBig.e = ye;\n\n return yBig;\n};\n\nP._plus = P._add = function (this: InternalBig, y: InternalSource): InternalBig {\n const x = this\n const Big = x.constructor\n\n loadSourceParts(Big, y)\n\n const yc = SOURCE_C\n const ye = SOURCE_E\n const ys = SOURCE_S\n\n const xc = x.c\n const xe = x.e\n const xs = x.s\n\n const xLen = xc.length\n const yLen = yc.length\n\n // Either zero?\n if (!xc[0] || !yc[0]) {\n if (!yc[0]) return x\n\n xc.length = yLen\n for (let i = 0; i < yLen; i++) xc[i] = yc[i] ?? 0\n\n x.e = ye\n x.s = ys\n return x\n }\n\n const topExponent = xe > ye ? xe : ye\n const shiftX = topExponent - xe\n const shiftY = topExponent - ye\n\n // Same sign: magnitude addition.\n if (xs == ys) {\n const lenX = xLen + shiftX\n const lenY = yLen + shiftY\n let len = lenX > lenY ? lenX : lenY\n let carry = 0\n\n xc.length = len\n\n for (let i = len - 1; i >= 0; i--) {\n const ix = i - shiftX\n const iy = i - shiftY\n const dx = ix >= 0 && ix < xLen ? (xc[ix] ?? 0) : 0\n const dy = iy >= 0 && iy < yLen ? (yc[iy] ?? 0) : 0\n const sum = dx + dy + carry\n\n xc[i] = sum % 10\n carry = sum / 10 | 0\n }\n\n if (carry) {\n xc.length = len + 1\n\n for (let i = len; i > 0; i--) xc[i] = xc[i - 1] ?? 0\n\n xc[0] = carry\n len += 1\n x.e = topExponent + 1\n } else {\n x.e = topExponent\n }\n\n while (len > 1 && xc[len - 1] === 0) --len\n xc.length = len\n x.s = xs\n\n return x\n }\n\n // Different signs: magnitude subtraction.\n let cmp = 0\n\n if (xe != ye) {\n cmp = xe > ye ? 1 : -1\n } else if (xLen != yLen) {\n cmp = xLen > yLen ? 1 : -1\n } else {\n for (let i = 0; i < xLen; i++) {\n const xd = xc[i] ?? 0\n const yd = yc[i] ?? 0\n if (xd != yd) {\n cmp = xd > yd ? 1 : -1\n break\n }\n }\n }\n\n if (cmp === 0) {\n xc.length = 1\n xc[0] = 0\n x.e = 0\n x.s = 1\n return x\n }\n\n const ac = cmp > 0 ? xc : yc\n const ae = cmp > 0 ? xe : ye\n const al = cmp > 0 ? xLen : yLen\n const bc = cmp > 0 ? yc : xc\n const be = cmp > 0 ? ye : xe\n const bl = cmp > 0 ? yLen : xLen\n const resultSign = cmp > 0 ? xs : ys\n const alignedExponent = ae > be ? ae : be\n const shiftA = alignedExponent - ae\n const shiftB = alignedExponent - be\n const lenA = al + shiftA\n const lenB = bl + shiftB\n let len = lenA > lenB ? lenA : lenB\n let borrow = 0\n\n xc.length = len\n\n for (let i = len - 1; i >= 0; i--) {\n const ia = i - shiftA\n const ib = i - shiftB\n let da = ia >= 0 && ia < al ? (ac[ia] ?? 0) : 0\n const db = (ib >= 0 && ib < bl ? (bc[ib] ?? 0) : 0) + borrow\n\n if (da < db) {\n da += 10\n borrow = 1\n } else {\n borrow = 0\n }\n\n xc[i] = da - db\n }\n\n let head = 0\n while (head < len - 1 && xc[head] === 0) ++head\n\n if (head) {\n for (let i = 0; i < len - head; i++) xc[i] = xc[i + head] ?? 0\n len -= head\n }\n\n while (len > 1 && xc[len - 1] === 0) --len\n\n xc.length = len\n x.e = alignedExponent - head\n x.s = resultSign\n\n if (!xc[0]) {\n x.e = 0\n x.s = 1\n }\n\n return x\n};\n\n/*\n * Return a Big whose value is the value of this Big raised to the power n.\n * If n is negative, round to a maximum of Big.DP decimal places using rounding\n * mode Big.RM.\n *\n * n {number} Integer, -MAX_POWER to MAX_POWER inclusive.\n */\nP.pow = function (this: InternalBig, n: number): InternalBig {\n var x = this,\n one = new x.constructor('1'),\n y = one,\n isneg = n < 0;\n\n if (n !== ~~n || n < -MAX_POWER || n > MAX_POWER) {\n throw Error(INVALID + 'exponent');\n }\n\n if (isneg) n = -n;\n\n for (;;) {\n if (n & 1) y = y.times(x);\n n >>= 1;\n if (!n) break;\n x = x.times(x);\n }\n\n return isneg ? one.div(y) : y;\n};\n\nP._pow = function (this: InternalBig, n: number): InternalBig {\n var x = this,\n one = new x.constructor('1'),\n y = one,\n base = new x.constructor(x),\n isneg = n < 0;\n\n if (n !== ~~n || n < -MAX_POWER || n > MAX_POWER) {\n throw Error(INVALID + 'exponent');\n }\n\n if (isneg) n = -n;\n\n for (;;) {\n if (n & 1) y._times(base);\n n >>= 1;\n if (!n) break;\n base._times(base);\n }\n\n return isneg ? mutateFrom(x, one._div(y)) : mutateFrom(x, y);\n};\n\n\n/*\n * Return a new Big whose value is the value of this Big rounded to a maximum precision of sd\n * significant digits using rounding mode rm, or Big.RM if rm is not specified.\n *\n * sd {number} Significant digits: integer, 1 to MAX_DP inclusive.\n * rm? {number} Rounding mode: 0 (down), 1 (half-up), 2 (half-even) or 3 (up).\n */\nP.prec = function (this: InternalBig, sd: number, rm?: RoundingMode): InternalBig {\n if (sd !== ~~sd || sd < 1 || sd > MAX_DP) {\n throw Error(INVALID + 'precision');\n }\n return round(new this.constructor(this), sd, rm);\n};\n\nP._prec = function (this: InternalBig, sd: number, rm?: RoundingMode): InternalBig {\n if (sd !== ~~sd || sd < 1 || sd > MAX_DP) {\n throw Error(INVALID + 'precision');\n }\n return round(this, sd, rm);\n};\n\n\n/*\n * Return a new Big whose value is the value of this Big rounded to a maximum of dp decimal places\n * using rounding mode rm, or Big.RM if rm is not specified.\n * If dp is negative, round to an integer which is a multiple of 10**-dp.\n * If dp is not specified, round to 0 decimal places.\n *\n * dp? {number} Integer, -MAX_DP to MAX_DP inclusive.\n * rm? {number} Rounding mode: 0 (down), 1 (half-up), 2 (half-even) or 3 (up).\n */\nP.round = function (this: InternalBig, dp?: number, rm?: RoundingMode): InternalBig {\n if (dp === UNDEFINED) dp = 0;\n else if (dp !== ~~dp || dp < -MAX_DP || dp > MAX_DP) {\n throw Error(INVALID_DP);\n }\n return round(new this.constructor(this), dp + this.e + 1, rm);\n};\n\nP._round = function (this: InternalBig, dp?: number, rm?: RoundingMode): InternalBig {\n if (dp === UNDEFINED) dp = 0;\n else if (dp !== ~~dp || dp < -MAX_DP || dp > MAX_DP) {\n throw Error(INVALID_DP);\n }\n return round(this, dp + this.e + 1, rm);\n};\n\n\n/*\n * Return a new Big whose value is the square root of the value of this Big, rounded, if\n * necessary, to a maximum of Big.DP decimal places using rounding mode Big.RM.\n */\nP.sqrt = function (this: InternalBig): InternalBig {\n var r: InternalBig, c: string, t: InternalBig,\n x = this,\n Big = x.constructor,\n sign = x.s,\n e = x.e,\n half = new Big('0.5'),\n s: number;\n\n // Zero?\n if (!x.c[0]) return new Big(x);\n\n // Negative?\n if (sign < 0) {\n throw Error(NAME + 'No square root');\n }\n\n // Estimate.\n s = Math.sqrt(+stringify(x, true, true));\n\n // Math.sqrt underflow/overflow?\n // Re-estimate: pass x coefficient to Math.sqrt as integer, then adjust the result exponent.\n if (s === 0 || s === 1 / 0) {\n c = x.c.join('');\n if (!(c.length + e & 1)) c += '0';\n s = Math.sqrt(+c);\n e = ((e + 1) / 2 | 0) - ((e < 0 || (e & 1) !== 0) ? 1 : 0);\n if (s == 1 / 0) {\n r = new Big('5e' + e);\n } else {\n c = s.toExponential();\n r = new Big(c.slice(0, c.indexOf('e') + 1) + e);\n }\n } else {\n r = new Big(s + '');\n }\n\n e = r.e + (Big.DP += 4);\n\n // Newton-Raphson iteration.\n do {\n t = r;\n r = half.times(t.plus(x.div(t)));\n } while (t.c.slice(0, e).join('') !== r.c.slice(0, e).join(''));\n\n return round(r, (Big.DP -= 4) + r.e + 1, Big.RM);\n};\n\nP._sqrt = function (this: InternalBig): InternalBig {\n var r: InternalBig, c: string, t: InternalBig,\n x = this,\n Big = x.constructor,\n sign = x.s,\n e = x.e,\n half = new Big('0.5'),\n s: number;\n\n // Zero?\n if (!x.c[0]) return x;\n\n // Negative?\n if (sign < 0) {\n throw Error(NAME + 'No square root');\n }\n\n // Estimate.\n s = Math.sqrt(+stringify(x, true, true));\n\n // Math.sqrt underflow/overflow?\n // Re-estimate: pass x coefficient to Math.sqrt as integer, then adjust the result exponent.\n if (s === 0 || s === 1 / 0) {\n c = x.c.join('');\n if (!(c.length + e & 1)) c += '0';\n s = Math.sqrt(+c);\n e = ((e + 1) / 2 | 0) - ((e < 0 || (e & 1) !== 0) ? 1 : 0);\n if (s == 1 / 0) {\n r = new Big('5e' + e);\n } else {\n c = s.toExponential();\n r = new Big(c.slice(0, c.indexOf('e') + 1) + e);\n }\n } else {\n r = new Big(s + '');\n }\n\n e = r.e + (Big.DP += 4);\n\n // Newton-Raphson iteration.\n do {\n t = r;\n r = half.times(t.plus(x.div(t)));\n } while (t.c.slice(0, e).join('') !== r.c.slice(0, e).join(''));\n\n return mutateFrom(x, round(r, (Big.DP -= 4) + r.e + 1, Big.RM));\n};\n\n\n/*\n * Return a new Big whose value is the value of this Big times the value of Big y.\n */\nP.times = P.mul = function (this: InternalBig, y: InternalSource): InternalBig {\n var c: number[],\n x = this,\n Big = x.constructor,\n xc = x.c,\n yBig = new Big(y),\n yc = yBig.c,\n a = xc.length,\n b = yc.length,\n i = x.e,\n j = yBig.e;\n\n // Determine sign of result.\n yBig.s = x.s == yBig.s ? 1 : -1;\n\n // Return signed 0 if either 0.\n if (!xc[0] || !yc[0]) {\n yBig.c = [yBig.e = 0];\n return yBig;\n }\n\n // Initialise exponent of result as x.e + y.e.\n yBig.e = i + j;\n\n // If array xc has fewer digits than yc, swap xc and yc, and lengths.\n if (a < b) {\n c = xc;\n xc = yc;\n yc = c;\n j = a;\n a = b;\n b = j;\n }\n\n // Initialise coefficient array of result with zeros.\n for (c = new Array(j = a + b); j--;) c[j] = 0;\n\n // Multiply.\n\n // i is initially xc.length.\n for (i = b; i--;) {\n b = 0;\n\n // a is yc.length.\n for (j = a + i; j > i;) {\n\n // Current sum of products at this digit position, plus carry.\n b = (c[j] ?? 0) + (yc[i] ?? 0) * (xc[j - i - 1] ?? 0) + b;\n c[j--] = b % 10;\n\n // carry\n b = b / 10 | 0;\n }\n\n c[j] = b;\n }\n\n // Increment result exponent if there is a final carry, otherwise remove leading zero.\n if (b) ++yBig.e;\n else c.shift();\n\n // Remove trailing zeros.\n for (i = c.length; !c[--i];) c.pop();\n yBig.c = c;\n\n return yBig;\n};\n\nP._times = P._mul = function (this: InternalBig, y: InternalSource): InternalBig {\n var c: number[],\n x = this,\n Big = x.constructor,\n xc = x.c,\n yBig = new Big(y),\n yc = yBig.c,\n a = xc.length,\n b = yc.length,\n i = x.e,\n j = yBig.e,\n sign: InternalSign = x.s == yBig.s ? 1 : -1;\n\n // Return signed 0 if either 0.\n if (!xc[0] || !yc[0]) {\n x.s = sign;\n x.c = [x.e = 0];\n return x;\n }\n\n // Initialise exponent of result as x.e + y.e.\n x.e = i + j;\n\n // If array xc has fewer digits than yc, swap xc and yc, and lengths.\n if (a < b) {\n c = xc;\n xc = yc;\n yc = c;\n j = a;\n a = b;\n b = j;\n }\n\n // Initialise coefficient array of result with zeros.\n for (c = new Array(j = a + b); j--;) c[j] = 0;\n\n // Multiply.\n\n // i is initially xc.length.\n for (i = b; i--;) {\n b = 0;\n\n // a is yc.length.\n for (j = a + i; j > i;) {\n\n // Current sum of products at this digit position, plus carry.\n b = (c[j] ?? 0) + (yc[i] ?? 0) * (xc[j - i - 1] ?? 0) + b;\n c[j--] = b % 10;\n\n // carry\n b = b / 10 | 0;\n }\n\n c[j] = b;\n }\n\n // Increment result exponent if there is a final carry, otherwise remove leading zero.\n if (b) ++x.e;\n else c.shift();\n\n // Remove trailing zeros.\n for (i = c.length; !c[--i];) c.pop();\n\n x.c = c;\n x.s = sign;\n\n return x;\n};\n\n\n/*\n * Return a string representing the value of this Big in exponential notation rounded to dp fixed\n * decimal places using rounding mode rm, or Big.RM if rm is not specified.\n *\n * dp? {number} Decimal places: integer, 0 to MAX_DP inclusive.\n * rm? {number} Rounding mode: 0 (down), 1 (half-up), 2 (half-even) or 3 (up).\n */\nP.toExponential = function (this: InternalBig, dp?: number, rm?: RoundingMode): string {\n var x = this,\n n = x.c[0];\n\n if (dp !== UNDEFINED) {\n if (dp !== ~~dp || dp < 0 || dp > MAX_DP) {\n throw Error(INVALID_DP);\n }\n x = round(new x.constructor(x), ++dp, rm);\n for (; x.c.length < dp;) x.c.push(0);\n }\n\n return stringify(x, true, !!n);\n};\n\n\n/*\n * Return a string representing the value of this Big in normal notation rounded to dp fixed\n * decimal places using rounding mode rm, or Big.RM if rm is not specified.\n *\n * dp? {number} Decimal places: integer, 0 to MAX_DP inclusive.\n * rm? {number} Rounding mode: 0 (down), 1 (half-up), 2 (half-even) or 3 (up).\n *\n * (-0).toFixed(0) is '0', but (-0.1).toFixed(0) is '-0'.\n * (-0).toFixed(1) is '0.0', but (-0.01).toFixed(1) is '-0.0'.\n */\nP.toFixed = function (this: InternalBig, dp?: number, rm?: RoundingMode): string {\n var x = this,\n n = x.c[0];\n\n if (dp !== UNDEFINED) {\n if (dp !== ~~dp || dp < 0 || dp > MAX_DP) {\n throw Error(INVALID_DP);\n }\n x = round(new x.constructor(x), dp + x.e + 1, rm);\n\n // x.e may have changed if the value is rounded up.\n for (dp = dp + x.e + 1; x.c.length < dp;) x.c.push(0);\n }\n\n return stringify(x, false, !!n);\n};\n\n\n/*\n * Return a string representing the value of this Big.\n * Return exponential notation if this Big has a positive exponent equal to or greater than\n * Big.PE, or a negative exponent equal to or less than Big.NE.\n * Omit the sign for negative zero.\n */\nP.toJSON = P.toString = function (this: InternalBig): string {\n var x = this,\n Big = x.constructor;\n return stringify(x, x.e <= Big.NE || x.e >= Big.PE, !!x.c[0]);\n};\n\nif (typeof Symbol !== \"undefined\") {\n P[Symbol.for('nodejs.util.inspect.custom')] = P.toJSON;\n}\n\n\n/*\n * Return the value of this Big as a primitive number.\n */\nP.toNumber = function (this: InternalBig): number {\n var n = +stringify(this, true, true);\n if (this.constructor.strict === true && !this.eq(n.toString())) {\n throw Error(NAME + 'Imprecise conversion');\n }\n return n;\n};\n\n/*\n * Return the value of this Big as a primitive bigint.\n */\nP.toBigInt = function (this: InternalBig): bigint {\n const integer = this.round(0, 0)\n\n if (!this.eq(integer)) {\n throw Error(NAME + 'BigInt conversion requires an integer value')\n }\n\n return BigInt(integer.toFixed(0))\n};\n\n\n/*\n * Return a string representing the value of this Big rounded to sd significant digits using\n * rounding mode rm, or Big.RM if rm is not specified.\n * Use exponential notation if sd is less than the number of digits necessary to represent\n * the integer part of the value in normal notation.\n *\n * sd {number} Significant digits: integer, 1 to MAX_DP inclusive.\n * rm? {number} Rounding mode: 0 (down), 1 (half-up), 2 (half-even) or 3 (up).\n */\nP.toPrecision = function (this: InternalBig, sd?: number, rm?: RoundingMode): string {\n var x = this,\n Big = x.constructor,\n n = x.c[0];\n\n if (sd !== UNDEFINED) {\n if (sd !== ~~sd || sd < 1 || sd > MAX_DP) {\n throw Error(INVALID + 'precision');\n }\n x = round(new Big(x), sd, rm);\n for (; x.c.length < sd;) x.c.push(0);\n }\n\n return stringify(x, (sd !== UNDEFINED && sd <= x.e) || x.e <= Big.NE || x.e >= Big.PE, !!n);\n};\n\n\n/*\n * Return a string representing the value of this Big.\n * Return exponential notation if this Big has a positive exponent equal to or greater than\n * Big.PE, or a negative exponent equal to or less than Big.NE.\n * Include the sign for negative zero.\n */\nP.valueOf = function (this: InternalBig): string {\n var x = this,\n Big = x.constructor;\n if (Big.strict === true) {\n throw Error(NAME + 'valueOf disallowed');\n }\n return stringify(x, x.e <= Big.NE || x.e >= Big.PE, true);\n};\n\nconst Big = _Big_() as unknown as BigConstructor\nexport { Big }\nexport default Big\n"],"mappings":";;AA+dA,IAAI,KAAK,IAUP,KAAK,GAGL,SAAS,KAGT,YAAY,KAOZ,KAAK,IAOL,KAAK,IAOL,SAAS,OAOT,OAAO,aACP,UAAU,OAAO,YACjB,aAAa,UAAU,kBACvB,aAAa,UAAU,iBACvB,cAAc,OAAO,oBAGrB,IAAI,EAAE,EACN,YAAY,KAAK,GACjB,UAAU;AAEZ,MAAM,gBAAgC,EAAE;AACxC,IAAI,WAA2B;AAC/B,IAAI,WAAW;AACf,IAAI,WAAyB;AAM7B,SAAS,QAAgC;CAQvC,SAAS,IAAmB,GAAiE;EAC3F,MAAM,OAAO;EACb,MAAM,IAAI;AAGV,MAAI,EAAE,aAAa,MACjB,QAAO,MAAM,aAAa,UAAU,WAAW,IAAI,OAAO,GAAG,IAAI,KAAK,E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AE,UAAU,CAAC,CAC5D,OAAM,MAAM,OAAO,uBAAuB;AAE5C,QAAO;;AAMT,EAAE,WAAW,WAAqC;CAChD,MAAM,UAAU,KAAK,MAAM,GAAG,EAAE;AAEhC,KAAI,CAAC,KAAK,GAAG,QAAQ,CACnB,OAAM,MAAM,OAAO,8CAA8C;AAGnE,QAAO,OAAO,QAAQ,QAAQ,EAAE,CAAC;;AAanC,EAAE,cAAc,SAA6B,IAAa,IAA2B;CACnF,IAAI,IAAI,MACN,MAAM,EAAE,aACR,IAAI,EAAE,EAAE;AAEV,KAAI,OAAO,WAAW;AACpB,MAAI,OAAO,CAAC,CAAC,MAAM,KAAK,KAAK,KAAK,OAChC,OAAM,MAAM,UAAU,YAAY;AAEpC,MAAI,MAAM,IAAI,IAAI,EAAE,EAAE,IAAI,GAAG;AAC7B,SAAO,EAAE,EAAE,SAAS,IAAK,GAAE,EAAE,KAAK,EAAE;;AAGtC,QAAO,UAAU,GAAI,OAAO,aAAa,MAAM,EAAE,KAAM,EAAE,KAAK,IAAI,MAAM,EAAE,KAAK,IAAI,IAAI,CAAC,CAAC,EAAE;;AAU7F,EAAE,UAAU,WAAqC;CAC/C,IAAI,IAAI,MACN,MAAM,EAAE;AACV,KAAI,IAAI,WAAW,KACjB,OAAM,MAAM,OAAO,qBAAqB;AAE1C,QAAO,UAAU,GAAG,EAAE,KAAK,IAAI,MAAM,EAAE,KAAK,IAAI,IAAI,KAAK;;AAG3D,MAAM,MAA0B,OAAO"}
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../src/index.ts"],"sourcesContent":["declare namespace Big {\n type BigSource = number | string | bigint | Big;\n\n /**\n * GT = 1, EQ = 0, LT = -1\n */\n type Comparison = -1 | 0 | 1;\n\n /**\n * RoundDown = 0, RoundHalfUp = 1, RoundHalfEven = 2, RoundUp = 3\n */\n type RoundingMode = 0 | 1 | 2 | 3;\n\n interface BigConstructor {\n /**\n * Returns a new instance of a Big number object\n *\n * String values may be in exponential, as well as normal (non-exponential) notation.\n * There is no limit to the number of digits of a string value (other than that of Javascript's maximum array size), but the largest recommended exponent magnitude is 1e+6.\n * Infinity, NaN and hexadecimal literal strings, e.g. '0xff', are not valid.\n * String values in octal literal form will be interpreted as decimals, e.g. '011' is 11, not 9.\n *\n * @throws `NaN` on an invalid value.\n */\n new(value: BigSource): Big;\n\n /**\n * Returns a new instance of a Big number object\n *\n * String values may be in exponential, as well as normal (non-exponential) notation.\n * There is no limit to the number of digits of a string value (other than that of Javascript's maximum array size), but the largest recommended exponent magnitude is 1e+6.\n * Infinity, NaN and hexadecimal literal strings, e.g. '0xff', are not valid.\n * String values in octal literal form will be interpreted as decimals, e.g. '011' is 11, not 9.\n *\n * @throws `NaN` on an invalid value.\n */\n (value: BigSource): Big;\n\n /**\n * Create an additional Big number constructor\n *\n * Values created with the returned constructor will have a separate set of configuration values.\n * This can be used to create Big objects with different DP and RM values.\n * Big numbers created by different constructors can be used together in operations, and it is the DP and RM setting of the Big number that an operation is called upon that will apply.\n * In the interest of memory efficiency, all Big number constructors share the same prototype object,\n * so while the DP and RM (and other own properties) of a constructor are isolated and untouchable by another, its prototype methods are not.\n */\n (): BigConstructor;\n\n /**\n * The maximum number of decimal places of the results of operations involving division.\n * It is relevant only to the div and sqrt methods, and the pow method when the exponent is negative.\n *\n * 0 to 1e+6 inclusive\n * Default value: 20\n */\n DP: number;\n /**\n * The rounding mode used in the above operations and by round, toExponential, toFixed and toPrecision.\n * Default value: 1\n */\n RM: number;\n /**\n * The negative exponent value at and below which toString returns exponential notation.\n *\n * -1e+6 to 0 inclusive\n * Default value: -7\n */\n NE: number;\n /**\n * The positive exponent value at and above which toString returns exponential notation.\n *\n * 0 to 1e+6 inclusive\n * Default value: 21\n */\n PE: number;\n /**\n * When set to true, an error will be thrown if a primitive number is passed to the Big constructor,\n * or if valueOf is called, or if toNumber is called on a Big which cannot be converted to a primitive number without a loss of precision.\n *\n * true|false\n * Default value: false\n */\n strict: boolean;\n\n /** Readonly rounding modes */\n\n /**\n * Rounds towards zero.\n * I.e. truncate, no rounding.\n */\n readonly roundDown: 0;\n /**\n * Rounds towards nearest neighbour.\n * If equidistant, rounds away from zero.\n */\n readonly roundHalfUp: 1;\n /**\n * Rounds towards nearest neighbour.\n * If equidistant, rounds towards even neighbour.\n */\n readonly roundHalfEven: 2;\n /**\n * Rounds away from zero.\n */\n readonly roundUp: 3;\n\n readonly Big: BigConstructor;\n }\n\n interface Big {\n /** Returns a Big number whose value is the absolute value, i.e. the magnitude, of this Big number. */\n abs(): Big;\n /**\n * Returns a Big number whose value is the value of this Big number plus n - alias for .plus().\n *\n * @throws `NaN` if n is invalid.\n */\n add(n: BigSource): Big;\n /**\n * Compare the values.\n *\n * @throws `NaN` if n is invalid.\n */\n cmp(n: BigSource): Comparison;\n /**\n * Returns a Big number whose value is the value of this Big number divided by n.\n *\n * If the result has more fraction digits than is specified by Big.DP, it will be rounded to Big.DP decimal places using rounding mode Big.RM.\n *\n * @throws `NaN` if n is invalid.\n * @throws `±Infinity` on division by zero.\n * @throws `NaN` on division of zero by zero.\n */\n div(n: BigSource): Big;\n /**\n * Returns true if the value of this Big equals the value of n, otherwise returns false.\n *\n * @throws `NaN` if n is invalid.\n */\n eq(n: BigSource): boolean;\n /**\n * Returns true if the value of this Big is greater than the value of n, otherwise returns false.\n *\n * @throws `NaN` if n is invalid.\n */\n gt(n: BigSource): boolean;\n /**\n * Returns true if the value of this Big is greater than or equal to the value of n, otherwise returns false.\n *\n * @throws `NaN` if n is invalid.\n */\n gte(n: BigSource): boolean;\n /**\n * Returns true if the value of this Big is less than the value of n, otherwise returns false.\n *\n * @throws `NaN` if n is invalid.\n */\n lt(n: BigSource): boolean;\n /**\n * Returns true if the value of this Big is less than or equal to the value of n, otherwise returns false.\n *\n * @throws `NaN` if n is invalid.\n */\n lte(n: BigSource): boolean;\n /**\n * Returns a Big number whose value is the value of this Big number minus n.\n *\n * @throws `NaN` if n is invalid.\n */\n minus(n: BigSource): Big;\n /**\n * Returns a Big number whose value is the value of this Big number modulo n, i.e. the integer remainder of dividing this Big number by n.\n *\n * The result will have the same sign as this Big number, and it will match that of Javascript's % operator (within the limits of its precision) and BigDecimal's remainder method.\n *\n * @throws `NaN` if n is negative or otherwise invalid.\n */\n mod(n: BigSource): Big;\n /**\n * Returns a Big number whose value is the value of this Big number times n - alias for .times().\n *\n * @throws `NaN` if n is invalid.\n */\n mul(n: BigSource): Big;\n /**\n * Return a new Big whose value is the value of this Big negated.\n */\n neg(): Big;\n /** Mutates this Big to its absolute value and returns this instance. */\n _abs(): Big;\n /** Mutates this Big to its negated value and returns this instance. */\n _neg(): Big;\n /**\n * Returns a Big number whose value is the value of this Big number plus n.\n *\n * @throws `NaN` if n is invalid.\n */\n plus(n: BigSource): Big;\n /** Mutates this Big to the provided source value and returns this instance. */\n _set(n: BigSource): Big;\n /** In-place alias for plus. */\n _plus(n: BigSource): Big;\n /** In-place alias for plus. */\n _add(n: BigSource): Big;\n /** In-place alias for minus. */\n _minus(n: BigSource): Big;\n /** In-place alias for minus. */\n _sub(n: BigSource): Big;\n /** In-place alias for times. */\n _times(n: BigSource): Big;\n /** In-place alias for times. */\n _mul(n: BigSource): Big;\n /** In-place variant of div. */\n _div(n: BigSource): Big;\n /** In-place variant of mod. */\n _mod(n: BigSource): Big;\n /**\n * Returns a Big number whose value is the value of this Big number raised to the power exp.\n *\n * If exp is negative and the result has more fraction digits than is specified by Big.DP, it will be rounded to Big.DP decimal places using rounding mode Big.RM.\n *\n * @param exp The power to raise the number to, -1e+6 to 1e+6 inclusive\n * @throws `!pow!` if exp is invalid.\n *\n * Note: High value exponents may cause this method to be slow to return.\n */\n pow(exp: number): Big;\n /** In-place variant of pow. */\n _pow(exp: number): Big;\n /**\n * Return a new Big whose value is the value of this Big rounded to a maximum precision of sd\n * significant digits using rounding mode rm, or Big.RM if rm is not specified.\n *\n * @param sd Significant digits: integer, 1 to MAX_DP inclusive.\n * @param rm Rounding mode: 0 (down), 1 (half-up), 2 (half-even) or 3 (up).\n * @throws `!prec!` if sd is invalid.\n * @throws `!Big.RM!` if rm is invalid.\n */\n prec(sd: number, rm?: RoundingMode): Big;\n /** In-place variant of prec. */\n _prec(sd: number, rm?: RoundingMode): Big;\n /**\n * Returns a Big number whose value is the value of this Big number rounded using rounding mode rm to a maximum of dp decimal places.\n *\n * @param dp Decimal places, 0 to 1e+6 inclusive\n * @param rm Rounding mode: 0 (down), 1 (half-up), 2 (half-even) or 3 (up).\n * @throws `!round!` if dp is invalid.\n * @throws `!Big.RM!` if rm is invalid.\n */\n round(dp?: number, rm?: RoundingMode): Big;\n /** In-place variant of round. */\n _round(dp?: number, rm?: RoundingMode): Big;\n /**\n * Returns a Big number whose value is the square root of this Big number.\n *\n * If the result has more fraction digits than is specified by Big.DP, it will be rounded to Big.DP decimal places using rounding mode Big.RM.\n *\n * @throws `NaN` if this Big number is negative.\n */\n sqrt(): Big;\n /** In-place variant of sqrt. */\n _sqrt(): Big;\n /**\n * Returns a Big number whose value is the value of this Big number minus n - alias for .minus().\n *\n * @throws `NaN` if n is invalid.\n */\n sub(n: BigSource): Big;\n /**\n * Returns a Big number whose value is the value of this Big number times n.\n *\n * @throws `NaN` if n is invalid.\n */\n times(n: BigSource): Big;\n /**\n * Returns a string representing the value of this Big number in exponential notation to a fixed number of decimal places dp.\n *\n * If the value of this Big number in exponential notation has more digits to the right of the decimal point than is specified by dp,\n * the return value will be rounded to dp decimal places using rounding mode Big.RM.\n *\n * If the value of this Big number in exponential notation has fewer digits to the right of the decimal point than is specified by dp, the return value will be appended with zeros accordingly.\n *\n * If dp is omitted, or is null or undefined, the number of digits after the decimal point defaults to the minimum number of digits necessary to represent the value exactly.\n *\n * @param dp Decimal places, 0 to 1e+6 inclusive\n * @param rm Rounding mode: 0 (down), 1 (half-up), 2 (half-even) or 3 (up).\n * @throws `!toFix!` if dp is invalid.\n */\n toExponential(dp?: number, rm?: RoundingMode): string;\n /**\n * Returns a string representing the value of this Big number in normal notation to a fixed number of decimal places dp.\n *\n * If the value of this Big number in normal notation has more digits to the right of the decimal point than is specified by dp,\n * the return value will be rounded to dp decimal places using rounding mode Big.RM.\n *\n * If the value of this Big number in normal notation has fewer fraction digits then is specified by dp, the return value will be appended with zeros accordingly.\n *\n * Unlike Number.prototype.toFixed, which returns exponential notation if a number is greater or equal to 1021, this method will always return normal notation.\n *\n * If dp is omitted, or is null or undefined, then the return value is simply the value in normal notation.\n * This is also unlike Number.prototype.toFixed, which returns the value to zero decimal places.\n *\n * @param dp Decimal places, 0 to 1e+6 inclusive\n * @param rm Rounding mode: 0 (down), 1 (half-up), 2 (half-even) or 3 (up).\n * @throws `!toFix!` if dp is invalid.\n */\n toFixed(dp?: number, rm?: RoundingMode): string;\n /**\n * Returns a string representing the value of this Big number to the specified number of significant digits sd.\n *\n * If the value of this Big number has more digits than is specified by sd, the return value will be rounded to sd significant digits using rounding mode Big.RM.\n *\n * If the value of this Big number has fewer digits than is specified by sd, the return value will be appended with zeros accordingly.\n *\n * If sd is less than the number of digits necessary to represent the integer part of the value in normal notation, then exponential notation is used.\n *\n * If sd is omitted, or is null or undefined, then the return value is the same as .toString().\n *\n * @param sd Significant digits, 1 to 1e+6 inclusive\n * @param rm Rounding mode: 0 (down), 1 (half-up), 2 (half-even) or 3 (up).\n * @throws `!toPre!` if sd is invalid.\n */\n toPrecision(sd?: number, rm?: RoundingMode): string;\n /**\n * Returns a string representing the value of this Big number.\n *\n * If this Big number has a positive exponent that is equal to or greater than 21, or a negative exponent equal to or less than -7, then exponential notation is returned.\n *\n * The point at which toString returns exponential rather than normal notation can be adjusted by changing\n * the value of Big.E_POS and Big.E_NEG. By default, Big numbers correspond to Javascript's number type in this regard.\n */\n toString(): string;\n /**\n * Returns a primitive number representing the value of this Big number.\n *\n * If Big.strict is true an error will be thrown if toNumber is called on a Big number which cannot be converted to a primitive number without a loss of precision.\n *\n * @since 6.0\n */\n toNumber(): number;\n /**\n * Returns a primitive bigint representing the value of this Big number.\n *\n * @throws if this Big number is not an integer.\n */\n toBigInt(): bigint;\n /**\n * Returns a string representing the value of this Big number.\n *\n * If this Big number has a positive exponent that is equal to or greater than 21, or a negative exponent equal to or less than -7, then exponential notation is returned.\n *\n * The point at which toString returns exponential rather than normal notation can be adjusted by changing\n * the value of Big.E_POS and Big.E_NEG. By default, Big numbers correspond to Javascript's number type in this regard.\n */\n valueOf(): string;\n /**\n * Returns a string representing the value of this Big number.\n *\n * If this Big number has a positive exponent that is equal to or greater than 21, or a negative exponent equal to or less than -7, then exponential notation is returned.\n *\n * The point at which toString returns exponential rather than normal notation can be adjusted by changing\n * the value of Big.E_POS and Big.E_NEG. By default, Big numbers correspond to Javascript's number type in this regard.\n */\n toJSON(): string;\n /**\n * Returns an array of single digits\n */\n c: number[];\n /**\n * Returns the exponent, Integer, -1e+6 to 1e+6 inclusive\n */\n e: number;\n /**\n * Returns the sign, -1 or 1\n */\n s: number;\n }\n}\n\ntype Big = Big.Big\ntype BigConstructor = Big.BigConstructor\n\nexport type BigSource = Big.BigSource\nexport type Comparison = Big.Comparison\nexport type RoundingMode = Big.RoundingMode\nexport type BigInstance = Big\n\ntype InternalSign = 1 | -1\ntype InternalDigits = number[]\ntype InternalSource = BigSource | InternalBig\n\ninterface InternalBig extends InternalBigProto {\n c: InternalDigits\n e: number\n s: InternalSign\n constructor: InternalBigConstructor\n}\n\ninterface InternalBigConstructor {\n (): InternalBigConstructor\n (value: InternalSource): InternalBig\n new (value: InternalSource): InternalBig\n DP: number\n RM: RoundingMode\n NE: number\n PE: number\n strict: boolean\n roundDown: 0\n roundHalfUp: 1\n roundHalfEven: 2\n roundUp: 3\n prototype: InternalBigProto\n}\n\ninterface InternalBigProto {\n abs(this: InternalBig): InternalBig\n _abs(this: InternalBig): InternalBig\n _set(this: InternalBig, y: InternalSource): InternalBig\n cmp(this: InternalBig, y: InternalSource): Comparison\n div(this: InternalBig, y: InternalSource): InternalBig\n _div(this: InternalBig, y: InternalSource): InternalBig\n eq(this: InternalBig, y: InternalSource): boolean\n gt(this: InternalBig, y: InternalSource): boolean\n gte(this: InternalBig, y: InternalSource): boolean\n lt(this: InternalBig, y: InternalSource): boolean\n lte(this: InternalBig, y: InternalSource): boolean\n minus(this: InternalBig, y: InternalSource): InternalBig\n sub(this: InternalBig, y: InternalSource): InternalBig\n _minus(this: InternalBig, y: InternalSource): InternalBig\n _sub(this: InternalBig, y: InternalSource): InternalBig\n mod(this: InternalBig, y: InternalSource): InternalBig\n _mod(this: InternalBig, y: InternalSource): InternalBig\n neg(this: InternalBig): InternalBig\n _neg(this: InternalBig): InternalBig\n plus(this: InternalBig, y: InternalSource): InternalBig\n add(this: InternalBig, y: InternalSource): InternalBig\n _plus(this: InternalBig, y: InternalSource): InternalBig\n _add(this: InternalBig, y: InternalSource): InternalBig\n pow(this: InternalBig, n: number): InternalBig\n _pow(this: InternalBig, n: number): InternalBig\n prec(this: InternalBig, sd: number, rm?: RoundingMode): InternalBig\n _prec(this: InternalBig, sd: number, rm?: RoundingMode): InternalBig\n round(this: InternalBig, dp?: number, rm?: RoundingMode): InternalBig\n _round(this: InternalBig, dp?: number, rm?: RoundingMode): InternalBig\n sqrt(this: InternalBig): InternalBig\n _sqrt(this: InternalBig): InternalBig\n times(this: InternalBig, y: InternalSource): InternalBig\n mul(this: InternalBig, y: InternalSource): InternalBig\n _times(this: InternalBig, y: InternalSource): InternalBig\n _mul(this: InternalBig, y: InternalSource): InternalBig\n toExponential(this: InternalBig, dp?: number, rm?: RoundingMode): string\n toFixed(this: InternalBig, dp?: number, rm?: RoundingMode): string\n toJSON(this: InternalBig): string\n toString(this: InternalBig): string\n toNumber(this: InternalBig): number\n toBigInt(this: InternalBig): bigint\n toPrecision(this: InternalBig, sd?: number, rm?: RoundingMode): string\n valueOf(this: InternalBig): string\n [symbolKey: symbol]: ((this: InternalBig) => string) | undefined\n}\n\n/*\n * big.js v7.0.1\n * A small, fast, easy-to-use library for arbitrary-precision decimal arithmetic.\n * Copyright (c) 2025 Michael Mclaughlin\n * https://github.com/MikeMcl/big.js/LICENCE.md\n */\n\n\n/************************************** EDITABLE DEFAULTS *****************************************/\n\n\n // The default values below must be integers within the stated ranges.\n\n /*\n * The maximum number of decimal places (DP) of the results of operations involving division:\n * div and sqrt, and pow with negative exponents.\n */\nvar DP = 20, // 0 to MAX_DP\n\n /*\n * The rounding mode (RM) used when rounding to the above decimal places.\n *\n * 0 Towards zero (i.e. truncate, no rounding). (ROUND_DOWN)\n * 1 To nearest neighbour. If equidistant, round up. (ROUND_HALF_UP)\n * 2 To nearest neighbour. If equidistant, to even. (ROUND_HALF_EVEN)\n * 3 Away from zero. (ROUND_UP)\n */\n RM = 1 as RoundingMode, // 0, 1, 2 or 3\n\n // The maximum value of DP and Big.DP.\n MAX_DP = 1E6, // 0 to 1000000\n\n // The maximum magnitude of the exponent argument to the pow method.\n MAX_POWER = 1E6, // 1 to 1000000\n\n /*\n * The negative exponent (NE) at and beneath which toString returns exponential notation.\n * (JavaScript numbers: -7)\n * -1000000 is the minimum recommended exponent value of a Big.\n */\n NE = -7, // 0 to -1000000\n\n /*\n * The positive exponent (PE) at and above which toString returns exponential notation.\n * (JavaScript numbers: 21)\n * 1000000 is the maximum recommended exponent value of a Big, but this limit is not enforced.\n */\n PE = 21, // 0 to 1000000\n\n /*\n * When true, an error will be thrown if a primitive number is passed to the Big constructor,\n * or if valueOf is called, or if toNumber is called on a Big which cannot be converted to a\n * primitive number without a loss of precision.\n */\n STRICT = false, // true or false\n\n\n/**************************************************************************************************/\n\n\n // Error messages.\n NAME = '[big.js] ',\n INVALID = NAME + 'Invalid ',\n INVALID_DP = INVALID + 'decimal places',\n INVALID_RM = INVALID + 'rounding mode',\n DIV_BY_ZERO = NAME + 'Division by zero',\n\n // The shared prototype object.\n P = {} as unknown as InternalBigProto,\n UNDEFINED = void 0,\n NUMERIC = /^-?(\\d+(\\.\\d*)?|\\.\\d+)(e[+-]?\\d+)?$/i;\n\nconst SOURCE_BUFFER: InternalDigits = []\nlet SOURCE_C: InternalDigits = SOURCE_BUFFER\nlet SOURCE_E = 0\nlet SOURCE_S: InternalSign = 1\n\n\n/*\n * Create and return a Big constructor.\n */\nfunction _Big_(): InternalBigConstructor {\n\n /*\n * The Big constructor and exported function.\n * Create and return a new instance of a Big number object.\n *\n * n {number|string|Big} A numeric value.\n */\n function Big(this: unknown, n?: InternalSource): InternalBig | InternalBigConstructor | void {\n const Ctor = Big as unknown as InternalBigConstructor\n const x = this as unknown\n\n // Enable constructor usage without new.\n if (!(x instanceof Ctor)) {\n return n === UNDEFINED && arguments.length === 0 ? _Big_() : new Ctor(n as InternalSource);\n }\n\n const instance = x as InternalBig\n\n // Duplicate.\n if (n instanceof Ctor) {\n instance.s = n.s;\n instance.e = n.e;\n instance.c = n.c.slice();\n } else {\n let value = n\n\n if (typeof value !== 'string') {\n if (Ctor.strict === true && typeof value !== 'bigint') {\n throw TypeError(INVALID + 'value');\n }\n\n // Minus zero?\n value = value === 0 && 1 / value < 0 ? '-0' : String(value);\n }\n\n parse(instance, value);\n }\n\n // Retain a reference to this Big constructor.\n // Shadow Big.prototype.constructor which points to Object.\n instance.constructor = Ctor;\n }\n\n const Ctor = Big as unknown as InternalBigConstructor\n\n Ctor.prototype = P;\n Ctor.DP = DP;\n Ctor.RM = RM;\n Ctor.NE = NE;\n Ctor.PE = PE;\n Ctor.strict = STRICT;\n Ctor.roundDown = 0;\n Ctor.roundHalfUp = 1;\n Ctor.roundHalfEven = 2;\n Ctor.roundUp = 3;\n\n return Ctor;\n}\n\nfunction negateSign(s: InternalSign): InternalSign {\n return s === 1 ? -1 : 1;\n}\n\nfunction mutateFrom(x: InternalBig, y: InternalBig): InternalBig {\n x.c = y.c;\n x.e = y.e;\n x.s = y.s;\n return x;\n}\n\n\n/*\n * Parse the number or string value passed to a Big constructor.\n *\n * x {Big} A Big number instance.\n * n {number|string} A numeric value.\n */\nfunction parse(x: InternalBig, n: string): InternalBig {\n var e, i, nl;\n\n if (!NUMERIC.test(n)) {\n throw Error(INVALID + 'number');\n }\n\n // Determine sign.\n x.s = n.charAt(0) == '-' ? (n = n.slice(1), -1) : 1;\n\n // Decimal point?\n if ((e = n.indexOf('.')) > -1) n = n.replace('.', '');\n\n // Exponential form?\n if ((i = n.search(/e/i)) > 0) {\n\n // Determine exponent.\n if (e < 0) e = i;\n e += +n.slice(i + 1);\n n = n.substring(0, i);\n } else if (e < 0) {\n\n // Integer.\n e = n.length;\n }\n\n nl = n.length;\n\n // Determine leading zeros.\n for (i = 0; i < nl && n.charAt(i) == '0';) ++i;\n\n if (i == nl) {\n\n // Zero.\n x.c = [x.e = 0];\n } else {\n\n // Determine trailing zeros.\n for (; nl > 0 && n.charAt(--nl) == '0';);\n x.e = e - i - 1;\n x.c = [];\n\n // Convert string to array of digits without leading/trailing zeros.\n for (e = 0; i <= nl;) x.c[e++] = +n.charAt(i++);\n }\n\n return x;\n}\n\nfunction isInternalBigSource(value: InternalSource): value is InternalBig {\n return typeof value === 'object'\n}\n\nfunction parseSourceString(n: string): void {\n let e: number\n let i: number\n let nl: number\n\n if (!NUMERIC.test(n)) {\n throw Error(INVALID + 'number')\n }\n\n SOURCE_S = n.charAt(0) == '-' ? (n = n.slice(1), -1) : 1\n\n if ((e = n.indexOf('.')) > -1) n = n.replace('.', '')\n\n if ((i = n.search(/e/i)) > 0) {\n if (e < 0) e = i\n e += +n.slice(i + 1)\n n = n.substring(0, i)\n } else if (e < 0) {\n e = n.length\n }\n\n nl = n.length\n\n for (i = 0; i < nl && n.charAt(i) == '0';) ++i\n\n if (i == nl) {\n SOURCE_E = 0\n SOURCE_C = SOURCE_BUFFER\n SOURCE_C.length = 1\n SOURCE_C[0] = 0\n return\n }\n\n for (; nl > 0 && n.charAt(--nl) == '0';);\n\n SOURCE_E = e - i - 1\n SOURCE_C = SOURCE_BUFFER\n SOURCE_C.length = 0\n\n for (e = 0; i <= nl;) SOURCE_C[e++] = +n.charAt(i++)\n}\n\nfunction loadSourceParts(Big: InternalBigConstructor, value: InternalSource): void {\n if (isInternalBigSource(value)) {\n SOURCE_C = value.c\n SOURCE_E = value.e\n SOURCE_S = value.s\n return\n }\n\n let n = value\n\n if (typeof n !== 'string') {\n if (Big.strict === true && typeof n !== 'bigint') {\n throw TypeError(INVALID + 'value')\n }\n\n n = n === 0 && 1 / n < 0 ? '-0' : String(n)\n }\n\n parseSourceString(n)\n}\n\n\n/*\n * Round Big x to a maximum of sd significant digits using rounding mode rm.\n *\n * x {Big} The Big to round.\n * sd {number} Significant digits: integer, 0 to MAX_DP inclusive.\n * rm {number} Rounding mode: 0 (down), 1 (half-up), 2 (half-even) or 3 (up).\n * [more] {boolean} Whether the result of division was truncated.\n */\nfunction round(x: InternalBig, sd: number, rm?: RoundingMode, more?: boolean): InternalBig {\n var xc = x.c;\n var d0 = xc[0] ?? 0;\n\n if (rm === UNDEFINED) rm = x.constructor.RM;\n if (rm !== 0 && rm !== 1 && rm !== 2 && rm !== 3) {\n throw Error(INVALID_RM);\n }\n\n if (sd < 1) {\n more =\n rm === 3 && (more || !!xc[0]) || sd === 0 && (\n rm === 1 && d0 >= 5 ||\n rm === 2 && (d0 > 5 || d0 === 5 && (more || xc[1] !== UNDEFINED))\n );\n\n xc.length = 1;\n\n if (more) {\n\n // 1, 0.1, 0.01, 0.001, 0.0001 etc.\n x.e = x.e - sd + 1;\n xc[0] = 1;\n } else {\n\n // Zero.\n xc[0] = x.e = 0;\n }\n } else if (sd < xc.length) {\n d0 = xc[sd] ?? 0;\n\n // xc[sd] is the digit after the digit that may be rounded up.\n more =\n rm === 1 && d0 >= 5 ||\n rm === 2 && (d0 > 5 || d0 === 5 &&\n (more || xc[sd + 1] !== UNDEFINED || ((xc[sd - 1] ?? 0) & 1) === 1)) ||\n rm === 3 && (more || !!xc[0]);\n\n // Remove extra digits after the required precision.\n xc.length = sd;\n\n // Round up?\n if (more) {\n\n // Rounding up may mean the previous digit has to be rounded up.\n for (; ++(xc[--sd]!) > 9;) {\n xc[sd] = 0;\n if (sd === 0) {\n ++x.e;\n xc.unshift(1);\n break;\n }\n }\n }\n\n // Remove trailing zeros.\n for (sd = xc.length; !xc[--sd];) xc.pop();\n }\n\n return x;\n}\n\n\n/*\n * Return a string representing the value of Big x in normal or exponential notation.\n * Handles P.toExponential, P.toFixed, P.toJSON, P.toPrecision, P.toString and P.valueOf.\n */\nfunction stringify(x: InternalBig, doExponential: boolean, isNonzero: boolean): string {\n var e = x.e,\n s = x.c.join(''),\n n = s.length;\n\n // Exponential notation?\n if (doExponential) {\n s = s.charAt(0) + (n > 1 ? '.' + s.slice(1) : '') + (e < 0 ? 'e' : 'e+') + e;\n\n // Normal notation.\n } else if (e < 0) {\n for (; ++e;) s = '0' + s;\n s = '0.' + s;\n } else if (e > 0) {\n if (++e > n) {\n for (e -= n; e--;) s += '0';\n } else if (e < n) {\n s = s.slice(0, e) + '.' + s.slice(e);\n }\n } else if (n > 1) {\n s = s.charAt(0) + '.' + s.slice(1);\n }\n\n return x.s < 0 && isNonzero ? '-' + s : s;\n}\n\n\n// Prototype/instance methods\n\n\n/*\n * Return a new Big whose value is the absolute value of this Big.\n */\nP.abs = function (this: InternalBig) {\n var x = new this.constructor(this);\n x.s = 1;\n return x;\n};\n\nP._abs = function (this: InternalBig): InternalBig {\n if (this.s < 0) this.s = 1;\n return this;\n};\n\nP._set = function (this: InternalBig, y: InternalSource): InternalBig {\n const x = this\n const Big = x.constructor\n\n loadSourceParts(Big, y)\n\n const yc = SOURCE_C\n const yl = yc.length\n\n x.c.length = yl\n for (let i = 0; i < yl; i++) x.c[i] = yc[i] ?? 0\n\n x.e = SOURCE_E\n x.s = SOURCE_S\n\n return x\n};\n\n\n/*\n * Return 1 if the value of this Big is greater than the value of Big y,\n * -1 if the value of this Big is less than the value of Big y, or\n * 0 if they have the same value.\n */\nP.cmp = function (this: InternalBig, y: InternalSource): Comparison {\n var i, j,\n isneg,\n x = this,\n xc = x.c,\n yBig = new x.constructor(y),\n yc = yBig.c,\n xs = x.s,\n ys = yBig.s,\n k = x.e,\n l = yBig.e;\n\n // Either zero?\n if (!xc[0] || !yc[0]) return (!xc[0] ? !yc[0] ? 0 : negateSign(ys) : xs) as Comparison;\n\n // Signs differ?\n if (xs != ys) return xs as Comparison;\n\n isneg = xs < 0;\n\n // Compare exponents.\n if (k != l) return (((k > l ? 1 : 0) ^ (isneg ? 1 : 0)) ? 1 : -1) as Comparison;\n\n j = (k = xc.length) < (l = yc.length) ? k : l;\n\n // Compare digit by digit.\n for (i = -1; ++i < j;) {\n if (xc[i] != yc[i]) return (((xc[i]! > yc[i]! ? 1 : 0) ^ (isneg ? 1 : 0)) ? 1 : -1) as Comparison;\n }\n\n // Compare lengths.\n return (k == l ? 0 : ((k > l ? 1 : 0) ^ (isneg ? 1 : 0)) ? 1 : -1) as Comparison;\n};\n\n\n/*\n * Return a new Big whose value is the value of this Big divided by the value of Big y, rounded,\n * if necessary, to a maximum of Big.DP decimal places using rounding mode Big.RM.\n */\nP.div = function (this: InternalBig, y: InternalSource): InternalBig {\n var x = this,\n Big = x.constructor,\n a = x.c, // dividend\n yBig = new Big(y),\n b = yBig.c, // divisor\n sign: InternalSign = x.s == yBig.s ? 1 : -1,\n dp = Big.DP;\n\n if (dp !== ~~dp || dp < 0 || dp > MAX_DP) {\n throw Error(INVALID_DP);\n }\n\n // Divisor is zero?\n if (!b[0]) {\n throw Error(DIV_BY_ZERO);\n }\n\n // Dividend is 0? Return +-0.\n if (!a[0]) {\n yBig.s = sign;\n yBig.c = [yBig.e = 0];\n return yBig;\n }\n\n var bl, bt, n, cmp, ri,\n bz = b.slice(),\n ai = bl = b.length,\n al = a.length,\n r = a.slice(0, bl) as Array<number | undefined>, // remainder\n rl = r.length,\n q = yBig, // quotient\n qc = q.c = [] as InternalDigits,\n qi = 0,\n p = dp + (q.e = x.e - yBig.e) + 1, // precision of the result\n k = p < 0 ? 0 : p;\n\n q.s = sign;\n\n // Create version of divisor with leading zero.\n bz.unshift(0);\n\n // Add zeros to make remainder as long as divisor.\n for (; rl++ < bl;) r.push(0);\n\n do {\n\n // n is how many times the divisor goes into current remainder.\n for (n = 0; n < 10; n++) {\n\n // Compare divisor and remainder.\n if (bl != (rl = r.length)) {\n cmp = bl > rl ? 1 : -1;\n } else {\n for (ri = -1, cmp = 0; ++ri < bl;) {\n if (b[ri] != r[ri]) {\n cmp = b[ri]! > r[ri]! ? 1 : -1;\n break;\n }\n }\n }\n\n // If divisor < remainder, subtract divisor from remainder.\n if (cmp < 0) {\n\n // Remainder can't be more than 1 digit longer than divisor.\n // Equalise lengths using divisor with extra leading zero?\n for (bt = rl == bl ? b : bz; rl;) {\n if (r[--rl]! < bt[rl]!) {\n ri = rl;\n for (; ri && !r[--ri];) r[ri] = 9;\n --r[ri]!;\n r[rl] = (r[rl] ?? 0) + 10;\n }\n r[rl] = (r[rl] ?? 0) - bt[rl]!;\n }\n\n for (; !r[0];) r.shift();\n } else {\n break;\n }\n }\n\n // Add the digit n to the result array.\n qc[qi++] = cmp ? n : ++n;\n\n // Update the remainder.\n if (r[0] && cmp) r[rl] = a[ai] || 0;\n else r = [a[ai]];\n\n } while ((ai++ < al || r[0] !== UNDEFINED) && k--);\n\n // Leading zero? Do not remove if result is simply zero (qi == 1).\n if (!qc[0] && qi != 1) {\n\n // There can't be more than one zero.\n qc.shift();\n q.e--;\n p--;\n }\n\n // Round?\n if (qi > p) round(q, p, Big.RM, r[0] !== UNDEFINED);\n\n return q;\n};\n\nP._div = function (this: InternalBig, y: InternalSource): InternalBig {\n var x = this,\n Big = x.constructor,\n a = x.c.slice(), // dividend\n yBig = new Big(y),\n b = yBig.c, // divisor\n sign: InternalSign = x.s == yBig.s ? 1 : -1,\n dp = Big.DP;\n\n if (dp !== ~~dp || dp < 0 || dp > MAX_DP) {\n throw Error(INVALID_DP);\n }\n\n // Divisor is zero?\n if (!b[0]) {\n throw Error(DIV_BY_ZERO);\n }\n\n // Dividend is 0? Return +-0.\n if (!a[0]) {\n x.s = sign;\n x.c = [x.e = 0];\n return x;\n }\n\n var bl, bt, n, cmp, ri,\n bz = b.slice(),\n ai = bl = b.length,\n al = a.length,\n r = a.slice(0, bl) as Array<number | undefined>, // remainder\n rl = r.length,\n q = x, // quotient (in place)\n qc = q.c = [] as InternalDigits,\n qi = 0,\n p = dp + (q.e = x.e - yBig.e) + 1, // precision of the result\n k = p < 0 ? 0 : p;\n\n q.s = sign;\n\n // Create version of divisor with leading zero.\n bz.unshift(0);\n\n // Add zeros to make remainder as long as divisor.\n for (; rl++ < bl;) r.push(0);\n\n do {\n\n // n is how many times the divisor goes into current remainder.\n for (n = 0; n < 10; n++) {\n\n // Compare divisor and remainder.\n if (bl != (rl = r.length)) {\n cmp = bl > rl ? 1 : -1;\n } else {\n for (ri = -1, cmp = 0; ++ri < bl;) {\n if (b[ri] != r[ri]) {\n cmp = b[ri]! > r[ri]! ? 1 : -1;\n break;\n }\n }\n }\n\n // If divisor < remainder, subtract divisor from remainder.\n if (cmp < 0) {\n\n // Remainder can't be more than 1 digit longer than divisor.\n // Equalise lengths using divisor with extra leading zero?\n for (bt = rl == bl ? b : bz; rl;) {\n if (r[--rl]! < bt[rl]!) {\n ri = rl;\n for (; ri && !r[--ri];) r[ri] = 9;\n --r[ri]!;\n r[rl] = (r[rl] ?? 0) + 10;\n }\n r[rl] = (r[rl] ?? 0) - bt[rl]!;\n }\n\n for (; !r[0];) r.shift();\n } else {\n break;\n }\n }\n\n // Add the digit n to the result array.\n qc[qi++] = cmp ? n : ++n;\n\n // Update the remainder.\n if (r[0] && cmp) r[rl] = a[ai] || 0;\n else r = [a[ai]];\n\n } while ((ai++ < al || r[0] !== UNDEFINED) && k--);\n\n // Leading zero? Do not remove if result is simply zero (qi == 1).\n if (!qc[0] && qi != 1) {\n\n // There can't be more than one zero.\n qc.shift();\n q.e--;\n p--;\n }\n\n // Round?\n if (qi > p) round(q, p, Big.RM, r[0] !== UNDEFINED);\n\n return q;\n};\n\n\n/*\n * Return true if the value of this Big is equal to the value of Big y, otherwise return false.\n */\nP.eq = function (this: InternalBig, y: InternalSource): boolean {\n return this.cmp(y) === 0;\n};\n\n\n/*\n * Return true if the value of this Big is greater than the value of Big y, otherwise return\n * false.\n */\nP.gt = function (this: InternalBig, y: InternalSource): boolean {\n return this.cmp(y) > 0;\n};\n\n\n/*\n * Return true if the value of this Big is greater than or equal to the value of Big y, otherwise\n * return false.\n */\nP.gte = function (this: InternalBig, y: InternalSource): boolean {\n return this.cmp(y) > -1;\n};\n\n\n/*\n * Return true if the value of this Big is less than the value of Big y, otherwise return false.\n */\nP.lt = function (this: InternalBig, y: InternalSource): boolean {\n return this.cmp(y) < 0;\n};\n\n\n/*\n * Return true if the value of this Big is less than or equal to the value of Big y, otherwise\n * return false.\n */\nP.lte = function (this: InternalBig, y: InternalSource): boolean {\n return this.cmp(y) < 1;\n};\n\n\n/*\n * Return a new Big whose value is the value of this Big minus the value of Big y.\n */\nP.minus = P.sub = function (this: InternalBig, y: InternalSource): InternalBig {\n var i, j, t, xlty,\n x = this,\n Big = x.constructor,\n yBig = new Big(y),\n a = x.s,\n b = yBig.s;\n\n // Signs differ?\n if (a != b) {\n yBig.s = negateSign(b);\n return x.plus(yBig);\n }\n\n var xc = x.c.slice(),\n xe = x.e,\n yc = yBig.c,\n ye = yBig.e,\n aDiff = xe - ye;\n\n // Either zero?\n if (!xc[0] || !yc[0]) {\n if (yc[0]) {\n yBig.s = negateSign(b);\n } else if (xc[0]) {\n yBig = new Big(x);\n } else {\n yBig.s = 1;\n }\n return yBig;\n }\n\n // Determine which is the bigger number. Prepend zeros to equalise exponents.\n if (aDiff) {\n\n if (xlty = aDiff < 0) {\n aDiff = -aDiff;\n t = xc;\n } else {\n ye = xe;\n t = yc;\n }\n\n t.reverse();\n for (j = aDiff; j--;) t.push(0);\n t.reverse();\n } else {\n\n // Exponents equal. Check digit by digit.\n j = ((xlty = xc.length < yc.length) ? xc : yc).length;\n\n for (i = 0; i < j; i++) {\n if (xc[i] != yc[i]) {\n xlty = xc[i]! < yc[i]!;\n break;\n }\n }\n }\n\n // x < y? Point xc to the array of the bigger number.\n if (xlty) {\n t = xc;\n xc = yc;\n yc = t;\n yBig.s = negateSign(yBig.s);\n }\n\n /*\n * Append zeros to xc if shorter. No need to add zeros to yc if shorter as subtraction only\n * needs to start at yc.length.\n */\n if ((j = yc.length - (i = xc.length)) > 0) for (; j--;) xc[i++] = 0;\n\n // Subtract yc from xc.\n for (j = i; j > aDiff;) {\n if (xc[--j]! < (yc[j] ?? 0)) {\n for (i = j; i && !xc[--i];) xc[i] = 9;\n --xc[i]!;\n xc[j] = (xc[j] ?? 0) + 10;\n }\n\n xc[j] = (xc[j] ?? 0) - (yc[j] ?? 0);\n }\n\n // Remove trailing zeros.\n for (j = xc.length; xc[--j] === 0;) xc.pop();\n\n // Remove leading zeros and adjust exponent accordingly.\n for (; xc[0] === 0;) {\n xc.shift();\n --ye;\n }\n\n if (!xc[0]) {\n\n // n - n = +0\n yBig.s = 1;\n\n // Result must be zero.\n xc = [ye = 0];\n }\n\n yBig.c = xc;\n yBig.e = ye;\n\n return yBig;\n};\n\nP._minus = P._sub = function (this: InternalBig, y: InternalSource): InternalBig {\n var i, j, t, xlty,\n x = this,\n Big = x.constructor,\n yBig = new Big(y),\n xSign = x.s,\n ySign = yBig.s,\n xc = x.c.slice(),\n xe = x.e,\n yc = yBig.c,\n ye = yBig.e,\n eDiff = xe - ye;\n\n // Signs differ?\n if (xSign != ySign) {\n yBig.s = negateSign(ySign);\n return x._plus(yBig);\n }\n\n // Either zero?\n if (!xc[0] || !yc[0]) {\n if (!yc[0]) {\n if (!xc[0]) x.s = xSign < 0 && ySign > 0 ? -1 : 1;\n return x;\n }\n\n x.c = yc.slice();\n x.e = ye;\n x.s = negateSign(ySign);\n\n if (!x.c[0]) x.s = 1;\n return x;\n }\n\n // Determine which is the bigger number. Prepend zeros to equalise exponents.\n if (eDiff) {\n\n if (xlty = eDiff < 0) {\n eDiff = -eDiff;\n t = xc;\n } else {\n ye = xe;\n t = yc;\n }\n\n t.reverse();\n for (j = eDiff; j--;) t.push(0);\n t.reverse();\n } else {\n\n // Exponents equal. Check digit by digit.\n j = ((xlty = xc.length < yc.length) ? xc : yc).length;\n\n for (i = 0; i < j; i++) {\n if (xc[i] != yc[i]) {\n xlty = xc[i]! < yc[i]!;\n break;\n }\n }\n }\n\n // x < y? Point xc to the array of the bigger number.\n if (xlty) {\n t = xc;\n xc = yc;\n yc = t;\n xSign = negateSign(xSign);\n }\n\n /*\n * Append zeros to xc if shorter. No need to add zeros to yc if shorter as subtraction only\n * needs to start at yc.length.\n */\n if ((j = yc.length - (i = xc.length)) > 0) for (; j--;) xc[i++] = 0;\n\n // Subtract yc from xc.\n for (j = i; j > eDiff;) {\n if (xc[--j]! < (yc[j] ?? 0)) {\n for (i = j; i && !xc[--i];) xc[i] = 9;\n --xc[i]!;\n xc[j] = (xc[j] ?? 0) + 10;\n }\n\n xc[j] = (xc[j] ?? 0) - (yc[j] ?? 0);\n }\n\n // Remove trailing zeros.\n for (j = xc.length; xc[--j] === 0;) xc.pop();\n\n // Remove leading zeros and adjust exponent accordingly.\n for (; xc[0] === 0;) {\n xc.shift();\n --ye;\n }\n\n if (!xc[0]) {\n\n // n - n = +0\n xSign = 1;\n\n // Result must be zero.\n xc = [ye = 0];\n }\n\n x.c = xc;\n x.e = ye;\n x.s = xSign;\n\n return x;\n};\n\n\n/*\n * Return a new Big whose value is the value of this Big modulo the value of Big y.\n */\nP.mod = function (this: InternalBig, y: InternalSource): InternalBig {\n var ygtx,\n x = this,\n Big = x.constructor,\n yBig = new Big(y),\n xSign = x.s,\n ySign = yBig.s,\n dp: number,\n rm: RoundingMode;\n\n if (!yBig.c[0]) {\n throw Error(DIV_BY_ZERO);\n }\n\n x.s = yBig.s = 1;\n ygtx = yBig.cmp(x) == 1;\n x.s = xSign;\n yBig.s = ySign;\n\n if (ygtx) return new Big(x);\n\n dp = Big.DP;\n rm = Big.RM;\n Big.DP = 0;\n Big.RM = 0;\n x = x.div(yBig);\n Big.DP = dp;\n Big.RM = rm;\n\n return this.minus(x.times(yBig));\n};\n\nP._mod = function (this: InternalBig, y: InternalSource): InternalBig {\n var ygtx,\n x = this,\n Big = x.constructor,\n yBig = new Big(y),\n xSign = x.s,\n ySign = yBig.s,\n dp: number,\n rm: RoundingMode,\n quotient: InternalBig;\n\n if (!yBig.c[0]) {\n throw Error(DIV_BY_ZERO);\n }\n\n x.s = yBig.s = 1;\n ygtx = yBig.cmp(x) == 1;\n x.s = xSign;\n yBig.s = ySign;\n\n if (ygtx) return x;\n\n dp = Big.DP;\n rm = Big.RM;\n Big.DP = 0;\n Big.RM = 0;\n try {\n quotient = new Big(x).div(yBig);\n } finally {\n Big.DP = dp;\n Big.RM = rm;\n }\n\n return x._minus(quotient.times(yBig));\n};\n\n\n/*\n * Return a new Big whose value is the value of this Big negated.\n */\nP.neg = function (this: InternalBig): InternalBig {\n var x = new this.constructor(this);\n x.s = negateSign(x.s);\n return x;\n};\n\nP._neg = function (this: InternalBig): InternalBig {\n this.s = negateSign(this.s);\n return this;\n};\n\n\n/*\n * Return a new Big whose value is the value of this Big plus the value of Big y.\n */\nP.plus = P.add = function (this: InternalBig, y: InternalSource): InternalBig {\n var e, k, t,\n x = this,\n Big = x.constructor,\n yBig = new Big(y);\n\n // Signs differ?\n if (x.s != yBig.s) {\n yBig.s = negateSign(yBig.s);\n return x.minus(yBig);\n }\n\n var xe = x.e,\n xc = x.c,\n ye = yBig.e,\n yc = yBig.c;\n\n // Either zero?\n if (!xc[0] || !yc[0]) {\n if (!yc[0]) {\n if (xc[0]) {\n yBig = new Big(x);\n } else {\n yBig.s = x.s;\n }\n }\n return yBig;\n }\n\n xc = xc.slice();\n\n // Prepend zeros to equalise exponents.\n // Note: reverse faster than unshifts.\n if (e = xe - ye) {\n if (e > 0) {\n ye = xe;\n t = yc;\n } else {\n e = -e;\n t = xc;\n }\n\n t.reverse();\n for (; e--;) t.push(0);\n t.reverse();\n }\n\n // Point xc to the longer array.\n if (xc.length - yc.length < 0) {\n t = yc;\n yc = xc;\n xc = t;\n }\n\n // Only start adding at yc.length - 1 as the further digits of xc can be left as they are.\n for (k = 0, e = yc.length; e;) {\n --e;\n k = (xc[e] = (xc[e] ?? 0) + (yc[e] ?? 0) + k) / 10 | 0;\n xc[e]! %= 10;\n }\n\n // No need to check for zero, as +x + +y != 0 && -x + -y != 0\n\n if (k) {\n xc.unshift(k);\n ++ye;\n }\n\n // Remove trailing zeros.\n for (e = xc.length; xc[--e] === 0;) xc.pop();\n\n yBig.c = xc;\n yBig.e = ye;\n\n return yBig;\n};\n\nP._plus = P._add = function (this: InternalBig, y: InternalSource): InternalBig {\n const x = this\n const Big = x.constructor\n\n loadSourceParts(Big, y)\n\n const yc = SOURCE_C\n const ye = SOURCE_E\n const ys = SOURCE_S\n\n const xc = x.c\n const xe = x.e\n const xs = x.s\n\n const xLen = xc.length\n const yLen = yc.length\n\n // Either zero?\n if (!xc[0] || !yc[0]) {\n if (!yc[0]) {\n if (!xc[0]) x.s = xs < 0 && ys < 0 ? -1 : 1\n return x\n }\n\n xc.length = yLen\n for (let i = 0; i < yLen; i++) xc[i] = yc[i] ?? 0\n\n x.e = ye\n x.s = ys\n return x\n }\n\n const topExponent = xe > ye ? xe : ye\n const shiftX = topExponent - xe\n const shiftY = topExponent - ye\n\n // Same sign: magnitude addition.\n if (xs == ys) {\n const lenX = xLen + shiftX\n const lenY = yLen + shiftY\n let len = lenX > lenY ? lenX : lenY\n let carry = 0\n\n xc.length = len\n\n for (let i = len - 1; i >= 0; i--) {\n const ix = i - shiftX\n const iy = i - shiftY\n const dx = ix >= 0 && ix < xLen ? (xc[ix] ?? 0) : 0\n const dy = iy >= 0 && iy < yLen ? (yc[iy] ?? 0) : 0\n const sum = dx + dy + carry\n\n xc[i] = sum % 10\n carry = sum / 10 | 0\n }\n\n if (carry) {\n xc.length = len + 1\n\n for (let i = len; i > 0; i--) xc[i] = xc[i - 1] ?? 0\n\n xc[0] = carry\n len += 1\n x.e = topExponent + 1\n } else {\n x.e = topExponent\n }\n\n while (len > 1 && xc[len - 1] === 0) --len\n xc.length = len\n x.s = xs\n\n return x\n }\n\n // Different signs: magnitude subtraction.\n let cmp = 0\n\n if (xe != ye) {\n cmp = xe > ye ? 1 : -1\n } else {\n const maxLen = xLen > yLen ? xLen : yLen\n for (let i = 0; i < maxLen; i++) {\n const xd = i < xLen ? (xc[i] ?? 0) : 0\n const yd = i < yLen ? (yc[i] ?? 0) : 0\n if (xd != yd) {\n cmp = xd > yd ? 1 : -1\n break\n }\n }\n }\n\n if (cmp === 0) {\n xc.length = 1\n xc[0] = 0\n x.e = 0\n x.s = 1\n return x\n }\n\n // Right-to-left subtraction lets x.c act as the destination and, when needed, one operand.\n const ac = cmp > 0 ? xc : yc\n const ae = cmp > 0 ? xe : ye\n const al = cmp > 0 ? xLen : yLen\n const bc = cmp > 0 ? yc : xc\n const be = cmp > 0 ? ye : xe\n const bl = cmp > 0 ? yLen : xLen\n const resultSign = cmp > 0 ? xs : ys\n const alignedExponent = ae > be ? ae : be\n const shiftA = alignedExponent - ae\n const shiftB = alignedExponent - be\n const lenA = al + shiftA\n const lenB = bl + shiftB\n let len = lenA > lenB ? lenA : lenB\n let borrow = 0\n\n xc.length = len\n\n for (let i = len - 1; i >= 0; i--) {\n const ia = i - shiftA\n const ib = i - shiftB\n let da = ia >= 0 && ia < al ? (ac[ia] ?? 0) : 0\n const db = (ib >= 0 && ib < bl ? (bc[ib] ?? 0) : 0) + borrow\n\n if (da < db) {\n da += 10\n borrow = 1\n } else {\n borrow = 0\n }\n\n xc[i] = da - db\n }\n\n let head = 0\n while (head < len - 1 && xc[head] === 0) ++head\n\n if (head) {\n for (let i = 0; i < len - head; i++) xc[i] = xc[i + head] ?? 0\n len -= head\n }\n\n while (len > 1 && xc[len - 1] === 0) --len\n\n xc.length = len\n x.e = alignedExponent - head\n x.s = resultSign\n\n if (!xc[0]) {\n x.e = 0\n x.s = 1\n }\n\n return x\n};\n\n/*\n * Return a Big whose value is the value of this Big raised to the power n.\n * If n is negative, round to a maximum of Big.DP decimal places using rounding\n * mode Big.RM.\n *\n * n {number} Integer, -MAX_POWER to MAX_POWER inclusive.\n */\nP.pow = function (this: InternalBig, n: number): InternalBig {\n var x = this,\n one = new x.constructor('1'),\n y = one,\n isneg = n < 0;\n\n if (n !== ~~n || n < -MAX_POWER || n > MAX_POWER) {\n throw Error(INVALID + 'exponent');\n }\n\n if (isneg) n = -n;\n\n for (;;) {\n if (n & 1) y = y.times(x);\n n >>= 1;\n if (!n) break;\n x = x.times(x);\n }\n\n return isneg ? one.div(y) : y;\n};\n\nP._pow = function (this: InternalBig, n: number): InternalBig {\n var x = this,\n one = new x.constructor('1'),\n y = new x.constructor('1'),\n base = new x.constructor(x),\n isneg = n < 0;\n\n if (n !== ~~n || n < -MAX_POWER || n > MAX_POWER) {\n throw Error(INVALID + 'exponent');\n }\n\n if (isneg) n = -n;\n\n for (;;) {\n if (n & 1) y._times(base);\n n >>= 1;\n if (!n) break;\n base._times(base);\n }\n\n return isneg ? mutateFrom(x, one._div(y)) : mutateFrom(x, y);\n};\n\n\n/*\n * Return a new Big whose value is the value of this Big rounded to a maximum precision of sd\n * significant digits using rounding mode rm, or Big.RM if rm is not specified.\n *\n * sd {number} Significant digits: integer, 1 to MAX_DP inclusive.\n * rm? {number} Rounding mode: 0 (down), 1 (half-up), 2 (half-even) or 3 (up).\n */\nP.prec = function (this: InternalBig, sd: number, rm?: RoundingMode): InternalBig {\n if (sd !== ~~sd || sd < 1 || sd > MAX_DP) {\n throw Error(INVALID + 'precision');\n }\n return round(new this.constructor(this), sd, rm);\n};\n\nP._prec = function (this: InternalBig, sd: number, rm?: RoundingMode): InternalBig {\n if (sd !== ~~sd || sd < 1 || sd > MAX_DP) {\n throw Error(INVALID + 'precision');\n }\n return round(this, sd, rm);\n};\n\n\n/*\n * Return a new Big whose value is the value of this Big rounded to a maximum of dp decimal places\n * using rounding mode rm, or Big.RM if rm is not specified.\n * If dp is negative, round to an integer which is a multiple of 10**-dp.\n * If dp is not specified, round to 0 decimal places.\n *\n * dp? {number} Integer, -MAX_DP to MAX_DP inclusive.\n * rm? {number} Rounding mode: 0 (down), 1 (half-up), 2 (half-even) or 3 (up).\n */\nP.round = function (this: InternalBig, dp?: number, rm?: RoundingMode): InternalBig {\n if (dp === UNDEFINED) dp = 0;\n else if (dp !== ~~dp || dp < -MAX_DP || dp > MAX_DP) {\n throw Error(INVALID_DP);\n }\n return round(new this.constructor(this), dp + this.e + 1, rm);\n};\n\nP._round = function (this: InternalBig, dp?: number, rm?: RoundingMode): InternalBig {\n if (dp === UNDEFINED) dp = 0;\n else if (dp !== ~~dp || dp < -MAX_DP || dp > MAX_DP) {\n throw Error(INVALID_DP);\n }\n return round(this, dp + this.e + 1, rm);\n};\n\n\n/*\n * Return a new Big whose value is the square root of the value of this Big, rounded, if\n * necessary, to a maximum of Big.DP decimal places using rounding mode Big.RM.\n */\nP.sqrt = function (this: InternalBig): InternalBig {\n var r: InternalBig, c: string, t: InternalBig,\n x = this,\n Big = x.constructor,\n sign = x.s,\n e = x.e,\n half = new Big('0.5'),\n s: number;\n\n // Zero?\n if (!x.c[0]) return new Big(x);\n\n // Negative?\n if (sign < 0) {\n throw Error(NAME + 'No square root');\n }\n\n // Estimate.\n s = Math.sqrt(+stringify(x, true, true));\n\n // Math.sqrt underflow/overflow?\n // Re-estimate: pass x coefficient to Math.sqrt as integer, then adjust the result exponent.\n if (s === 0 || s === 1 / 0) {\n c = x.c.join('');\n if (!(c.length + e & 1)) c += '0';\n s = Math.sqrt(+c);\n e = ((e + 1) / 2 | 0) - ((e < 0 || (e & 1) !== 0) ? 1 : 0);\n if (s == 1 / 0) {\n r = new Big('5e' + e);\n } else {\n c = s.toExponential();\n r = new Big(c.slice(0, c.indexOf('e') + 1) + e);\n }\n } else {\n r = new Big(s + '');\n }\n\n e = r.e + (Big.DP += 4);\n\n // Newton-Raphson iteration.\n do {\n t = r;\n r = half.times(t.plus(x.div(t)));\n } while (t.c.slice(0, e).join('') !== r.c.slice(0, e).join(''));\n\n return round(r, (Big.DP -= 4) + r.e + 1, Big.RM);\n};\n\nP._sqrt = function (this: InternalBig): InternalBig {\n var r: InternalBig, c: string, t: InternalBig,\n x = this,\n Big = x.constructor,\n sign = x.s,\n e = x.e,\n half = new Big('0.5'),\n s: number;\n\n // Zero?\n if (!x.c[0]) return x;\n\n // Negative?\n if (sign < 0) {\n throw Error(NAME + 'No square root');\n }\n\n // Estimate.\n s = Math.sqrt(+stringify(x, true, true));\n\n // Math.sqrt underflow/overflow?\n // Re-estimate: pass x coefficient to Math.sqrt as integer, then adjust the result exponent.\n if (s === 0 || s === 1 / 0) {\n c = x.c.join('');\n if (!(c.length + e & 1)) c += '0';\n s = Math.sqrt(+c);\n e = ((e + 1) / 2 | 0) - ((e < 0 || (e & 1) !== 0) ? 1 : 0);\n if (s == 1 / 0) {\n r = new Big('5e' + e);\n } else {\n c = s.toExponential();\n r = new Big(c.slice(0, c.indexOf('e') + 1) + e);\n }\n } else {\n r = new Big(s + '');\n }\n\n Big.DP += 4;\n e = r.e + Big.DP;\n\n try {\n\n // Newton-Raphson iteration.\n do {\n t = r;\n r = half.times(t.plus(x.div(t)));\n } while (t.c.slice(0, e).join('') !== r.c.slice(0, e).join(''));\n } finally {\n Big.DP -= 4;\n }\n\n return mutateFrom(x, round(r, Big.DP + r.e + 1, Big.RM));\n};\n\n\n/*\n * Return a new Big whose value is the value of this Big times the value of Big y.\n */\nP.times = P.mul = function (this: InternalBig, y: InternalSource): InternalBig {\n var c: number[],\n x = this,\n Big = x.constructor,\n xc = x.c,\n yBig = new Big(y),\n yc = yBig.c,\n a = xc.length,\n b = yc.length,\n i = x.e,\n j = yBig.e;\n\n // Determine sign of result.\n yBig.s = x.s == yBig.s ? 1 : -1;\n\n // Return signed 0 if either 0.\n if (!xc[0] || !yc[0]) {\n yBig.c = [yBig.e = 0];\n return yBig;\n }\n\n // Initialise exponent of result as x.e + y.e.\n yBig.e = i + j;\n\n // If array xc has fewer digits than yc, swap xc and yc, and lengths.\n if (a < b) {\n c = xc;\n xc = yc;\n yc = c;\n j = a;\n a = b;\n b = j;\n }\n\n // Initialise coefficient array of result with zeros.\n for (c = new Array(j = a + b); j--;) c[j] = 0;\n\n // Multiply.\n\n // i is initially xc.length.\n for (i = b; i--;) {\n b = 0;\n\n // a is yc.length.\n for (j = a + i; j > i;) {\n\n // Current sum of products at this digit position, plus carry.\n b = (c[j] ?? 0) + (yc[i] ?? 0) * (xc[j - i - 1] ?? 0) + b;\n c[j--] = b % 10;\n\n // carry\n b = b / 10 | 0;\n }\n\n c[j] = b;\n }\n\n // Increment result exponent if there is a final carry, otherwise remove leading zero.\n if (b) ++yBig.e;\n else c.shift();\n\n // Remove trailing zeros.\n for (i = c.length; !c[--i];) c.pop();\n yBig.c = c;\n\n return yBig;\n};\n\nP._times = P._mul = function (this: InternalBig, y: InternalSource): InternalBig {\n var c: number[],\n x = this,\n Big = x.constructor,\n xc = x.c,\n yBig = new Big(y),\n yc = yBig.c,\n a = xc.length,\n b = yc.length,\n i = x.e,\n j = yBig.e,\n sign: InternalSign = x.s == yBig.s ? 1 : -1;\n\n // Return signed 0 if either 0.\n if (!xc[0] || !yc[0]) {\n x.s = sign;\n x.c = [x.e = 0];\n return x;\n }\n\n // Initialise exponent of result as x.e + y.e.\n x.e = i + j;\n\n // If array xc has fewer digits than yc, swap xc and yc, and lengths.\n if (a < b) {\n c = xc;\n xc = yc;\n yc = c;\n j = a;\n a = b;\n b = j;\n }\n\n // Initialise coefficient array of result with zeros.\n for (c = new Array(j = a + b); j--;) c[j] = 0;\n\n // Multiply.\n\n // i is initially xc.length.\n for (i = b; i--;) {\n b = 0;\n\n // a is yc.length.\n for (j = a + i; j > i;) {\n\n // Current sum of products at this digit position, plus carry.\n b = (c[j] ?? 0) + (yc[i] ?? 0) * (xc[j - i - 1] ?? 0) + b;\n c[j--] = b % 10;\n\n // carry\n b = b / 10 | 0;\n }\n\n c[j] = b;\n }\n\n // Increment result exponent if there is a final carry, otherwise remove leading zero.\n if (b) ++x.e;\n else c.shift();\n\n // Remove trailing zeros.\n for (i = c.length; !c[--i];) c.pop();\n\n x.c = c;\n x.s = sign;\n\n return x;\n};\n\n\n/*\n * Return a string representing the value of this Big in exponential notation rounded to dp fixed\n * decimal places using rounding mode rm, or Big.RM if rm is not specified.\n *\n * dp? {number} Decimal places: integer, 0 to MAX_DP inclusive.\n * rm? {number} Rounding mode: 0 (down), 1 (half-up), 2 (half-even) or 3 (up).\n */\nP.toExponential = function (this: InternalBig, dp?: number, rm?: RoundingMode): string {\n var x = this,\n n = x.c[0];\n\n if (dp !== UNDEFINED) {\n if (dp !== ~~dp || dp < 0 || dp > MAX_DP) {\n throw Error(INVALID_DP);\n }\n x = round(new x.constructor(x), ++dp, rm);\n for (; x.c.length < dp;) x.c.push(0);\n }\n\n return stringify(x, true, !!n);\n};\n\n\n/*\n * Return a string representing the value of this Big in normal notation rounded to dp fixed\n * decimal places using rounding mode rm, or Big.RM if rm is not specified.\n *\n * dp? {number} Decimal places: integer, 0 to MAX_DP inclusive.\n * rm? {number} Rounding mode: 0 (down), 1 (half-up), 2 (half-even) or 3 (up).\n *\n * (-0).toFixed(0) is '0', but (-0.1).toFixed(0) is '-0'.\n * (-0).toFixed(1) is '0.0', but (-0.01).toFixed(1) is '-0.0'.\n */\nP.toFixed = function (this: InternalBig, dp?: number, rm?: RoundingMode): string {\n var x = this,\n n = x.c[0];\n\n if (dp !== UNDEFINED) {\n if (dp !== ~~dp || dp < 0 || dp > MAX_DP) {\n throw Error(INVALID_DP);\n }\n x = round(new x.constructor(x), dp + x.e + 1, rm);\n\n // x.e may have changed if the value is rounded up.\n for (dp = dp + x.e + 1; x.c.length < dp;) x.c.push(0);\n }\n\n return stringify(x, false, !!n);\n};\n\n\n/*\n * Return a string representing the value of this Big.\n * Return exponential notation if this Big has a positive exponent equal to or greater than\n * Big.PE, or a negative exponent equal to or less than Big.NE.\n * Omit the sign for negative zero.\n */\nP.toJSON = P.toString = function (this: InternalBig): string {\n var x = this,\n Big = x.constructor;\n return stringify(x, x.e <= Big.NE || x.e >= Big.PE, !!x.c[0]);\n};\n\nif (typeof Symbol !== \"undefined\") {\n P[Symbol.for('nodejs.util.inspect.custom')] = P.toJSON;\n}\n\n\n/*\n * Return the value of this Big as a primitive number.\n */\nP.toNumber = function (this: InternalBig): number {\n var n = +stringify(this, true, true);\n if (this.constructor.strict === true && !this.eq(n.toString())) {\n throw Error(NAME + 'Imprecise conversion');\n }\n return n;\n};\n\n/*\n * Return the value of this Big as a primitive bigint.\n */\nP.toBigInt = function (this: InternalBig): bigint {\n const integer = this.round(0, 0)\n\n if (!this.eq(integer)) {\n throw Error(NAME + 'BigInt conversion requires an integer value')\n }\n\n return BigInt(integer.toFixed(0))\n};\n\n\n/*\n * Return a string representing the value of this Big rounded to sd significant digits using\n * rounding mode rm, or Big.RM if rm is not specified.\n * Use exponential notation if sd is less than the number of digits necessary to represent\n * the integer part of the value in normal notation.\n *\n * sd {number} Significant digits: integer, 1 to MAX_DP inclusive.\n * rm? {number} Rounding mode: 0 (down), 1 (half-up), 2 (half-even) or 3 (up).\n */\nP.toPrecision = function (this: InternalBig, sd?: number, rm?: RoundingMode): string {\n var x = this,\n Big = x.constructor,\n n = x.c[0];\n\n if (sd !== UNDEFINED) {\n if (sd !== ~~sd || sd < 1 || sd > MAX_DP) {\n throw Error(INVALID + 'precision');\n }\n x = round(new Big(x), sd, rm);\n for (; x.c.length < sd;) x.c.push(0);\n }\n\n return stringify(x, (sd !== UNDEFINED && sd <= x.e) || x.e <= Big.NE || x.e >= Big.PE, !!n);\n};\n\n\n/*\n * Return a string representing the value of this Big.\n * Return exponential notation if this Big has a positive exponent equal to or greater than\n * Big.PE, or a negative exponent equal to or less than Big.NE.\n * Include the sign for negative zero.\n */\nP.valueOf = function (this: InternalBig): string {\n var x = this,\n Big = x.constructor;\n if (Big.strict === true) {\n throw Error(NAME + 'valueOf disallowed');\n }\n return stringify(x, x.e <= Big.NE || x.e >= Big.PE, true);\n};\n\nconst Big = _Big_() as unknown as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,OAAM,MAAM,UAAU,YAAY;AAEpC,MAAI,MAAM,IAAI,IAAI,EAAE,EAAE,IAAI,GAAG;AAC7B,SAAO,EAAE,EAAE,SAAS,IAAK,GAAE,EAAE,KAAK,EAAE;;AAGtC,QAAO,UAAU,GAAI,OAAO,aAAa,MAAM,EAAE,KAAM,EAAE,KAAK,IAAI,MAAM,EAAE,KAAK,IAAI,IAAI,CAAC,CAAC,EAAE;;AAU7F,EAAE,UAAU,WAAqC;CAC/C,IAAI,IAAI,MACN,MAAM,EAAE;AACV,KAAI,IAAI,WAAW,KACjB,OAAM,MAAM,OAAO,qBAAqB;AAE1C,QAAO,UAAU,GAAG,EAAE,KAAK,IAAI,MAAM,EAAE,KAAK,IAAI,IAAI,KAAK;;AAG3D,MAAM,MAA0B,OAAO"}
|
package/llms.txt
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @eternl/big
|
|
2
2
|
|
|
3
|
-
>
|
|
3
|
+
> Single-file TypeScript port of big.js with bigint-aware definitions Visibility: public. License: BUSL-1.1.
|
|
4
4
|
|
|
5
5
|
## Docs
|
|
6
6
|
|
|
@@ -14,4 +14,5 @@
|
|
|
14
14
|
|
|
15
15
|
## Optional
|
|
16
16
|
|
|
17
|
+
- [`LICENSE`](./LICENSE)
|
|
17
18
|
- [`dist/`](./dist/)
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eternl/big",
|
|
3
|
-
"version": "0.10.
|
|
4
|
-
"description": "
|
|
5
|
-
"license": "
|
|
3
|
+
"version": "0.10.20",
|
|
4
|
+
"description": "Single-file TypeScript port of big.js with bigint-aware definitions",
|
|
5
|
+
"license": "BUSL-1.1",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"sideEffects": false,
|
|
8
8
|
"main": "./dist/index.cjs",
|
|
@@ -17,11 +17,12 @@
|
|
|
17
17
|
},
|
|
18
18
|
"files": [
|
|
19
19
|
"dist",
|
|
20
|
+
"LICENSE",
|
|
20
21
|
"THIRD_PARTY_NOTICES.md",
|
|
21
22
|
"llms.txt"
|
|
22
23
|
],
|
|
23
24
|
"publishConfig": {
|
|
24
|
-
"access": "
|
|
25
|
+
"access": "public"
|
|
25
26
|
},
|
|
26
27
|
"scripts": {
|
|
27
28
|
"build": "tsdown",
|