Regina 7.0 Calculation Engine
Namespaces | Functions
numbertheory.h File Reference

Provides miscellaneous number theory routines. More...

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

Namespaces

namespace  regina
 Contains the entire Regina calculation engine.
 

Functions

long regina::reducedMod (long k, long modBase)
 Reduces k modulo modBase to give the smallest possible absolute value. More...
 
long regina::gcd (long a, long b)
 Calculates the greatest common divisor of two signed integers. More...
 
std::tuple< long, long, long > regina::gcdWithCoeffs (long a, long b)
 Calculates the greatest common divisor of two given integers and finds the smallest coefficients with which these integers combine to give their gcd. More...
 
long regina::gcdWithCoeffs (long a, long b, long &u, long &v)
 Deprecated function that calculates the greatest common divisor of two given integers and finds the smallest coefficients with which these integers combine to give their gcd. More...
 
long regina::lcm (long a, long b)
 Calculates the lowest common multiple of two signed integers. More...
 
unsigned long regina::modularInverse (unsigned long n, unsigned long k)
 Calculates the multiplicative inverse of one integer modulo another. More...
 

Detailed Description

Provides miscellaneous number theory routines.


Copyright © 1999-2021, 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@maths.uq.edu.au).