Skip to content

Latest commit

 

History

51 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

inf.cpp

infinite integers in one C++ header with zero dependencies.


A high-efficiency, high-precision infinite-integer arithmetic library. Drop inf.hpp into any C++17 project.

#include "inf.hpp"

int main() {
    inf::integer a = "12345678901234567890";
    inf::integer b = 42;
    std::cout << a * b << "\n";
}

Algorithms

Schoolbook → Karatsuba → NTT → Schönhage–Strassen, Knuth Algorithm D, Lehmer GCD, Montgomery modexp, Baillie–PSW. Details: docs/algorithms.md. API: docs/api.md.

Layout

Path Role
inf.hpp The library
docs/ Algorithms and API
tests/ ./tests/build (Alpine image) or make -C tests unit / make -C tests rsa (RSA-OAEP Alice/Bob)

License

MIT — see LICENSE.

Acknowledgement

inf.cpp is neither affiliated nor does it fork the below-mentioned projects, but I acknowledge their precedence and influence:

About

infinite integers in one C++ header with zero dependencies.

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Sponsor this project

Packages

Used by

Contributors

Languages