v1.0 with SW PWA enabled
This commit is contained in:
87
frontend/node_modules/decimal.js-light/CHANGELOG.md
generated
vendored
Normal file
87
frontend/node_modules/decimal.js-light/CHANGELOG.md
generated
vendored
Normal file
@ -0,0 +1,87 @@
|
||||
#### 2.5.1
|
||||
* 30/09/2020
|
||||
* Correct initial `sqrt` estimate.
|
||||
|
||||
#### 2.5.0
|
||||
* 16/10/2018
|
||||
* Add default export to *decimal.d.ts*.
|
||||
* Add `Symbol.for('nodejs.util.inspect.custom')` to *decimal.mjs*.
|
||||
|
||||
#### 2.4.1
|
||||
* 24/05/2018
|
||||
* Add `browser` field to *package.json*.
|
||||
|
||||
#### 2.4.0
|
||||
* 22/05/2018
|
||||
* Amend *.mjs* exports.
|
||||
* Remove extension from `main` field in *package.json*.
|
||||
|
||||
#### 2.3.1
|
||||
* 13/11/2017
|
||||
* Add constructor properties to typings.
|
||||
* Amend `LN10` section of *doc/API.html*.
|
||||
|
||||
#### 2.3.0
|
||||
* 26/09/2017
|
||||
* Add *bignumber.mjs*.
|
||||
|
||||
#### 2.2.5
|
||||
* 08/09/2017
|
||||
* #5 Fix import.
|
||||
|
||||
#### 2.2.4
|
||||
* 15/08/2017
|
||||
* Add TypeScript type declaration file, *decimal.d.ts*
|
||||
* Correct `toPositive` and `toNegative` examples
|
||||
|
||||
#### 2.2.3
|
||||
* 04/05/2017
|
||||
* Fix *README* badge
|
||||
|
||||
#### 2.2.2
|
||||
05/04/2017
|
||||
* `Decimal.default` to `Decimal['default']` IE8 issue
|
||||
|
||||
#### 2.2.1
|
||||
10/03/2017
|
||||
* Remove `tonum` from documentation
|
||||
|
||||
#### 2.2.0
|
||||
10/01/2017
|
||||
* Add `exponent` method
|
||||
|
||||
#### 2.0.2
|
||||
12/12/2016
|
||||
* npm publish
|
||||
|
||||
#### 2.0.1
|
||||
12/12/2016
|
||||
* Filename-casing issue
|
||||
|
||||
#### 2.0.0
|
||||
11/12/2016
|
||||
* Make `LN10` configurable at runtime
|
||||
* Reduce `LN10` default precision
|
||||
* Remove `ceil`, `floor`, `min`, `max` and `truncated`
|
||||
* Rename `divToInt` to `idiv`, `toSD` to `tosd`, `toDP` to `todp`, `isInt` to `isint`, `isNeg` to `isneg`, `isPos` to `ispos` and `round` to `toInteger`
|
||||
* Rename some test files
|
||||
* Add `set` as alias to `config`
|
||||
* Support ES6 import shims
|
||||
* Add to README
|
||||
|
||||
#### 1.0.4
|
||||
28/02/2016
|
||||
* Add to README
|
||||
|
||||
#### 1.0.3
|
||||
25/02/2016
|
||||
* Add to README
|
||||
|
||||
#### 1.0.2
|
||||
25/02/2016
|
||||
* Correct url
|
||||
* Amend .travis.yml as Node.js v0.6 doesn't include `process.hrtime` which is used in testing.
|
||||
|
||||
#### 1.0.0
|
||||
24/02/2016
|
||||
* Initial release
|
||||
23
frontend/node_modules/decimal.js-light/LICENCE.md
generated
vendored
Normal file
23
frontend/node_modules/decimal.js-light/LICENCE.md
generated
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
The MIT Expat Licence.
|
||||
|
||||
Copyright (c) 2020 Michael Mclaughlin
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
'Software'), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
92
frontend/node_modules/decimal.js-light/README.md
generated
vendored
Normal file
92
frontend/node_modules/decimal.js-light/README.md
generated
vendored
Normal file
@ -0,0 +1,92 @@
|
||||

|
||||
|
||||
The light version of [decimal.js](https://github.com/MikeMcl/decimal.js/), an arbitrary-precision Decimal type for JavaScript.
|
||||
|
||||
[](https://travis-ci.org/MikeMcl/decimal.js-light)
|
||||
|
||||
<br />
|
||||
|
||||
This library is the newest of the family of libraries: [bignumber.js](https://github.com/MikeMcl/bignumber.js/), [big.js](https://github.com/MikeMcl/big.js/), [decimal.js](https://github.com/MikeMcl/decimal.js/) and *decimal.js-light*.<br>
|
||||
The API is more or less a subset of the API of *decimal.js*.
|
||||
|
||||

|
||||
|
||||
__Differences between this library and *decimal.js*__
|
||||
|
||||
Size of *decimal.js* minified: 32.1 KB.<br>
|
||||
Size of *decimal.js-light* minified: 12.7 KB.
|
||||
|
||||
This library does not include `NaN`, `Infinity` or `-0` as legitimate values, or work with values in other bases.
|
||||
|
||||
Here, the `Decimal.round` property is just the default rounding mode for `toDecimalPlaces`, `toExponential`, `toFixed`, `toPrecision` and `toSignificantDigits`. It does not apply to arithmetic operations, which are simply truncated at the required precision.
|
||||
|
||||
If rounding is required just apply it explicitly, for example
|
||||
|
||||
```js
|
||||
x = new Decimal(2);
|
||||
y = new Decimal(3);
|
||||
|
||||
// decimal.js
|
||||
x.dividedBy(y).toString(); // '0.66666666666666666667'
|
||||
|
||||
// decimal.js-light
|
||||
x.dividedBy(y).toString(); // '0.66666666666666666666'
|
||||
x.dividedBy(y).toDecimalPlaces(19).toString(); // '0.6666666666666666667'
|
||||
```
|
||||
|
||||
The `naturalExponential`, `naturalLogarithm`, `logarithm`, and `toPower` methods in this library have by default a limited precision of around 100 digits. This limit can be increased at runtime using the `LN10` (the natural logarithm of ten) configuration object property.
|
||||
|
||||
For example, if a maximum precision of 400 digits is required for these operations use
|
||||
|
||||
```js
|
||||
// 415 digits
|
||||
Decimal.set({
|
||||
LN10: '2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286248633409525465082806756666287369098781689482907208325554680843799894826233198528393505308965377732628846163366222287698219886746543667474404243274365155048934314939391479619404400222105101714174800368808401264708068556774321622835522011480466371565912137345074785694768346361679210180644507064800027'
|
||||
});
|
||||
```
|
||||
|
||||
Also, in this library the `e` property of a Decimal is the base 10000000 exponent, not the base 10 exponent as in *decimal.js*.<br>
|
||||
Use the `exponent` method to get the base 10 exponent.
|
||||
|
||||
## Quickstart
|
||||
|
||||
Browser:
|
||||
|
||||
```html
|
||||
<script src='path/to/decimal.js-light'></script>
|
||||
```
|
||||
|
||||
Node package manager:
|
||||
|
||||
```shell
|
||||
$ npm install --save decimal.js-light
|
||||
```
|
||||
|
||||
```js
|
||||
// Node.js
|
||||
var Decimal = require('decimal.js-light');
|
||||
|
||||
// Adjust the global configuration if required (these are the defaults)
|
||||
Decimal.set({
|
||||
precision: 20,
|
||||
rounding: Decimal.ROUND_HALF_UP,
|
||||
toExpNeg: -7,
|
||||
toExpPos: 21
|
||||
});
|
||||
|
||||
phi = new Decimal('1.61803398874989484820458683436563811772030917980576');
|
||||
|
||||
phi.toFixed(10); // '1.6180339887'
|
||||
|
||||
phi.times(2).minus(1).toPower(2).plus('1e-19').equals(5); // true
|
||||
|
||||
```
|
||||
|
||||
See the [documentation](http://mikemcl.github.io/decimal.js-light) for further information.
|
||||
|
||||
[TypeScript](https://github.com/Microsoft/TypeScript) type declaration file contributed by [TANAKA Koichi](https://github.com/MugeSo).
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
570
frontend/node_modules/decimal.js-light/decimal.d.ts
generated
vendored
Normal file
570
frontend/node_modules/decimal.js-light/decimal.d.ts
generated
vendored
Normal file
@ -0,0 +1,570 @@
|
||||
export default Decimal;
|
||||
|
||||
export declare class Decimal {
|
||||
/**
|
||||
* The Decimal constructor and exported function.
|
||||
* Return a new Decimal instance.
|
||||
*
|
||||
* @param value {number|string|Decimal} A numeric value.
|
||||
*
|
||||
*/
|
||||
constructor(value: Numeric)
|
||||
|
||||
/**
|
||||
* Return a new Decimal whose value is the absolute value of this Decimal.
|
||||
*/
|
||||
absoluteValue(): Decimal;
|
||||
|
||||
/**
|
||||
* Return a new Decimal whose value is the absolute value of this Decimal.
|
||||
*/
|
||||
abs(): Decimal;
|
||||
|
||||
/**
|
||||
* Return
|
||||
* 1 if the value of this Decimal is greater than the value of `y`,
|
||||
* -1 if the value of this Decimal is less than the value of `y`,
|
||||
* 0 if they have the same value
|
||||
*/
|
||||
comparedTo(y: Numeric): 1|0|-1;
|
||||
|
||||
/**
|
||||
* Return
|
||||
* 1 if the value of this Decimal is greater than the value of `y`,
|
||||
* -1 if the value of this Decimal is less than the value of `y`,
|
||||
* 0 if they have the same value
|
||||
*/
|
||||
cmp(y: Numeric): 1|0|-1;
|
||||
|
||||
/**
|
||||
* Return the number of decimal places of the value of this Decimal.
|
||||
*/
|
||||
decimalPlaces(): number;
|
||||
|
||||
/**
|
||||
* Return the number of decimal places of the value of this Decimal.
|
||||
*/
|
||||
dp(): number;
|
||||
|
||||
/**
|
||||
* Return a new Decimal whose value is the value of this Decimal divided by `y`, truncated to
|
||||
* `precision` significant digits.
|
||||
*
|
||||
*/
|
||||
dividedBy(y: Numeric): Decimal;
|
||||
|
||||
/**
|
||||
* Return a new Decimal whose value is the value of this Decimal divided by `y`, truncated to
|
||||
* `precision` significant digits.
|
||||
*
|
||||
*/
|
||||
div(y: Numeric): Decimal;
|
||||
|
||||
/**
|
||||
* Return a new Decimal whose value is the integer part of dividing the value of this Decimal
|
||||
* by the value of `y`, truncated to `precision` significant digits.
|
||||
*
|
||||
*/
|
||||
dividedToIntegerBy(y: Numeric): Decimal;
|
||||
|
||||
/**
|
||||
* Return a new Decimal whose value is the integer part of dividing the value of this Decimal
|
||||
* by the value of `y`, truncated to `precision` significant digits.
|
||||
*
|
||||
*/
|
||||
idiv(y: Numeric): Decimal;
|
||||
|
||||
/**
|
||||
* Return true if the value of this Decimal is equal to the value of `y`, otherwise return false.
|
||||
*/
|
||||
equals(y: Numeric): boolean;
|
||||
|
||||
/**
|
||||
* Return true if the value of this Decimal is equal to the value of `y`, otherwise return false.
|
||||
*/
|
||||
eq(y: Numeric): boolean;
|
||||
|
||||
/**
|
||||
* Return the (base 10) exponent value of this Decimal (this.e is the base 10000000 exponent).
|
||||
*/
|
||||
exponent(): number;
|
||||
|
||||
/**
|
||||
* Return true if the value of this Decimal is greater than the value of `y`, otherwise return
|
||||
* false.
|
||||
*/
|
||||
greaterThan(y: Numeric): boolean;
|
||||
|
||||
/**
|
||||
* Return true if the value of this Decimal is greater than the value of `y`, otherwise return
|
||||
* false.
|
||||
*/
|
||||
gt(y: Numeric): boolean;
|
||||
|
||||
/**
|
||||
* Return true if the value of this Decimal is greater than or equal to the value of `y`,
|
||||
* otherwise return false.
|
||||
*
|
||||
*/
|
||||
greaterThanOrEqualTo(y: Numeric): boolean;
|
||||
|
||||
/**
|
||||
* Return true if the value of this Decimal is greater than or equal to the value of `y`,
|
||||
* otherwise return false.
|
||||
*
|
||||
*/
|
||||
gte(y: Numeric): boolean;
|
||||
|
||||
/**
|
||||
* Return true if the value of this Decimal is an integer, otherwise return false.
|
||||
*
|
||||
*/
|
||||
isInteger(): boolean;
|
||||
|
||||
/**
|
||||
* Return true if the value of this Decimal is an integer, otherwise return false.
|
||||
*
|
||||
*/
|
||||
isint(): boolean;
|
||||
|
||||
/**
|
||||
* Return true if the value of this Decimal is negative, otherwise return false.
|
||||
*
|
||||
*/
|
||||
isNegative(): boolean;
|
||||
|
||||
/**
|
||||
* Return true if the value of this Decimal is negative, otherwise return false.
|
||||
*
|
||||
*/
|
||||
isneg(): boolean;
|
||||
|
||||
/**
|
||||
* Return true if the value of this Decimal is positive, otherwise return false.
|
||||
*
|
||||
*/
|
||||
isPositive(): boolean;
|
||||
|
||||
/**
|
||||
* Return true if the value of this Decimal is positive, otherwise return false.
|
||||
*
|
||||
*/
|
||||
ispos(): boolean;
|
||||
|
||||
/**
|
||||
* Return true if the value of this Decimal is 0, otherwise return false.
|
||||
*
|
||||
*/
|
||||
isZero(): boolean;
|
||||
|
||||
/**
|
||||
* Return true if the value of this Decimal is less than `y`, otherwise return false.
|
||||
*
|
||||
*/
|
||||
lessThan(y: Numeric): boolean;
|
||||
|
||||
/**
|
||||
* Return true if the value of this Decimal is less than `y`, otherwise return false.
|
||||
*
|
||||
*/
|
||||
lt(y: Numeric): boolean;
|
||||
|
||||
/**
|
||||
* Return true if the value of this Decimal is less than or equal to `y`, otherwise return false.
|
||||
*
|
||||
*/
|
||||
lessThanOrEqualTo(y: Numeric): boolean;
|
||||
|
||||
/**
|
||||
* Return true if the value of this Decimal is less than or equal to `y`, otherwise return false.
|
||||
*
|
||||
*/
|
||||
lte(y: Numeric): boolean;
|
||||
|
||||
/**
|
||||
* Return the logarithm of the value of this Decimal to the specified base, truncated to
|
||||
* `precision` significant digits.
|
||||
*
|
||||
* If no base is specified, return log[10](x).
|
||||
*
|
||||
* log[base](x) = ln(x) / ln(base)
|
||||
*
|
||||
* The maximum error of the result is 1 ulp (unit in the last place).
|
||||
*
|
||||
*/
|
||||
logarithm(base?: Numeric): Decimal;
|
||||
|
||||
/**
|
||||
* Return the logarithm of the value of this Decimal to the specified base, truncated to
|
||||
* `precision` significant digits.
|
||||
*
|
||||
* If no base is specified, return log[10](x).
|
||||
*
|
||||
* log[base](x) = ln(x) / ln(base)
|
||||
*
|
||||
* The maximum error of the result is 1 ulp (unit in the last place).
|
||||
*
|
||||
*/
|
||||
log(base?: Numeric): Decimal;
|
||||
|
||||
/**
|
||||
* Return a new Decimal whose value is the value of this Decimal minus `y`, truncated to
|
||||
* `precision` significant digits.
|
||||
*
|
||||
*/
|
||||
minus(y: Numeric): Decimal;
|
||||
|
||||
/**
|
||||
* Return a new Decimal whose value is the value of this Decimal minus `y`, truncated to
|
||||
* `precision` significant digits.
|
||||
*
|
||||
*/
|
||||
sub(y: Numeric): Decimal;
|
||||
|
||||
/**
|
||||
* Return a new Decimal whose value is the value of this Decimal modulo `y`, truncated to
|
||||
* `precision` significant digits.
|
||||
*
|
||||
*/
|
||||
modulo(y: Numeric): Decimal;
|
||||
|
||||
/**
|
||||
* Return a new Decimal whose value is the value of this Decimal modulo `y`, truncated to
|
||||
* `precision` significant digits.
|
||||
*
|
||||
*/
|
||||
mod(y: Numeric): Decimal;
|
||||
|
||||
/**
|
||||
* Return a new Decimal whose value is the natural exponential of the value of this Decimal,
|
||||
* i.e. the base e raised to the power the value of this Decimal, truncated to `precision`
|
||||
* significant digits.
|
||||
*
|
||||
*/
|
||||
naturalExponetial(): Decimal;
|
||||
|
||||
/**
|
||||
* Return a new Decimal whose value is the natural exponential of the value of this Decimal,
|
||||
* i.e. the base e raised to the power the value of this Decimal, truncated to `precision`
|
||||
* significant digits.
|
||||
*
|
||||
*/
|
||||
exp(): Decimal;
|
||||
|
||||
/**
|
||||
* Return a new Decimal whose value is the natural logarithm of the value of this Decimal,
|
||||
* truncated to `precision` significant digits.
|
||||
*
|
||||
*/
|
||||
naturalLogarithm(): Decimal;
|
||||
|
||||
/**
|
||||
* Return a new Decimal whose value is the natural logarithm of the value of this Decimal,
|
||||
* truncated to `precision` significant digits.
|
||||
*
|
||||
*/
|
||||
ln(): Decimal;
|
||||
|
||||
/**
|
||||
* Return a new Decimal whose value is the value of this Decimal negated, i.e. as if multiplied by
|
||||
* -1.
|
||||
*
|
||||
*/
|
||||
negated(): Decimal;
|
||||
|
||||
/**
|
||||
* Return a new Decimal whose value is the value of this Decimal negated, i.e. as if multiplied by
|
||||
* -1.
|
||||
*
|
||||
*/
|
||||
neg(): Decimal;
|
||||
|
||||
/**
|
||||
* Return a new Decimal whose value is the value of this Decimal plus `y`, truncated to
|
||||
* `precision` significant digits.
|
||||
*
|
||||
*/
|
||||
plus(y: Numeric): Decimal;
|
||||
|
||||
/**
|
||||
* Return a new Decimal whose value is the value of this Decimal plus `y`, truncated to
|
||||
* `precision` significant digits.
|
||||
*
|
||||
*/
|
||||
add(y: Numeric): Decimal;
|
||||
|
||||
/**
|
||||
* Return the number of significant digits of the value of this Decimal.
|
||||
*
|
||||
* @param zeros {boolean|number} Whether to count integer-part trailing zeros: true, false, 1 or 0.
|
||||
*/
|
||||
precision(zeros: boolean|number): number;
|
||||
|
||||
/**
|
||||
* Return the number of significant digits of the value of this Decimal.
|
||||
*
|
||||
* @param zeros {boolean|number} Whether to count integer-part trailing zeros: true, false, 1 or 0.
|
||||
*/
|
||||
sd(zeros: boolean|number): number;
|
||||
|
||||
/**
|
||||
* Return a new Decimal whose value is the square root of this Decimal, truncated to `precision`
|
||||
* significant digits.
|
||||
*
|
||||
*/
|
||||
squareRoot(): Decimal;
|
||||
|
||||
/**
|
||||
* Return a new Decimal whose value is the square root of this Decimal, truncated to `precision`
|
||||
* significant digits.
|
||||
*
|
||||
*/
|
||||
sqrt(): Decimal;
|
||||
|
||||
/**
|
||||
* Return a new Decimal whose value is the value of this Decimal times `y`, truncated to
|
||||
* `precision` significant digits.
|
||||
*
|
||||
*/
|
||||
times(y: Numeric): Decimal;
|
||||
|
||||
/**
|
||||
* Return a new Decimal whose value is the value of this Decimal times `y`, truncated to
|
||||
* `precision` significant digits.
|
||||
*
|
||||
*/
|
||||
mul(y: Numeric): Decimal;
|
||||
|
||||
/**
|
||||
* Return a new Decimal whose value is the value of this Decimal rounded to a maximum of `dp`
|
||||
* decimal places using rounding mode `rm` or `rounding` if `rm` is omitted.
|
||||
*
|
||||
* If `dp` is omitted, return a new Decimal whose value is the value of this Decimal.
|
||||
*
|
||||
* @param dp {number} Decimal places. Integer, 0 to MAX_DIGITS inclusive.
|
||||
* @param rm {number} Rounding mode. Integer, 0 to 8 inclusive.
|
||||
*
|
||||
*/
|
||||
toDecimalPlaces(dp?: number, rm?: number): Decimal;
|
||||
|
||||
/**
|
||||
* Return a new Decimal whose value is the value of this Decimal rounded to a maximum of `dp`
|
||||
* decimal places using rounding mode `rm` or `rounding` if `rm` is omitted.
|
||||
*
|
||||
* If `dp` is omitted, return a new Decimal whose value is the value of this Decimal.
|
||||
*
|
||||
* @param dp {number} Decimal places. Integer, 0 to MAX_DIGITS inclusive.
|
||||
* @param rm {number} Rounding mode. Integer, 0 to 8 inclusive.
|
||||
*
|
||||
*/
|
||||
todp(dp?: number, rm?: number): Decimal;
|
||||
|
||||
/**
|
||||
* Return a string representing the value of this Decimal in exponential notation rounded to
|
||||
* `dp` fixed decimal places using rounding mode `rounding`.
|
||||
*
|
||||
* @param dp {number} Decimal places. Integer, 0 to MAX_DIGITS inclusive.
|
||||
* @param rm {number} Rounding mode. Integer, 0 to 8 inclusive.
|
||||
*
|
||||
*/
|
||||
toExponential(dp?: number, rm?: number): string;
|
||||
|
||||
/**
|
||||
* Return a string representing the value of this Decimal in normal (fixed-point) notation to
|
||||
* `dp` fixed decimal places and rounded using rounding mode `rm` or `rounding` if `rm` is
|
||||
* omitted.
|
||||
*
|
||||
* As with JavaScript numbers, (-0).toFixed(0) is '0', but e.g. (-0.00001).toFixed(0) is '-0'.
|
||||
*
|
||||
* @param dp {number} Decimal places. Integer, 0 to MAX_DIGITS inclusive.
|
||||
* @param rm {number} Rounding mode. Integer, 0 to 8 inclusive.
|
||||
*
|
||||
* (-0).toFixed(0) is '0', but (-0.1).toFixed(0) is '-0'.
|
||||
* (-0).toFixed(1) is '0.0', but (-0.01).toFixed(1) is '-0.0'.
|
||||
* (-0).toFixed(3) is '0.000'.
|
||||
* (-0.5).toFixed(0) is '-0'.
|
||||
*
|
||||
*/
|
||||
toFixed(dp?: number, rm?: number): string;
|
||||
|
||||
/**
|
||||
* Return a new Decimal whose value is the value of this Decimal rounded to a whole number using
|
||||
* rounding mode `rounding`.
|
||||
*
|
||||
*/
|
||||
toInteger(): Decimal;
|
||||
|
||||
/**
|
||||
* Return a new Decimal whose value is the value of this Decimal rounded to a whole number using
|
||||
* rounding mode `rounding`.
|
||||
*
|
||||
*/
|
||||
toint(): Decimal;
|
||||
|
||||
/**
|
||||
* Return the value of this Decimal converted to a number primitive.
|
||||
*
|
||||
*/
|
||||
toNumber(): number;
|
||||
|
||||
/**
|
||||
* Return a new Decimal whose value is the value of this Decimal raised to the power `y`,
|
||||
* truncated to `precision` significant digits.
|
||||
*
|
||||
* For non-integer or very large exponents pow(x, y) is calculated using
|
||||
*
|
||||
* x^y = exp(y*ln(x))
|
||||
*
|
||||
* The maximum error is 1 ulp (unit in last place).
|
||||
*
|
||||
* @param y {number|string|Decimal} The power to which to raise this Decimal.
|
||||
*
|
||||
*/
|
||||
toPower(y: Numeric): Decimal;
|
||||
|
||||
/**
|
||||
* Return a new Decimal whose value is the value of this Decimal raised to the power `y`,
|
||||
* truncated to `precision` significant digits.
|
||||
*
|
||||
* For non-integer or very large exponents pow(x, y) is calculated using
|
||||
*
|
||||
* x^y = exp(y*ln(x))
|
||||
*
|
||||
* The maximum error is 1 ulp (unit in last place).
|
||||
*
|
||||
* @param y {number|string|Decimal} The power to which to raise this Decimal.
|
||||
*
|
||||
*/
|
||||
pow(y: Numeric): Decimal;
|
||||
|
||||
/**
|
||||
* Return a string representing the value of this Decimal rounded to `sd` significant digits
|
||||
* using rounding mode `rounding`.
|
||||
*
|
||||
* Return exponential notation if `sd` is less than the number of digits necessary to represent
|
||||
* the integer part of the value in normal notation.
|
||||
*
|
||||
* @param sd {number} Significant digits. Integer, 1 to MAX_DIGITS inclusive.
|
||||
* @param rm {number} Rounding mode. Integer, 0 to 8 inclusive.
|
||||
*
|
||||
*/
|
||||
toPrecision(sd?: number, rm?: number): string;
|
||||
|
||||
/**
|
||||
* Return a new Decimal whose value is the value of this Decimal rounded to a maximum of `sd`
|
||||
* significant digits using rounding mode `rm`, or to `precision` and `rounding` respectively if
|
||||
* omitted.
|
||||
*
|
||||
* @param sd {number} Significant digits. Integer, 1 to MAX_DIGITS inclusive.
|
||||
* @param rm {number} Rounding mode. Integer, 0 to 8 inclusive.
|
||||
*
|
||||
*/
|
||||
toSignificantDigits(sd?: number, rm?: number): Decimal;
|
||||
|
||||
/**
|
||||
* Return a new Decimal whose value is the value of this Decimal rounded to a maximum of `sd`
|
||||
* significant digits using rounding mode `rm`, or to `precision` and `rounding` respectively if
|
||||
* omitted.
|
||||
*
|
||||
* @param sd {number} Significant digits. Integer, 1 to MAX_DIGITS inclusive.
|
||||
* @param rm {number} Rounding mode. Integer, 0 to 8 inclusive.
|
||||
*
|
||||
*/
|
||||
tosd(sd?: number, rm?: number): Decimal;
|
||||
|
||||
/**
|
||||
* Return a string representing the value of this Decimal.
|
||||
*
|
||||
* Return exponential notation if this Decimal has a positive exponent equal to or greater than
|
||||
* `toExpPos`, or a negative exponent equal to or less than `toExpNeg`.
|
||||
*
|
||||
*/
|
||||
toString(): string;
|
||||
|
||||
/**
|
||||
* Return a string representing the value of this Decimal.
|
||||
*
|
||||
* Return exponential notation if this Decimal has a positive exponent equal to or greater than
|
||||
* `toExpPos`, or a negative exponent equal to or less than `toExpNeg`.
|
||||
*
|
||||
*/
|
||||
valueOf(): string;
|
||||
|
||||
/**
|
||||
* Return a string representing the value of this Decimal.
|
||||
*
|
||||
* Return exponential notation if this Decimal has a positive exponent equal to or greater than
|
||||
* `toExpPos`, or a negative exponent equal to or less than `toExpNeg`.
|
||||
*
|
||||
*/
|
||||
val(): string;
|
||||
|
||||
/**
|
||||
* Return a string representing the value of this Decimal.
|
||||
*
|
||||
* Return exponential notation if this Decimal has a positive exponent equal to or greater than
|
||||
* `toExpPos`, or a negative exponent equal to or less than `toExpNeg`.
|
||||
*
|
||||
*/
|
||||
toJSON(): string;
|
||||
|
||||
/**
|
||||
* Create and return a Decimal constructor with the same configuration properties as this Decimal
|
||||
* constructor.
|
||||
*
|
||||
* @param config? Config
|
||||
*/
|
||||
static clone(config?: Config): typeof Decimal;
|
||||
|
||||
/**
|
||||
* Configure global settings for a Decimal constructor.
|
||||
*/
|
||||
static config(config: Config): Decimal;
|
||||
|
||||
/**
|
||||
* Configure global settings for a Decimal constructor.
|
||||
*/
|
||||
static set(config: Config): Decimal;
|
||||
|
||||
// The maximum number of significant digits of the result of a calculation or base conversion.
|
||||
// E.g. `Decimal.config({ precision: 20 });`
|
||||
static precision: number;
|
||||
|
||||
// The rounding mode used by default by `toInteger`, `toDecimalPlaces`, `toExponential`,
|
||||
// `toFixed`, `toPrecision` and `toSignificantDigits`.
|
||||
//
|
||||
// E.g.
|
||||
// `Decimal.rounding = 4;`
|
||||
// `Decimal.rounding = Decimal.ROUND_HALF_UP;`
|
||||
static rounding: number;
|
||||
static readonly ROUND_UP: number;
|
||||
static readonly ROUND_DOWN: number;
|
||||
static readonly ROUND_CEIL: number;
|
||||
static readonly ROUND_FLOOR: number;
|
||||
static readonly ROUND_HALF_UP: number;
|
||||
static readonly ROUND_HALF_DOWN: number;
|
||||
static readonly ROUND_HALF_EVEN: number;
|
||||
static readonly ROUND_HALF_CEIL: number;
|
||||
static readonly ROUND_HALF_FLOOR: number;
|
||||
|
||||
// The exponent value at and beneath which `toString` returns exponential notation.
|
||||
// JavaScript numbers: -7
|
||||
static toExpNeg: number; // 0 to -MAX_E
|
||||
|
||||
// The exponent value at and above which `toString` returns exponential notation.
|
||||
// JavaScript numbers: 21
|
||||
static toExpPos: number; // 0 to MAX_E
|
||||
|
||||
// The natural logarithm of 10.
|
||||
static LN10: Decimal;
|
||||
}
|
||||
|
||||
export interface Config {
|
||||
precision?: number;
|
||||
rounding?: number;
|
||||
toExpNeg?: number;
|
||||
toExpPos?: number;
|
||||
LN10?: Numeric;
|
||||
}
|
||||
|
||||
export type Numeric = string|number|Decimal;
|
||||
2014
frontend/node_modules/decimal.js-light/decimal.js
generated
vendored
Normal file
2014
frontend/node_modules/decimal.js-light/decimal.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
3
frontend/node_modules/decimal.js-light/decimal.min.js
generated
vendored
Normal file
3
frontend/node_modules/decimal.js-light/decimal.min.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
1985
frontend/node_modules/decimal.js-light/decimal.mjs
generated
vendored
Normal file
1985
frontend/node_modules/decimal.js-light/decimal.mjs
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1312
frontend/node_modules/decimal.js-light/doc/API.html
generated
vendored
Normal file
1312
frontend/node_modules/decimal.js-light/doc/API.html
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1
frontend/node_modules/decimal.js-light/doc/decimal.js.map
generated
vendored
Normal file
1
frontend/node_modules/decimal.js-light/doc/decimal.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
36
frontend/node_modules/decimal.js-light/package.json
generated
vendored
Normal file
36
frontend/node_modules/decimal.js-light/package.json
generated
vendored
Normal file
@ -0,0 +1,36 @@
|
||||
{
|
||||
"name": "decimal.js-light",
|
||||
"description": "An arbitrary-precision Decimal type for JavaScript.",
|
||||
"version": "2.5.1",
|
||||
"keywords": [
|
||||
"arbitrary",
|
||||
"precision",
|
||||
"arithmetic",
|
||||
"big",
|
||||
"number",
|
||||
"decimal",
|
||||
"float",
|
||||
"biginteger",
|
||||
"bigdecimal",
|
||||
"bignumber",
|
||||
"bigint",
|
||||
"bignum"
|
||||
],
|
||||
"repository" : {
|
||||
"type": "git",
|
||||
"url": "https://github.com/MikeMcl/decimal.js-light.git"
|
||||
},
|
||||
"main": "decimal",
|
||||
"module": "decimal.mjs",
|
||||
"browser": "decimal.js",
|
||||
"types": "decimal.d.ts",
|
||||
"author": {
|
||||
"name": "Michael Mclaughlin",
|
||||
"email": "M8ch88l@gmail.com"
|
||||
},
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"test": "node ./test/test.js",
|
||||
"build": "uglifyjs decimal.js --source-map doc/decimal.js.map -c -m -o decimal.min.js --preamble \"/* decimal.js-light v2.5.1 https://github.com/MikeMcl/decimal.js-light/LICENCE */\""
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user