Regina Calculation Engine
|
Provides miscellaneous number theory routines. More...
Namespaces | |
regina | |
Contains the entire Regina calculation engine. | |
Functions | |
REGINA_API long | regina::reducedMod (long k, long modBase) |
Reduces k modulo modBase to give the smallest possible absolute value. More... | |
REGINA_API long | regina::gcd (long a, long b) |
Calculates the greatest common divisor of two signed integers. More... | |
REGINA_API long | regina::gcdWithCoeffs (long a, long b, long &u, long &v) |
Calculates the greatest common divisor of two given integers and finds the smallest coefficients with which these integers combine to give their gcd. More... | |
REGINA_API long | regina::lcm (long a, long b) |
Calculates the lowest common multiple of two signed integers. More... | |
REGINA_API unsigned long | regina::modularInverse (unsigned long n, unsigned long k) |
Calculates the multiplicative inverse of one integer modulo another. More... | |
REGINA_API void | regina::factorise (unsigned long n, std::list< unsigned long > &factors) |
Calculates the prime factorisation of the given integer. More... | |
REGINA_API void | regina::primesUpTo (const NLargeInteger &roof, std::list< NLargeInteger > &primes) |
Determines all primes up to and including the given upper bound. More... | |
Provides miscellaneous number theory routines.