C++ Utilities  4.7.0
Common C++ classes and routines used by my applications such as argument parser, IO and conversion utilities
Namespaces | Functions
math.cpp File Reference
#include "./math.h"
#include <cassert>
#include <cstdlib>
Include dependency graph for math.cpp:

Go to the source code of this file.

Namespaces

 MathUtilities
 Contains various mathematical functions.
 

Functions

uint64 powerModulo (const uint64 base, const uint64 exponent, const uint64 module)
 Computes base power exponent modulo module. More...
 
int64 inverseModulo (int64 number, int64 module)
 Computes the inverse of number modulo module. More...
 
uint64 orderModulo (const uint64 number, const uint64 module)
 Computes the order of number modulo module. More...
 

Function Documentation

◆ inverseModulo()

int64 inverseModulo ( int64  number,
int64  module 
)

Computes the inverse of number modulo module.

Definition at line 67 of file math.cpp.

◆ orderModulo()

uint64 orderModulo ( const uint64  number,
const uint64  module 
)

Computes the order of number modulo module.

Definition at line 84 of file math.cpp.

◆ powerModulo()

uint64 powerModulo ( const uint64  base,
const uint64  exponent,
const uint64  module 
)

Computes base power exponent modulo module.

Definition at line 49 of file math.cpp.