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.

Features

  • Integers and decimals
  • Simple API but full-featured
  • 8 KB minified and gzipped
  • No dependencies
  • Wide platform compatibility: uses JavaScript 1.5 (ECMAScript 3) features only
  • Comprehensive documentation and test set

Project Samples

Project Activity

See All Activity >

License

MIT License

Follow bignumber.js

bignumber.js Web Site

Other Useful Business Software
Deliver secure remote access with OpenVPN. Icon
Deliver secure remote access with OpenVPN.

Trusted by nearly 20,000 customers worldwide, and all major cloud providers.

OpenVPN's products provide scalable, secure remote access — giving complete freedom to your employees to work outside the office while securely accessing SaaS, the internet, and company resources.
Get started — no credit card required.
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of bignumber.js!

Additional Project Details

Programming Language

JavaScript

Related Categories

JavaScript Mathematics Software, JavaScript Libraries

Registered

2021-11-29