Skip to content

lovesegfault/euler-function

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Arbitrary precision Euler's Totient in C++

This is a very fast implementation of Euler's Totient Function using C++, GMP, and Primesieve. Arbitrary precision functionality is still on the works, it's tricky to implement and buffer overflows are a constant nuisance . This drinks heavily from clarsen's design, but aims to improve it for the particular purpose of arbitrary precision.

Dependencies

Usage

Simply #include "totient.hpp" in your code.

TODO

  • Use GMP instead of cpp_int ✅
  • Better usage documentation 🕓
  • Clean up auxiliary test libraries ❌
  • Use Baillie-PSW for primality instead of Miller-Rabin 🕓
  • Generate primes using multithreading ❌
  • Re-write prime generator to use arbitrary precision ❌

✅ - Done, 🕓 - On the works, ❌ - To do

About

C++ arbitrary precision implementation of Euler's Totient Function

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published