bigmath

A library for handling arithmetic operations between integers, floats, `BigInt`s, and arbitrary precision decimals.

BSD-3-CLAUSE License

Downloads
23
Stars
1

@trezy/bigmath is a library for handling arithmetic operations between integers, floats, BigInts, and arbitrary precision decimals. This is valuable when you need to perform calculations on decimal values that are outside of JavaScript's safe integer range (Number.MAX_SAFE_INTEGER in most browsers) — especially when you need to be able to perform those calculations against mixed input types, i.e. BigInt(100) + 100.001.

For usage examples, check out our quick start guide.

Check out the full documentation at https://trezy.gitbook.io/bigmath.

⚠️ NOTE ⚠️

@trezy/bigmath is not to be confused with @ahdinosaur's bigmath library. @ahdinosaur's library has far more features, but is also much older.

Contributors ✨

Thanks goes to these wonderful people (emoji key):

This project follows the all-contributors specification. Contributions of any kind welcome! Check out our contributing docs for help getting started!

Package Rankings
Top 21.2% on Npmjs.org
Badges
Extracted from project README
Version Bundle size Downloads BSD-3-Clause License Test status Release status Code Coverage Maintainability PRs Welcome All Contributors Code of Conduct Watch on GitHub Star on GitHub Tweet