biginteger.js is a javascript library that implements arbitrarily-sized integers. Methods are available for:
- addition
- subtraction
- multiplication
- division
- modulo
- exponentiation
- modular exponentiation
- random numbers
- primality checking
In addition, many others are available for equality testing, conversion between bases, finding the max and min, and more. Read the source code to view the documentation for every method.
The Primality Checker is a small but useful web-app that shows off the power of biginteger.js's primality checking.
The algorithms for long division and modulo were adapted from Multiple-Length Division Revisited: A Tour of the Minefield by Per Brinch Hansen. An efficient modular exponentiation algorithm was taken from Large Prime Numbers by Jerry Shurman.
MIT license. See the included LICENSE file for the full terms.