big.esm 1.1.0 → 1.1.1
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/CHANGELOG.md +7 -0
- package/README.md +10 -8
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## [1.1.1](https://github.com/dschewchenko/big.esm/compare/v1.1.0...v1.1.1) (2023-05-14)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* readme update and ci update ([d43d486](https://github.com/dschewchenko/big.esm/commit/d43d4869a468d7092674778c97ad888cd4600af8))
|
|
7
|
+
|
|
1
8
|
# [1.1.0](https://github.com/dschewchenko/big.esm/compare/v1.0.2...v1.1.0) (2023-05-14)
|
|
2
9
|
|
|
3
10
|
|
package/README.md
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
# big.esm
|
|
2
2
|
|
|
3
|
+
[](https://www.npmjs.com/package/big.esm)
|
|
4
|
+
[](https://www.npmjs.com/package/big.esm)
|
|
5
|
+
|
|
3
6
|
Library for working with large numbers and fractions using `BigInt`.
|
|
4
7
|
It provides advanced functionality for performing arithmetic operations with precision and decimal handling.
|
|
5
8
|
[Documentation](https://dschewchenko.github.io/big.esm/).
|
|
@@ -60,10 +63,9 @@ Creates a new `Big` instance from a string, number or `BigInt`. Optionally, you
|
|
|
60
63
|
|
|
61
64
|
### Utilities
|
|
62
65
|
|
|
63
|
-
#### `createBig(value: string | number | bigint): Big`
|
|
66
|
+
#### `createBig(value: string | number | bigint, scale?: number | string): Big`
|
|
64
67
|
|
|
65
|
-
Alias for `new Big(value)`.
|
|
66
|
-
But it does not support the scale parameter and if the value is instance of `Big` it will be returned without changes.
|
|
68
|
+
Alias for `new Big(value, scale)`.
|
|
67
69
|
|
|
68
70
|
#### `cloneBig(a: Big): Big`
|
|
69
71
|
|
|
@@ -91,21 +93,21 @@ Subtracts two `Big` instances.
|
|
|
91
93
|
|
|
92
94
|
Multiplies two `Big` instances.
|
|
93
95
|
|
|
94
|
-
#### `divBig(a: Big, b: Big): Big`
|
|
96
|
+
#### `divBig(a: Big, b: Big, precision = 20, roundingMode = "half-up"): Big`
|
|
95
97
|
|
|
96
|
-
Divides two `Big` instances.
|
|
98
|
+
Divides two `Big` instances. The default precision is 20. The default rounding mode is "half-up".
|
|
97
99
|
|
|
98
100
|
#### `modBig(a: Big, b: Big): Big`
|
|
99
101
|
|
|
100
102
|
Calculates the remainder of dividing two `Big` instances.
|
|
101
103
|
|
|
102
|
-
#### `powBig(a: Big,
|
|
104
|
+
#### `powBig(a: Big, exp: number): Big`
|
|
103
105
|
|
|
104
106
|
Raises `a` to the power of `b`.
|
|
105
107
|
|
|
106
|
-
#### `sqrtBig(a: Big): Big`
|
|
108
|
+
#### `sqrtBig(a: Big, root = 2, precision = 20): Big`
|
|
107
109
|
|
|
108
|
-
Calculates the
|
|
110
|
+
Calculates the root of `a`. The default root is 2, which means the square root. The default precision is 20.
|
|
109
111
|
|
|
110
112
|
#### `absBig(a: Big): Big`
|
|
111
113
|
|