#include "biginteger.h"
#include <Rinternals.h>
#include "stdio.h"
Compounds | |
struct | mpz_t_sentry |
Functions | |
bigmod | operator+ (const bigmod &lhs, const bigmod &rhs) |
bigmod | operator- (const bigmod &lhs, const bigmod &rhs) |
bigmod | operator * (const bigmod &lhs, const bigmod &rhs) |
bigmod | operator/ (const bigmod &lhs, const bigmod &rhs) |
bigmod | operator% (const bigmod &lhs, const bigmod &rhs) |
bigmod | pow (const bigmod &base, const bigmod &exp) |
bigmod | inv (const bigmod &x, const bigmod &m) |
bigmod | set_modulus (const bigmod &x, const bigmod &m) |
bigmod | gcd (const bigmod &lhs, const bigmod &rhs) |
bigmod | lcm (const bigmod &lhs, const bigmod &rhs) |
|
Return the greatest common divisor of both parameters For modulus description, see operator+(bigmod, bigmod) |
|
Return the modulo inverse to x mod m. (return = x^-1 % m) For modulus description, see operator+(bigmod, bigmod) |
|
Return the least common multiply of both parameter. For modulus description, see operator+(bigmod, bigmod) |
|
Multiply two bigmods. For modulus description, see operator+(bigmod, bigmod) |
|
Calculate the modulus (remainder) of two bigmods. The resulting bigmod will have set the intern modulus to the value of lhs, no matter what rhs.modulus or lhs.modulus was before, except if rhs and lhs has both no modulus set, in which case the resulting modulus will be unset too. |
|
Add two bigmods together. If only one has a modulus set, the result will have this modulus. If both bigmods disagree with the modulus, the result will not have a modulus set. If none modulus for either bigmod is set, the result will not have a modulus as well. |
|
Subtract two bigmods. For modulus description, see operator+(bigmod, bigmod) |
|
Divide two bigmods. For modulus description, see operator+(bigmod, bigmod) |
|
Return the power of "exp" to the base of "base" (return = base^exp). If both moduli are unset or unequal, this may EAT your memory alive, since then the infinite "pow" is used instead of the modulus "powm". You may not try to pow a value this way with an exponent that does not fit into a long value. For other modulus description, see operator+(bigmod, bigmod) |
|
Return a bigmod with value (x % m) and the intern modulus set to m. Intern modulus settings of x and m are ignored. Do not confuse this with operator%(bigmod, bigmod). |