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
All Things Performance and Partner Marketing, All in One Place Icon
All Things Performance and Partner Marketing, All in One Place

Track calls, leads, and clicks without the manual work

Automatically tie revenue back to campaigns, channels, publishers, and networks through marketing attribution. Spend less time juggling reports, and more time optimizing for growth by using a single operating solution for partner and performance marketing.
Learn More
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