This commit is contained in:
Michael Mclaughlin 2016-11-09 22:51:43 +00:00
parent 4a80c36372
commit b2f963c331
9 changed files with 51 additions and 44 deletions

View File

@ -1,6 +1,7 @@
language: node_js
node_js:
- "node"
- "7"
- "6"
- "5"
- "4"

View File

@ -1,4 +1,4 @@
The MIT Expat Licence.
The MIT Licence.
Copyright (c) 2012 Michael Mclaughlin

View File

@ -128,7 +128,6 @@ The other arithmetic operations always give the exact result.
```javascript
BigNumber.config({ DECIMAL_PLACES: 10, ROUNDING_MODE: 4 })
// Alternatively, BigNumber.config( 10, 4 );
x = new BigNumber(2);
y = new BigNumber(3);
@ -244,63 +243,69 @@ See [LICENCE](https://github.com/MikeMcl/bignumber.js/blob/master/LICENCE).
## Change Log
####2.4.0
#### 3.0.0
* 09/11/2016
* Remove `require('crypto')` - leave it to the user.
* Add `BigNumber.set` as `BigNumber.config` alias.
* Default `POW_PRECISION` to `0`.
#### 2.4.0
* 14/07/2016
* #97 Add exports to support ES6 imports.
####2.3.0
#### 2.3.0
* 07/03/2016
* #86 Add modulus parameter to `toPower`.
####2.2.0
#### 2.2.0
* 03/03/2016
* #91 Permit larger JS integers.
####2.1.4
#### 2.1.4
* 15/12/2015
* Correct UMD.
####2.1.3
#### 2.1.3
* 13/12/2015
* Refactor re global object and crypto availability when bundling.
####2.1.2
#### 2.1.2
* 10/12/2015
* Bugfix: `window.crypto` not assigned to `crypto`.
####2.1.1
#### 2.1.1
* 09/12/2015
* Prevent code bundler from adding `crypto` shim.
####2.1.0
#### 2.1.0
* 26/10/2015
* For `valueOf` and `toJSON`, include the minus sign with negative zero.
####2.0.8
#### 2.0.8
* 2/10/2015
* Internal round function bugfix.
####2.0.6
#### 2.0.6
* 31/03/2015
* Add bower.json. Tweak division after in-depth review.
####2.0.5
#### 2.0.5
* 25/03/2015
* Amend README. Remove bitcoin address.
####2.0.4
#### 2.0.4
* 25/03/2015
* Critical bugfix #58: division.
####2.0.3
#### 2.0.3
* 18/02/2015
* Amend README. Add source map.
####2.0.2
#### 2.0.2
* 18/02/2015
* Correct links.
####2.0.1
#### 2.0.1
* 18/02/2015
* Add `max`, `min`, `precision`, `random`, `shift`, `toDigits` and `truncated` methods.
* Add the short-forms: `add`, `mul`, `sd`, `sub` and `trunc`.
@ -313,7 +318,7 @@ See [LICENCE](https://github.com/MikeMcl/bignumber.js/blob/master/LICENCE).
* Improve code quality.
* Improve documentation.
####2.0.0
#### 2.0.0
* 29/12/2014
* Add `dividedToIntegerBy`, `isInteger` and `toFormat` methods.
* Remove the following short-forms: `isF`, `isZ`, `toE`, `toF`, `toFr`, `toN`, `toP`, `toS`.
@ -321,42 +326,42 @@ See [LICENCE](https://github.com/MikeMcl/bignumber.js/blob/master/LICENCE).
* Add fast path for integers to BigNumber constructor.
* Incorporate the library into the online documentation.
####1.5.0
#### 1.5.0
* 13/11/2014
* Add `toJSON` and `decimalPlaces` methods.
####1.4.1
#### 1.4.1
* 08/06/2014
* Amend README.
####1.4.0
#### 1.4.0
* 08/05/2014
* Add `toNumber`.
####1.3.0
#### 1.3.0
* 08/11/2013
* Ensure correct rounding of `sqrt` in all, rather than almost all, cases.
* Maximum radix to 64.
####1.2.1
#### 1.2.1
* 17/10/2013
* Sign of zero when x < 0 and x + (-x) = 0.
####1.2.0
#### 1.2.0
* 19/9/2013
* Throw Error objects for stack.
####1.1.1
#### 1.1.1
* 22/8/2013
* Show original value in constructor error message.
####1.1.0
#### 1.1.0
* 1/8/2013
* Allow numbers with trailing radix point.
####1.0.1
#### 1.0.1
* Bugfix: error messages with incorrect method name
####1.0.0
#### 1.0.0
* 8/11/2012
* Initial release

View File

@ -1,10 +1,10 @@
/*! bignumber.js v2.4.0 https://github.com/MikeMcl/bignumber.js/LICENCE */
/*! bignumber.js v3.0.0 https://github.com/MikeMcl/bignumber.js/LICENCE */
;(function (globalObj) {
'use strict';
/*
bignumber.js v2.4.0
bignumber.js v3.0.0
A JavaScript library for arbitrary-precision arithmetic.
https://github.com/MikeMcl/bignumber.js
Copyright (c) 2016 Michael Mclaughlin <M8ch88l@gmail.com>

File diff suppressed because one or more lines are too long

4
bignumber.min.js vendored

File diff suppressed because one or more lines are too long

View File

@ -1,7 +1,7 @@
{
"name": "bignumber.js",
"main": "bignumber.js",
"version": "2.4.0",
"version": "3.0.0",
"homepage": "https://github.com/MikeMcl/bignumber.js",
"authors": [
"Michael Mclaughlin <M8ch88l@gmail.com>"

View File

@ -326,12 +326,12 @@ BN.config({ DECIMAL_PLACES: 9 })</pre>
<h5 id="config">config<code class='inset'>config([obj]) <i>&rArr; object</i></code></h5>
<h5 id="config">config<code class='inset'>set([obj]) <i>&rArr; object</i></code></h5>
<p>
<code>obj</code>: <i>object</i>: an object that contains some or all of the following
properties.
</p>
<p>Configures the 'global' settings for this particular BigNumber constructor.</p>
<p>Configures the settings for this particular BigNumber constructor.</p>
<p><i>Note: the configuration can also be supplied as an argument list, see below.</i></p>
<dl class='inset'>
<dt id="decimal-places"><code><b>DECIMAL_PLACES</b></code></dt>
@ -346,6 +346,7 @@ BN.config({ DECIMAL_PLACES: 9 })</pre>
</dd>
<dd>
<pre>BigNumber.config({ DECIMAL_PLACES: 5 })
BigNumber.set({ DECIMAL_PLACES: 5 }) // equivalent
BigNumber.config(5) // equivalent</pre>
</dd>
@ -587,7 +588,7 @@ BigNumber.config({ MODULO_MODE: 9 }) // equivalent</pre>
<dt id="pow-precision"><code><b>POW_PRECISION</b></code></dt>
<dd>
<i>number</i>: integer, <code>0</code> to <code>1e+9</code> inclusive.<br />
Default value: <code>100</code>
Default value: <code>0</code>
</dd>
<dd>
The <i>maximum</i> number of significant digits of the result of the power operation
@ -1633,13 +1634,13 @@ z = new BigNumber(-0)
As the number of digits of the result of the power operation can grow so large so quickly,
e.g. 123.456<sup>10000</sup> has over <code>50000</code> digits, the number of significant
digits calculated is limited to the value of the
<a href='#pow-precision'><code>POW_PRECISION</code></a> setting (default value:
<code>100</code>) unless a modulus <code>m</code> is specified.
<a href='#pow-precision'><code>POW_PRECISION</code></a> setting (unless a modulus
<code>m</code> is specified).
</p>
<p>
Set <a href='#pow-precision'><code>POW_PRECISION</code></a> to <code>0</code> for an
unlimited number of significant digits to be calculated (this will cause the method to slow
dramatically for larger exponents).
By default <a href='#pow-precision'><code>POW_PRECISION</code></a> is set to <code>0</code>.
This means that an unlimited number of significant digits will be calculated, and that the
method's performance will decrease dramatically for larger exponents.
</p>
<p>
Negative exponents will be calculated to the number of decimal places specified by

View File

@ -1,7 +1,7 @@
{
"name": "bignumber.js",
"description": "A library for arbitrary-precision decimal and non-decimal arithmetic",
"version": "2.4.0",
"version": "3.0.0",
"keywords": [
"arbitrary",
"precision",
@ -31,6 +31,6 @@
"license": "MIT",
"scripts": {
"test": "node ./test/every-test.js",
"build": "uglifyjs bignumber.js --source-map bignumber.js.map -c -m -o bignumber.min.js --preamble \"/* bignumber.js v2.4.0 https://github.com/MikeMcl/bignumber.js/LICENCE */\""
"build": "uglifyjs bignumber.js --source-map bignumber.js.map -c -m -o bignumber.min.js --preamble \"/* bignumber.js v3.0.0 https://github.com/MikeMcl/bignumber.js/LICENCE */\""
}
}