Skip to content

adamheins/biginteger.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

biginteger.js

What is it?

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.

Example

The Primality Checker is a small but useful web-app that shows off the power of biginteger.js's primality checking.

References

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.

License

MIT license. See the included LICENSE file for the full terms.

About

An arbitrary-size integer library for javascript. Implements all basic arithmetic functions including addition, subtraction, multiplication, division, modulo, and exponentiation.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors