#include <cstdlib>
#include <iostream>
Go to the source code of this file.
Namespaces | |
namespace | numtheory |
Functions | |
unsigned int | numtheory::normalized_signed_mod (const signed int x, const int m) |
unsigned int | numtheory::reciprocal (register const unsigned int m) |
unsigned int | numtheory::normalized_signed_mod (register const signed int x, register const int m, const int &recip_m) |
unsigned int | numtheory::mulmod (const unsigned int a, const unsigned int b, const unsigned int m) |
unsigned int | numtheory::squaremod (const unsigned int a, const unsigned int m) |
unsigned int | numtheory::normalized_signed_mulmod (signed int x1, signed int x2, const int m) |
unsigned int | numtheory::powmod (register unsigned int a, register unsigned int pow, const unsigned int m) |
bool | numtheory::strong_probab_prime (const unsigned int p, const unsigned int base) |
bool | numtheory::probab_prime (const unsigned int p) |
bool | numtheory::is_prime (register const int p) |
unsigned int | numtheory::gcd (register unsigned int a, register unsigned int b) |
unsigned short int | numtheory::gcd (register unsigned short int a, register unsigned short int b) |
unsigned int | numtheory::oddgcd (register unsigned int a, register unsigned int b) |
bool | numtheory::coprime (register unsigned int a, register unsigned int b) |
signed int | numtheory::jacobi (int a, unsigned int b) |
signed int | numtheory::legendre (signed int a, const unsigned int p) |
unsigned int | numtheory::invmod (const unsigned int x, const unsigned int m) |
unsigned int | numtheory::bininvmod (register unsigned int x, register const unsigned int m) |
unsigned int | numtheory::montgominvmod (register unsigned int x, unsigned int m) |
unsigned int | numtheory::fastinvmod (const unsigned int x, const unsigned int m) |
unsigned int | numtheory::fastinvmod_23bit (const unsigned int x, const unsigned int m) |
unsigned int | numtheory::sqrtmod (const unsigned int Radikant, const unsigned int Primzahl) |
The functions implemented (or declared) in this file provide support for fast modulo operations (multiplication, exponentiation, computation of the modular inverse, quadratic residues) and some integer functions (greatest common divisor, prime numbers).
Most of these functions contain also optimized assembler code for Intel Pentium and AMD Athlon processors.
Definition in file modulo.H.