mathjs
Version:
Math.js is an extensive math library for JavaScript and Node.js. It features a flexible expression parser with support for symbolic computation, comes with a large set of built-in functions and constants, and offers an integrated solution to work with dif
48 lines (30 loc) • 1.11 kB
Markdown
<!-- Note: This file is automatically generated from source code comments. Changes made in this file will be overridden. -->
Create a BigNumber, which can store numbers with arbitrary precision.
When a matrix is provided, all elements will be converted to BigNumber.
```js
math.bignumber(x)
```
Parameter | Type | Description
--------- | ---- | -----------
`value` | number &
Type | Description
---- | -----------
BigNumber | The created bignumber
```js
0.1 + 0.2 // returns number 0.30000000000000004
math.bignumber(0.1) + math.bignumber(0.2) // returns BigNumber 0.3
7.2e500 // returns number Infinity
math.bignumber('7.2e500') // returns BigNumber 7.2e500
```
[ ](boolean.md),
[ ](complex.md),
[ ](index.md),
[ ](matrix.md),
[ ](string.md),
[ ](unit.md)