Regina Calculation Engine
Namespaces | Functions
numbertheory.h File Reference

Provides miscellaneous number theory routines. More...

#include <list>
#include "regina-core.h"
#include "maths/ninteger.h"

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...
 

Detailed Description

Provides miscellaneous number theory routines.


Copyright © 1999-2014, The Regina development team
This software is released under the GNU General Public License, with some additional permissions; see the source code for details.
For further information, or to submit a bug or other problem, please contact Ben Burton (bab@debian.org).