This commit is contained in:
Michael Mclaughlin 2013-08-21 23:54:28 +01:00
parent d0cf9a0d0d
commit 6771e89996
4 changed files with 11 additions and 6 deletions

View File

@ -53,7 +53,7 @@ To load with AMD loader libraries such as [requireJS](http://requirejs.org/):
If a commented-out value is in quotes it means `toString` has been called on the preceding expression.*
The library exports a single function: BigNumber, the constructor of BigNumber instances.
It accepts a value of type Number, String or BigNumber Object,
It accepts a value of type Number *(up to 15 significant digits only)*, String or BigNumber Object,
x = new BigNumber(123.4567)
y = BigNumber('123456.7e-3') // 'new' is optional
@ -94,10 +94,10 @@ Like JavaScript's Number type, there are `toExponential`, `toFixed` and `toPreci
x.toString(16) // "ff.8"
The maximum number of decimal places and the rounding mode for division, square root, base conversion, and negative power operations is set by a configuration object passed to the `config` method of the `BigNumber` constructor.
The maximum number of decimal places of, and the rounding mode applied to, the results of operations involving division (i.e. division, square root, base conversion, and negative power operations) is set by a configuration object passed to the `config` method of the `BigNumber` constructor.
The other arithmetic operations always give the exact result.
BigNumber.config({ DECIMAL_PLACES : 10, ROUNDING_MODE : 4 })
BigNumber.config({ DECIMAL_PLACES: 10, ROUNDING_MODE: 4 })
// Alternatively, BigNumber.config( 10, 4 );
x = new BigNumber(2);
@ -205,10 +205,15 @@ Thank you
## Licence
MIT.
See LICENCE.
## Change Log
####1.1.1
* 22/8/2013 Show original value in constructor error message.
####1.1.0
* 1/8/2013 Allow numbers with trailing radix point.

View File

@ -1,4 +1,4 @@
/* bignumber.js v1.1.0 https://github.com/MikeMcl/bignumber.js/LICENCE */
/* bignumber.js v1.1.1 https://github.com/MikeMcl/bignumber.js/LICENCE */
;(function ( global ) {
'use strict';

2
bignumber.min.js vendored

File diff suppressed because one or more lines are too long

View File

@ -1,7 +1,7 @@
{
"name": "bignumber.js",
"description": "A library for arbitrary-precision decimal and non-decimal arithmetic",
"version": "1.1.0",
"version": "1.1.1",
"keywords": [
"arbitrary",
"precision",