Download Area

Home > Mathematics

bignumber.js (free) Download Full | **UPDATE

- bignumber.js

bignumber.js (free) Download Full | **UPDATE

Published Date: 2024-04-14

bignumber.js Free Download

Bignumber.js is a free, high-precision JavaScript library for working with large numbers in the browser or on Node.js. It provides support for arbitrary-precision arithmetic operations, including addition, subtraction, multiplication, division, and exponentiation. Bignumber.js also includes a number of additional features, such as support for scientific notation, formatting, and parsing.

To get started with bignumber.js, simply include the library in your project. You can download the library from the official website or use a package manager such as npm or Bower. Once the library is included, you can start using it to perform arbitrary-precision arithmetic operations. For example, the following code snippet shows how to add two large numbers using bignumber.js:

``` const BigNumber = require('bignumber.js'); const a = new BigNumber('123456789012345678901234567890'); const b = new BigNumber('987654321098765432109876543210'); const c = a.plus(b); console.log(c); // 222222221111111111111111111100 ```


bignumber.js: bignumber.js is a JavaScript library for arbitrary-precision decimal and non-decimal arithmetic. Faster, smaller, and perhaps easier to use than JavaScript versions of Java's BigDecimal. Replicates the toExponential, toFixed, toPrecision and toString methods of JavaScript's Number type. Includes a toFraction and a correctly-rounded squareRoot method. Supports cryptographically secure pseudo-random number generation. Wide platform compatibility, uses JavaScript 1.5 (ECMAScript 3) features only. If a smaller and simpler library is required see big.js. It's less than half the size but only works with decimal numbers and only has half the methods. It also has fewer configuration options than this library, and does not allow NaN or Infinity. See also decimal.js, which among other things adds support for non-integer powers, and performs all operations to a specified number of significant digits.