plll
1.0
|
Contains the arithmetic backend of plll
.
More...
Namespaces | |
expressions | |
Expression templates. | |
Classes | |
struct | binary_operation |
Provides information on the result of a binary arithmetic operation. More... | |
class | HexStringContext |
An "arithmetic" context for hexadecimal (base 16) conversions to std::string s. More... | |
class | Integer |
Represents an arbitrary precision integer. More... | |
class | IntegerContext |
Represents an arithmetic context for arbitrary precision integer. More... | |
class | NInt |
Represents a native integer. More... | |
class | NIntContext |
Represents an arithmetic context for native integers. More... | |
class | OctalStringContext |
An "arithmetic" context for octal (base 8) conversions to std::string s. More... | |
class | RandomNumberGenerator |
Represents a random number generator. More... | |
class | Rational |
Represents a rational number as a quotient of two arbitrary precision integers. More... | |
class | RationalContext |
Represents an arithmetic context for rational numbers. More... | |
class | Real |
Represents an arbitrary precision floating point value. More... | |
class | RealContext |
Represents an arithmetic context for arbitrary precision floating point values. More... | |
class | StringContext |
An "arithmetic" context for conversions to std::string s. More... | |
struct | unary_operation |
Provides information on the result of an unary arithmetic operation. More... | |
Functions | |
RealContext & | getThreadRealContext () |
Retrieves a context for the current thread. The context is thread local and cannot be accessed by this method from other threads. | |
void | initArithmeticThreadAllocators () |
Initializes the local thread allocator for the current thread, and sets the GMP and MPFR allocators to the local thread allocator. More... | |
Operators. | |
expressions::Expression < IntegerContext, expressions::Wrapper < IntegerContext > , expressions::NegOp > | operator- (const Integer &a) |
Negates the integer. More... | |
expressions::Expression < IntegerContext, expressions::Wrapper < IntegerContext > , expressions::BitInvOp > | operator~ (const Integer &a) |
Bitwise negates the integer. More... | |
expressions::Expression < IntegerContext, std::pair < expressions::Wrapper < IntegerContext > , expressions::Wrapper < IntegerContext > >, expressions::AddOp > | operator+ (const Integer &a, const Integer &b) |
Adds the two integers and returns the result. More... | |
expressions::Expression < IntegerContext, std::pair < expressions::Wrapper < IntegerContext > , expressions::Wrapper < IntegerContext > >, expressions::SubOp > | operator- (const Integer &a, const Integer &b) |
Subtracts the second from the first integer and returns the result. More... | |
expressions::Expression < IntegerContext, std::pair < expressions::Wrapper < IntegerContext > , expressions::Wrapper < IntegerContext > >, expressions::MulOp > | operator* (const Integer &a, const Integer &b) |
Multiplies the two integers and returns the result. More... | |
expressions::Expression < IntegerContext, std::pair < expressions::Wrapper < IntegerContext > , expressions::Wrapper < IntegerContext > >, expressions::DivOp > | operator/ (const Integer &a, const Integer &b) |
Divides the first by the second integer and returns the result. More... | |
expressions::Expression < IntegerContext, std::pair < expressions::Wrapper < IntegerContext > , expressions::Wrapper < IntegerContext > >, expressions::ModOp > | operator% (const Integer &a, const Integer &b) |
Divides the first by the second integer and returns the remainder. More... | |
expressions::Expression < IntegerContext, std::pair < expressions::Wrapper < IntegerContext > , expressions::Wrapper < IntegerContext > >, expressions::AndOp > | operator& (const Integer &a, const Integer &b) |
Computes the bitwise and of the two integers and returns the result. More... | |
expressions::Expression < IntegerContext, std::pair < expressions::Wrapper < IntegerContext > , expressions::Wrapper < IntegerContext > >, expressions::OrOp > | operator| (const Integer &a, const Integer &b) |
Computes the bitwise or of the two integers and returns the result. More... | |
expressions::Expression < IntegerContext, std::pair < expressions::Wrapper < IntegerContext > , expressions::Wrapper < IntegerContext > >, expressions::XOROp > | operator^ (const Integer &a, const Integer &b) |
Computes the bitwise exclusive or of the two integers and returns the result. More... | |
expressions::Expression < IntegerContext, std::pair < expressions::Wrapper < IntegerContext > , expressions::Wrapper < IntegerContext > >, expressions::ShLOp > | operator<< (const Integer &a, const Integer &b) |
Computes the bitwise left shift of the first integer by the number of bits given by the second integer, and returns the result. More... | |
expressions::Expression < IntegerContext, std::pair < expressions::Wrapper < IntegerContext > , expressions::Wrapper < IntegerContext > >, expressions::ShROp > | operator>> (const Integer &a, const Integer &b) |
Computes the bitwise right shift of the first integer by the number of bits given by the second integer, and returns the result. More... | |
expressions::Expression < IntegerContext, expressions::Wrapper < IntegerContext > , expressions::ShiftCOp > | operator<< (const Integer &a, signed long b) |
Computes the bitwise left shift of the first integer by the number of bits given by the second integer, and returns the result. More... | |
expressions::Expression < IntegerContext, expressions::Wrapper < IntegerContext > , expressions::ShiftCOp > | operator>> (const Integer &a, signed long b) |
Computes the bitwise right shift of the first integer by the number of bits given by the second integer, and returns the result. More... | |
Integer | operator++ (Integer &cur, int) |
Increments the integer by one and returns the previous value. More... | |
Integer | operator-- (Integer &cur, int) |
Decrements the integer by one and returns the previous value. More... | |
Integer & | operator++ (Integer &cur) |
Increments the integer by one and returns the new value. More... | |
Integer & | operator-- (Integer &cur) |
Decreases the integer by one and returns the new value. More... | |
expressions::Expression < IntegerContext, expressions::Wrapper < IntegerContext > , expressions::AbsOp > | abs (const Integer &i) |
Computes and returns the absolute value of i . More... | |
expressions::Expression < IntegerContext, expressions::Wrapper < IntegerContext > , expressions::SquareOp > | square (const Integer &i) |
Computes and returns the square of i . More... | |
expressions::Expression < RealContext, expressions::Wrapper < RealContext > , expressions::NegOp > | operator- (const Real &a) |
Negates the floating point number. More... | |
expressions::Expression < RealContext, std::pair < expressions::Wrapper < RealContext > , expressions::Wrapper < RealContext > >, expressions::AddOp > | operator+ (const Real &a, const Real &b) |
Adds the two floating point numbers and returns the result. More... | |
expressions::Expression < RealContext, std::pair < expressions::Wrapper < RealContext > , expressions::Wrapper < RealContext > >, expressions::SubOp > | operator- (const Real &a, const Real &b) |
Subtracts the second from the first floating point number and returns the result. More... | |
expressions::Expression < RealContext, std::pair < expressions::Wrapper < RealContext > , expressions::Wrapper < RealContext > >, expressions::MulOp > | operator* (const Real &a, const Real &b) |
Multiplies the two floating point numbers and returns the result. More... | |
expressions::Expression < RealContext, std::pair < expressions::Wrapper < RealContext > , expressions::Wrapper < RealContext > >, expressions::DivOp > | operator/ (const Real &a, const Real &b) |
Divides the first by the second floating point number and returns the result. More... | |
expressions::Expression < RealContext, std::pair < expressions::Wrapper < RealContext > , expressions::Wrapper < RealContext > >, expressions::ModOp > | operator% (const Real &a, const Real &b) |
Divides the first by the second floating point number and returns the remainder. More... | |
expressions::Expression < RealContext, std::pair < expressions::Wrapper < RealContext > , expressions::Wrapper < RealContext > >, expressions::ShLOp > | operator<< (const Real &a, const Real &b) |
Multiplies a with 2 to the power of b and returns the result. More... | |
expressions::Expression < RealContext, std::pair < expressions::Wrapper < RealContext > , expressions::Wrapper < RealContext > >, expressions::ShROp > | operator>> (const Real &a, const Real &b) |
Divides a by 2 to the power of b and returns the result. More... | |
expressions::Expression < RealContext, expressions::Wrapper < RealContext > , expressions::ShiftCOp > | operator<< (const Real &a, signed long b) |
Multiplies a with 2 to the power of b and returns the result. More... | |
expressions::Expression < RealContext, expressions::Wrapper < RealContext > , expressions::ShiftCOp > | operator>> (const Real &a, signed long b) |
Divides a by 2 to the power of b and returns the result. More... | |
Real | operator++ (Real &cur, int) |
Increments cur by one and returns the previous value. More... | |
Real | operator-- (Real &cur, int) |
Decrements cur by one and returns the previous value. More... | |
Real & | operator++ (Real &cur) |
Increments cur by one and returns the new value. More... | |
Real & | operator-- (Real &cur) |
Decrements cur by one and returns the new value. More... | |
expressions::Expression < RealContext, expressions::Wrapper < RealContext > , expressions::AbsOp > | abs (const Real &i) |
Returns the absolute value of the given floating point number. More... | |
expressions::Expression < RealContext, expressions::Wrapper < RealContext > , expressions::SquareOp > | square (const Real &i) |
Returns the square of the given floating point number. More... | |
expressions::Expression < RealContext, expressions::Wrapper < RealContext > , expressions::AbsOp_Context > | abs (const Real &i, const RealContext &rc) |
Returns the absolute value of the given floating point number. More... | |
expressions::Expression < RealContext, expressions::Wrapper < RealContext > , expressions::SquareOp_Context > | square (const Real &i, const RealContext &rc) |
Returns the square of the given floating point number. More... | |
template<typename Type > | |
NInt< Type > | operator- (const NInt< Type > &a) PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE |
Negates the integer. More... | |
template<typename Type > | |
NInt< Type > | operator+ (const NInt< Type > &a, const NInt< Type > &b) PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE |
Adds the two integers and returns the result. More... | |
template<typename Type > | |
NInt< Type > | operator- (const NInt< Type > &a, const NInt< Type > &b) PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE |
Subtracts the second from the first integer and returns the result. More... | |
template<typename Type > | |
NInt< Type > | operator* (const NInt< Type > &a, const NInt< Type > &b) PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE |
Multiplies the two integers and returns the result. More... | |
template<typename Type > | |
NInt< Type > | operator/ (const NInt< Type > &a, const NInt< Type > &b) PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE |
Divides the first by the second integer and returns the result. More... | |
template<typename Type > | |
NInt< Type > | operator% (const NInt< Type > &a, const NInt< Type > &b) PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE |
Divides the first by the second integer and returns the remainder. More... | |
template<typename Type > | |
NInt< Type > | operator<< (const NInt< Type > &a, long b) PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE |
Computes the bitwise left shift of the first integer by the number of bits given by the second integer, and returns the result. More... | |
template<typename Type > | |
NInt< Type > | operator>> (const NInt< Type > &a, long b) PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE |
Computes the bitwise right shift of the first integer by the number of bits given by the second integer, and returns the result. More... | |
template<typename Type > | |
NInt< Type > | operator<< (const NInt< Type > &a, const NInt< Type > &b) PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE |
Computes the bitwise left shift of the first integer by the number of bits given by the second integer, and returns the result. More... | |
template<typename Type > | |
NInt< Type > | operator>> (const NInt< Type > &a, const NInt< Type > &b) PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE |
Computes the bitwise right shift of the first integer by the number of bits given by the second integer, and returns the result. More... | |
template<typename Type > | |
NInt< Type > | operator++ (NInt< Type > &cur, int) PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE |
Increments the integer by one and returns the previous value. More... | |
template<typename Type > | |
NInt< Type > | operator-- (NInt< Type > &cur, int) PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE |
Decrements the integer by one and returns the previous value. More... | |
template<typename Type > | |
NInt< Type > & | operator++ (NInt< Type > &cur) PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE |
Increments the integer by one and returns the new value. More... | |
template<typename Type > | |
NInt< Type > & | operator-- (NInt< Type > &cur) PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE |
Decreases the integer by one and returns the new value. More... | |
template<typename Type > | |
NInt< Type > | abs (const NInt< Type > &i) PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE |
Computes and returns the absolute value of i . More... | |
template<typename Type > | |
NInt< Type > | square (const NInt< Type > &i) PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE |
Computes and returns the square of i . More... | |
Rational | operator++ (Rational &cur, int) |
Increments this rational number by one and returns the previous value. More... | |
Rational | operator-- (Rational &cur, int) |
Decrements this rational number by one and returns the previous value. More... | |
Rational & | operator++ (Rational &cur) |
Increments this rational number by one and returns the new value. More... | |
Rational & | operator-- (Rational &cur) |
Decrements this rational number by one and returns the new value. More... | |
expressions::Expression < RationalContext, expressions::Wrapper < RationalContext > , expressions::NegOp > | operator- (const Rational &a) |
Negates this rational number. More... | |
expressions::Expression < RationalContext, std::pair < expressions::Wrapper < RationalContext > , expressions::Wrapper < RationalContext > >, expressions::AddOp > | operator+ (const Rational &a, const Rational &b) |
Adds the argument to this rational number and returns the result. More... | |
expressions::Expression < RationalContext, std::pair < expressions::Wrapper < RationalContext > , expressions::Wrapper < RationalContext > >, expressions::SubOp > | operator- (const Rational &a, const Rational &b) |
Subtracts the argument from this rational number and returns the result. More... | |
expressions::Expression < RationalContext, std::pair < expressions::Wrapper < RationalContext > , expressions::Wrapper < RationalContext > >, expressions::MulOp > | operator* (const Rational &a, const Rational &b) |
Multiplies the argument with this rational number and returns the result. More... | |
expressions::Expression < RationalContext, std::pair < expressions::Wrapper < RationalContext > , expressions::Wrapper < RationalContext > >, expressions::DivOp > | operator/ (const Rational &a, const Rational &b) |
Divides this rational number by the argument and returns the result. More... | |
expressions::Expression < RationalContext, std::pair < expressions::Wrapper < RationalContext > , expressions::Wrapper < RationalContext > >, expressions::ModOp > | operator% (const Rational &a, const Rational &b) |
Returns the remainder of this rational number divided by the by the argument. More... | |
expressions::Expression < RationalContext, expressions::Wrapper < RationalContext > , expressions::ShiftCOp > | operator<< (const Rational &a, signed long b) |
Multiplies this rational number with 2 to the power of b and returns the result. More... | |
expressions::Expression < RationalContext, expressions::Wrapper < RationalContext > , expressions::ShiftCOp > | operator>> (const Rational &a, signed long b) |
Divides this rational number by 2 to the power of b and returns the result. More... | |
expressions::Expression < RationalContext, expressions::Wrapper < RationalContext > , expressions::AbsOp > | abs (const Rational &i) |
Returns the absolute value of the given rational number. More... | |
expressions::Expression < RationalContext, expressions::Wrapper < RationalContext > , expressions::SquareOp > | square (const Rational &i) |
Returns the square of the given rational number. More... | |
expressions::Expression < RationalContext, expressions::Wrapper < RationalContext > , expressions::AbsOp > | abs (const Rational &i, const RationalContext &rc) |
Returns the absolute value of the given rational number. More... | |
expressions::Expression < RationalContext, expressions::Wrapper < RationalContext > , expressions::SquareOp > | square (const Rational &i, const RationalContext &rc) |
Returns the square of the given rational number. More... | |
Assignment-operation operators. | |
template<class D > | |
Integer & | operator-= (Integer &cur, const expressions::Expression< IntegerContext, D, expressions::MulOp > &E) |
Subtracts the multiplication expression E from cur . More... | |
Integer & | operator-= (Integer &cur, const Integer &i) |
Subtracts the integer i from cur . More... | |
template<class D > | |
Integer & | operator+= (Integer &cur, const expressions::Expression< IntegerContext, D, expressions::MulOp > &E) |
Adds the given multiplication expression to cur . More... | |
Integer & | operator+= (Integer &cur, const Integer &i) |
Adds the integer i to cur . More... | |
Integer & | operator*= (Integer &cur, const Integer &i) |
Multiplies the given integer i with cur . More... | |
Integer & | operator/= (Integer &cur, const Integer &i) |
Divides cur by the given integer i . More... | |
Integer & | operator%= (Integer &cur, const Integer &i) |
Divides cur by the given integer i and stores the remainder in cur . More... | |
Integer & | operator|= (Integer &cur, const Integer &i) |
Computes the bitwise or of cur with i and stores the result in cur . More... | |
Integer & | operator&= (Integer &cur, const Integer &i) |
Computes the bitwise and of cur with i and stores the result in cur . More... | |
Integer & | operator^= (Integer &cur, const Integer &i) |
Computes the bitwise exclusive or of cur with i and stores the result in cur . More... | |
Integer & | operator<<= (Integer &cur, const Integer &i) |
Computes the bitwise left shift of cur by i bits, and stores the result in cur . More... | |
Integer & | operator>>= (Integer &cur, const Integer &i) |
Computes the bitwise right shift of cur by i bits, and stores the result in cur . More... | |
Integer & | operator<<= (Integer &cur, long i) |
Computes the bitwise left shift of cur by i bits, and stores the result in cur . More... | |
Integer & | operator>>= (Integer &cur, long i) |
Computes the bitwise right shift of cur by i bits, and stores the result in cur . More... | |
Real & | operator-= (Real &cur, const Real &r) |
Subtracts the floating point number r from cur . More... | |
template<class D > | |
Real & | operator-= (Real &cur, const expressions::Expression< RealContext, D, expressions::MulOp > &E) |
Subtracts the multiplication expression E from cur . More... | |
Real & | operator+= (Real &cur, const Real &r) |
Adds the floating point number r to cur . More... | |
template<class D > | |
Real & | operator+= (Real &cur, const expressions::Expression< RealContext, D, expressions::MulOp > &E) |
Adds the given multiplication expression to cur . More... | |
Real & | operator*= (Real &cur, const Real &r) |
Multiplies the given floating point number r with cur . More... | |
Real & | operator/= (Real &cur, const Real &r) |
Divides cur by the given floating point number r . More... | |
Real & | operator%= (Real &cur, const Real &r) |
Divides cur by the given floating point number r and stores the remainder in cur . More... | |
Real & | operator<<= (Real &cur, const Real &r) |
Multiplies cur by 2 to the power of r . More... | |
Real & | operator>>= (Real &cur, const Real &r) |
Divides cur by 2 to the power of r . More... | |
Real & | operator<<= (Real &cur, long r) |
Multiplies cur by 2 to the power of r . More... | |
Real & | operator>>= (Real &cur, long r) |
Divides cur by 2 to the power of r . More... | |
template<typename Type > | |
NInt< Type > & | operator-= (NInt< Type > &cur, const NInt< Type > &i) PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE |
Subtracts the integer i from cur . More... | |
template<typename Type > | |
NInt< Type > & | operator+= (NInt< Type > &cur, const NInt< Type > &i) PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE |
Adds the integer i to cur . More... | |
template<typename Type > | |
NInt< Type > & | operator*= (NInt< Type > &cur, const NInt< Type > &i) PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE |
Multiplies the given integer i with cur . More... | |
template<typename Type > | |
NInt< Type > & | operator/= (NInt< Type > &cur, const NInt< Type > &i) PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE |
Divides cur by the given integer i . More... | |
template<typename Type > | |
NInt< Type > & | operator%= (NInt< Type > &cur, const NInt< Type > &i) PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE |
Divides cur by the given integer i and stores the remainder in cur . More... | |
template<typename Type > | |
NInt< Type > & | operator<<= (NInt< Type > &cur, long i) PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE |
Computes the bitwise left shift of cur by i bits, and stores the result in cur . More... | |
template<typename Type > | |
NInt< Type > & | operator>>= (NInt< Type > &cur, long i) PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE |
Computes the bitwise right shift of cur by i bits, and stores the result in cur . More... | |
template<typename Type > | |
NInt< Type > & | operator<<= (NInt< Type > &cur, const NInt< Type > &i) PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE |
Computes the bitwise left shift of cur by i bits, and stores the result in cur . More... | |
template<typename Type > | |
NInt< Type > & | operator>>= (NInt< Type > &cur, const NInt< Type > &i) PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE |
Computes the bitwise right shift of cur by i bits, and stores the result in cur . More... | |
Rational & | operator-= (Rational &cur, const Rational &r) |
Subtracts the given rational number r from this rational number. More... | |
template<class D > | |
Rational & | operator-= (Rational &cur, const expressions::Expression< RationalContext, D, expressions::MulOp > &E) |
Subtracts the given multiplication expression from this rational number. More... | |
Rational & | operator+= (Rational &cur, const Rational &r) |
Adds the given rational number r to this rational number. More... | |
template<class D > | |
Rational & | operator+= (Rational &cur, const expressions::Expression< RationalContext, D, expressions::MulOp > &E) |
Adds the given multiplication expression to this rational number. More... | |
Rational & | operator*= (Rational &cur, const Rational &r) |
Multiplies the given rational number r with this rational number. More... | |
Rational & | operator/= (Rational &cur, const Rational &r) |
Divides this rational number by the given rational number r . More... | |
Rational & | operator%= (Rational &cur, const Rational &r) |
Divides this rational number by the given rational number r and stores the remainder in this rational number. More... | |
Rational & | operator<<= (Rational &cur, long r) |
Multiplies this rational number by 2 to the power of r . More... | |
Rational & | operator>>= (Rational &cur, long r) |
Divides this rational number by 2 to the power of r . More... | |
Comparisons. | |
bool | operator== (const Integer &a, const Integer &b) |
Compares the current integer with the given one for equality. More... | |
bool | operator!= (const Integer &a, const Integer &b) |
Compares the current integer with the given one for inequality. More... | |
bool | operator<= (const Integer &a, const Integer &b) |
Compares the current integer with the given one. More... | |
bool | operator>= (const Integer &a, const Integer &b) |
Compares the current integer with the given one. More... | |
bool | operator< (const Integer &a, const Integer &b) |
Compares the current integer with the given one. More... | |
bool | operator> (const Integer &a, const Integer &b) |
Compares the current integer with the given one. More... | |
bool | operator== (const Real &a, const Real &b) |
Compares the two floating point numbers a and b for equality. More... | |
bool | operator!= (const Real &a, const Real &b) |
Compares the two floating point numbers a and b for inequality. More... | |
bool | operator<= (const Real &a, const Real &b) |
Compares the two floating point numbers a and b . More... | |
bool | operator>= (const Real &a, const Real &b) |
Compares the two floating point numbers a and b . More... | |
bool | operator< (const Real &a, const Real &b) |
Compares the two floating point numbers a and b . More... | |
bool | operator> (const Real &a, const Real &b) |
Compares the two floating point numbers a and b . More... | |
int | compare (const Integer &a, const Integer &b) |
Compares the two integers. More... | |
int | compare (const Real &a, const Real &b) |
Compares the two floating point numbers. More... | |
int | compareAbsValues (const Integer &a, const Integer &b) |
Compares the two integers in absolute value. More... | |
int | compareAbsValues (const Real &a, const Real &b) |
Compares the two floating point numbers in absolute value. More... | |
template<typename Type > | |
bool | operator== (const NInt< Type > &a, const NInt< Type > &b) PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE |
Compares the current integer with the given one for equality. More... | |
template<typename Type > | |
bool | operator!= (const NInt< Type > &a, const NInt< Type > &b) PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE |
Compares the current integer with the given one for inequality. More... | |
template<typename Type > | |
bool | operator<= (const NInt< Type > &a, const NInt< Type > &b) PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE |
Compares the current integer with the given one. More... | |
template<typename Type > | |
bool | operator>= (const NInt< Type > &a, const NInt< Type > &b) PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE |
Compares the current integer with the given one. More... | |
template<typename Type > | |
bool | operator< (const NInt< Type > &a, const NInt< Type > &b) PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE |
Compares the current integer with the given one. More... | |
template<typename Type > | |
bool | operator> (const NInt< Type > &a, const NInt< Type > &b) PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE |
Compares the current integer with the given one. More... | |
template<typename Type > | |
int | compare (const NInt< Type > &, const NInt< Type > &) PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE |
Compares the two integers. More... | |
template<typename Type > | |
int | compareAbsValues (const NInt< Type > &, const NInt< Type > &) PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE |
Compares the two integers in absolute value. More... | |
bool | operator== (const Rational &a, const Rational &b) |
Compares the two rational numbers a and b for equality. More... | |
bool | operator!= (const Rational &a, const Rational &b) |
Compares the two rational numbers a and b for inequality. More... | |
bool | operator<= (const Rational &a, const Rational &b) |
Compares the two rational numbers a and b . More... | |
bool | operator>= (const Rational &a, const Rational &b) |
Compares the two rational numbers a and b . More... | |
bool | operator< (const Rational &a, const Rational &b) |
Compares the two rational numbers a and b . More... | |
bool | operator> (const Rational &a, const Rational &b) |
Compares the two rational numbers a and b . More... | |
int | compare (const Rational &a, const Rational &b) |
Compares the two rational numbers. More... | |
int | compareAbsValues (const Rational &a, const Rational &b) |
Compares the two rational numbers in absolute value. More... | |
Integer approximation. | |
expressions::Expression < IntegerContext, expressions::Wrapper < IntegerContext > , expressions::SqrtCeilOp > | sqrtCeil (const Integer &i) |
Computes and returns the ceil of the square root of i . More... | |
expressions::Expression < IntegerContext, expressions::Wrapper < IntegerContext > , expressions::SqrtFloorOp > | sqrtFloor (const Integer &i) |
Computes and returns the floor of the square root of i . More... | |
expressions::Expression < IntegerContext, std::pair < expressions::Wrapper < IntegerContext > , expressions::Wrapper < IntegerContext > >, expressions::FloorDivOp > | floorDiv (const Integer &a, const Integer &b) |
Computes and returns . More... | |
expressions::Expression < IntegerContext, std::pair < expressions::Wrapper < IntegerContext > , expressions::Wrapper < IntegerContext > >, expressions::CeilDivOp > | ceilDiv (const Integer &a, const Integer &b) |
Computes and returns . More... | |
expressions::Expression < IntegerContext, std::pair < expressions::Wrapper < IntegerContext > , expressions::Wrapper < IntegerContext > >, expressions::RoundDivOp > | roundDiv (const Integer &a, const Integer &b) |
Computes and returns . More... | |
void | sqrtCeil (Integer &r, const Integer &a) |
Computes and stores the result in r . More... | |
void | sqrtFloor (Integer &r, const Integer &a) |
Computes and stores the result in r . More... | |
long | approxLog2 (const Integer &x) PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE |
Quickly approximates and returns the approximation. More... | |
long | ceilOfLog2 (const Integer &x) PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE |
Computes and returns . More... | |
long | floorOfLog2 (const Integer &x) PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE |
Computes and returns . More... | |
long | bitLength (const Integer &x) PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE |
Computes and returns n such that . More... | |
void | floorDiv (Integer &r, const Integer &a, const Integer &b) |
Computes and stores the result in r . More... | |
void | ceilDiv (Integer &r, const Integer &a, const Integer &b) |
Computes and stores the result in r . More... | |
void | roundDiv (Integer &r, const Integer &a, const Integer &b) |
Computes (rounding to the next integer) and stores the result in r . More... | |
template<typename Type > | |
void | sqrtCeil (NInt< Type > &r, const NInt< Type > &a) PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE |
Computes and stores the result in r . More... | |
template<typename Type > | |
NInt< Type > | sqrtCeil (const NInt< Type > &a) PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE |
Computes and returns . More... | |
template<typename Type > | |
void | sqrtFloor (NInt< Type > &r, const NInt< Type > &a) PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE |
Computes and stores the result in r . More... | |
template<typename Type > | |
NInt< Type > | sqrtFloor (const NInt< Type > &a) PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE |
Computes and returns . More... | |
template<typename Type > | |
long | ceilOfLog2 (const NInt< Type > &x) PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE |
Computes and returns . More... | |
template<typename Type > | |
long | floorOfLog2 (const NInt< Type > &x) PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE |
Computes and returns . More... | |
template<typename Type > | |
long | approxLog2 (const NInt< Type > &x) PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE |
Quickly approximates and returns the approximation. More... | |
template<typename Type > | |
long | bitLength (const NInt< Type > &x) PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE |
Computes and returns n such that . More... | |
template<typename Type > | |
void | floorDiv (NInt< Type > &r, const NInt< Type > &a, const NInt< Type > &b) PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE |
Computes and stores the result in r . More... | |
template<typename Type > | |
NInt< Type > | floorDiv (const NInt< Type > &a, const NInt< Type > &b) PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE |
Computes and returns . More... | |
template<typename Type > | |
void | ceilDiv (NInt< Type > &r, const NInt< Type > &a, const NInt< Type > &b) PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE |
Computes and stores the result in r . More... | |
template<typename Type > | |
NInt< Type > | ceilDiv (const NInt< Type > &a, const NInt< Type > &b) PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE |
Computes and returns . More... | |
template<typename Type > | |
void | roundDiv (NInt< Type > &r, const NInt< Type > &a, const NInt< Type > &b) PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE |
Computes (rounding to the next integer) and stores the result in r . More... | |
template<typename Type > | |
NInt< Type > | roundDiv (const NInt< Type > &a, const NInt< Type > &b) PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE |
Computes and returns (rounding to the next integer). More... | |
Euclidean ring functions. | |
expressions::Expression < IntegerContext, std::pair < expressions::Wrapper < IntegerContext > , expressions::Wrapper < IntegerContext > >, expressions::GCDOp > | GCD (const Integer &a, const Integer &b) |
Computes and returns the non-negative Greatest Common Divisor of a and b . More... | |
expressions::Expression < IntegerContext, std::pair < expressions::Wrapper < IntegerContext > , expressions::Wrapper < IntegerContext > >, expressions::LCMOp > | LCM (const Integer &a, const Integer &b) |
Computes and returns the non-negative Least Common Multiple of a and b . More... | |
void | euclideanDivision (Integer &q, Integer &r, const Integer &a, const Integer &b) |
Computes an Euclidean Division of a by b . More... | |
void | euclideanDivisionPos (Integer &q, Integer &r, const Integer &a, const Integer &b) |
Computes an Euclidean Division of a by b . More... | |
void | GCD (Integer &r, const Integer &x, const Integer &y) |
Computes the non-negative Greatest Common Divisior r of x and y . More... | |
void | XGCD (Integer &r, Integer &a, Integer &b, const Integer &x, const Integer &y) |
Computes the non-negative extended Greatest Common Divisior r of x and y . More... | |
void | LCM (Integer &r, const Integer &x, const Integer &y) |
Computes the non-negative Least Common Multiple r of x and y . More... | |
template<typename Type > | |
void | euclideanDivision (NInt< Type > &q, NInt< Type > &r, const NInt< Type > &a, const NInt< Type > &b) PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE |
Computes an Euclidean Division of a by b . More... | |
template<typename Type > | |
void | euclideanDivisionPos (NInt< Type > &q, NInt< Type > &r, const NInt< Type > &a, const NInt< Type > &b) PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE |
Computes an Euclidean Division of a by b . More... | |
template<typename Type > | |
void | GCD (NInt< Type > &r, const NInt< Type > &x, const NInt< Type > &y) PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE |
Computes the non-negative Greatest Common Divisior r of x and y . More... | |
template<typename Type > | |
NInt< Type > | GCD (const NInt< Type > &x, const NInt< Type > &y) PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE |
Computes and returns the non-negative Greatest Common Divisior of x and y . More... | |
template<typename Type > | |
void | XGCD (NInt< Type > &r, NInt< Type > &a, NInt< Type > &b, const NInt< Type > &x, const NInt< Type > &y) PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE |
Computes the non-negative extended Greatest Common Divisior r of x and y . More... | |
template<typename Type > | |
void | LCM (NInt< Type > &r, const NInt< Type > &x, const NInt< Type > &y) PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE |
Computes the non-negative Least Common Multiple r of x and y . More... | |
template<typename Type > | |
NInt< Type > | LCM (const NInt< Type > &x, const NInt< Type > &y) PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE |
Computes and returns the non-negative Least Common Multiple of x and y . More... | |
Exponentiation. | |
expressions::Expression < IntegerContext, std::pair < expressions::Wrapper < IntegerContext > , expressions::Wrapper < IntegerContext > >, expressions::PowerOp > | power (const Integer &a, const Integer &b) |
Computes and returns a raised to the power of b . More... | |
expressions::Expression < IntegerContext, expressions::Wrapper < IntegerContext > , expressions::PowerCOp < signed long >::impl > | power (const Integer &a, signed long b) |
Computes and returns a raised to the power of b . More... | |
expressions::Expression < RealContext, expressions::Wrapper < RealContext > , expressions::PowerCOp < signed long >::impl > | power (const Real &a, signed long b) |
Returns a raised to the power of b . More... | |
expressions::Expression < RealContext, expressions::Wrapper < RealContext > , expressions::PowerCOp < unsigned long >::impl > | power (const Real &a, unsigned long b) |
Returns a raised to the power of b . More... | |
expressions::Expression < RealContext, std::pair < expressions::Wrapper < RealContext > , expressions::Wrapper < IntegerContext > >, expressions::PowerOp > | power (const Real &a, const Integer &b) |
Returns a raised to the power of b . More... | |
expressions::Expression < RealContext, std::pair < expressions::Wrapper < RealContext > , expressions::Wrapper < RealContext > >, expressions::PowerOp > | power (const Real &a, const Real &b) |
Returns a raised to the power of b . More... | |
expressions::Expression < RealContext, expressions::Wrapper < RealContext > , expressions::PowerCOp_Context < signed long >::impl > | power (const Real &a, signed long b, const RealContext &rc) |
Returns a raised to the power of b . More... | |
expressions::Expression < RealContext, expressions::Wrapper < RealContext > , expressions::PowerCOp_Context < unsigned long >::impl > | power (const Real &a, unsigned long b, const RealContext &rc) |
Returns a raised to the power of b . More... | |
expressions::Expression < RealContext, std::pair < expressions::Wrapper < RealContext > , expressions::Wrapper < IntegerContext > >, expressions::PowerOp_Context > | power (const Real &a, const Integer &b, const RealContext &rc) |
Returns a raised to the power of b . More... | |
expressions::Expression < RealContext, std::pair < expressions::Wrapper < RealContext > , expressions::Wrapper < RealContext > >, expressions::PowerOp_Context > | power (const Real &a, const Real &b, const RealContext &rc) |
Returns a raised to the power of b . More... | |
void | power (Integer &r, const Integer &a, long b) |
Raises a to the power b and stores the result in r . More... | |
void | power (Integer &r, const Integer &a, const Integer &b) |
Raises a to the power b and stores the result in r . More... | |
void | power (Real &res, const Real &a, long b) |
void | power (Real &res, const Real &a, const Integer &b) |
Raises a to the power b and stores the result in res . More... | |
void | power (Real &res, const Real &a, const Real &b) |
Raises a to the power b and stores the result in res . More... | |
template<typename Type > | |
NInt< Type > | power (const NInt< Type > &a, long b) PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE |
Computes and returns a raised to the power of b . More... | |
template<typename Type > | |
void | power (NInt< Type > &r, const NInt< Type > &a, long b) PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE |
Raises a to the power b and stores the result in r . More... | |
template<typename Type > | |
NInt< Type > | power (const NInt< Type > &a, const NInt< Type > &b) PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE |
Computes and returns a raised to the power of b . More... | |
template<typename Type > | |
void | power (NInt< Type > &r, const NInt< Type > &a, const NInt< Type > &b) PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE |
Raises a to the power b and stores the result in r . More... | |
expressions::Expression < RationalContext, expressions::Wrapper < RationalContext > , expressions::PowerCOp < signed long >::impl > | power (const Rational &a, signed long b) |
Returns a raised to the power of b . More... | |
expressions::Expression < RationalContext, expressions::Wrapper < RationalContext > , expressions::PowerCOp < unsigned long >::impl > | power (const Rational &a, unsigned long b) |
Returns a raised to the power of b . More... | |
expressions::Expression < RationalContext, std::pair < expressions::Wrapper < RationalContext > , expressions::Wrapper < IntegerContext > >, expressions::PowerOp > | power (const Rational &a, const Integer &b) |
Returns a raised to the power of b . More... | |
expressions::Expression < RationalContext, expressions::Wrapper < RationalContext > , expressions::PowerCOp < signed long >::impl > | power (const Rational &a, signed long b, const RationalContext &rc) |
Returns a raised to the power of b . More... | |
expressions::Expression < RationalContext, expressions::Wrapper < RationalContext > , expressions::PowerCOp < unsigned long >::impl > | power (const Rational &a, unsigned long b, const RationalContext &rc) |
Returns a raised to the power of b . More... | |
expressions::Expression < RationalContext, std::pair < expressions::Wrapper < RationalContext > , expressions::Wrapper < IntegerContext > >, expressions::PowerOp > | power (const Rational &a, const Integer &b, const RationalContext &rc) |
Returns a raised to the power of b . More... | |
void | power (Rational &r, const Rational &a, signed long e) |
Raises a to the power e and stores the result in r . More... | |
void | power (Rational &r, const Rational &a, unsigned long e) |
Raises a to the power e and stores the result in r . More... | |
void | power (Rational &r, const Rational &a, const Integer &e) |
Raises a to the power e and stores the result in r . More... | |
Trigonometric functions. | |
expressions::Expression < RealContext, expressions::Wrapper < RealContext > , expressions::SinOp > | sin (const Real &i) |
Returns the sine of the given floating point number. More... | |
expressions::Expression < RealContext, expressions::Wrapper < RealContext > , expressions::CosOp > | cos (const Real &i) |
Returns the cosine of the given floating point number. More... | |
expressions::Expression < RealContext, expressions::Wrapper < RealContext > , expressions::TanOp > | tan (const Real &i) |
Returns the tangent of the given floating point number. More... | |
expressions::Expression < RealContext, expressions::Wrapper < RealContext > , expressions::ASinOp > | asin (const Real &i) |
Returns the arcsine of the given floating point number. More... | |
expressions::Expression < RealContext, expressions::Wrapper < RealContext > , expressions::ACosOp > | acos (const Real &i) |
Returns the arccosine of the given floating point number. More... | |
expressions::Expression < RealContext, expressions::Wrapper < RealContext > , expressions::ATanOp > | atan (const Real &i) |
Returns the arctangent of the given floating point number. More... | |
expressions::Expression < RealContext, std::pair < expressions::Wrapper < RealContext > , expressions::Wrapper < RealContext > >, expressions::ATan2Op > | atan2 (const Real &y, const Real &x) |
Returns the arctangent of , using the signs of x and y to determine the quadrant. More... | |
expressions::Expression < RealContext, expressions::Wrapper < RealContext > , expressions::SinOp_Context > | sin (const Real &i, const RealContext &rc) |
Returns the sine of the given floating point number. More... | |
expressions::Expression < RealContext, expressions::Wrapper < RealContext > , expressions::CosOp_Context > | cos (const Real &i, const RealContext &rc) |
Returns the cosine of the given floating point number. More... | |
expressions::Expression < RealContext, expressions::Wrapper < RealContext > , expressions::TanOp_Context > | tan (const Real &i, const RealContext &rc) |
Returns the tangent of the given floating point number. More... | |
expressions::Expression < RealContext, expressions::Wrapper < RealContext > , expressions::ASinOp_Context > | asin (const Real &i, const RealContext &rc) |
Returns the arcsine of the given floating point number. More... | |
expressions::Expression < RealContext, expressions::Wrapper < RealContext > , expressions::ACosOp_Context > | acos (const Real &i, const RealContext &rc) |
Returns the arccosine of the given floating point number. More... | |
expressions::Expression < RealContext, expressions::Wrapper < RealContext > , expressions::ATanOp_Context > | atan (const Real &i, const RealContext &rc) |
Returns the arctangent of the given floating point number. More... | |
expressions::Expression < RealContext, std::pair < expressions::Wrapper < RealContext > , expressions::Wrapper < RealContext > >, expressions::ATan2Op_Context > | atan2 (const Real &y, const Real &x, const RealContext &rc) |
Returns the arctangent of , using the signs of x and y to determine the quadrant. More... | |
void | sin (Real &res, const Real &a) |
Computes the sine of a and stores the result in res . More... | |
void | cos (Real &res, const Real &a) |
Computes the cosine of a and stores the result in res . More... | |
void | tan (Real &res, const Real &a) |
Computes the tangent of a and stores the result in res . More... | |
void | asin (Real &res, const Real &a) |
Computes the arcsine of a and stores the result in res . More... | |
void | acos (Real &res, const Real &a) |
Computes the arccosine of a and stores the result in res . More... | |
void | atan (Real &res, const Real &a) |
Computes the arctangent of a and stores the result in res . More... | |
void | atan2 (Real &res, const Real &y, const Real &x) |
Computes the arctangent of and stores the result in res. The signs of xand y` are used to determine the quadrant and yield a result in . More... | |
Exponential and logarithmic functions. | |
expressions::Expression < RealContext, expressions::Wrapper < RealContext > , expressions::ExpOp > | exp (const Real &i) |
Returns the exponential function evaluated at the given floating point number. More... | |
expressions::Expression < RealContext, expressions::Wrapper < RealContext > , expressions::LogOp > | log (const Real &i) |
Returns the natural logarithm evaluated at the given floating point number. More... | |
expressions::Expression < RealContext, expressions::Wrapper < RealContext > , expressions::Log2Op > | log2 (const Real &i) |
Returns the base-2 logarithm evaluated at the given floating point number. More... | |
expressions::Expression < RealContext, expressions::Wrapper < RealContext > , expressions::Log10Op > | log10 (const Real &i) |
Returns the base-10 logarithm evaluated at the given floating point number. More... | |
expressions::Expression < RealContext, expressions::Wrapper < RealContext > , expressions::SqrtOp > | sqrt (const Real &i) |
Returns the square root of the given floating point number. More... | |
expressions::Expression < RealContext, expressions::Wrapper < RealContext > , expressions::ExpOp_Context > | exp (const Real &i, const RealContext &rc) |
Returns the exponential function evaluated at the given floating point number. More... | |
expressions::Expression < RealContext, expressions::Wrapper < RealContext > , expressions::LogOp_Context > | log (const Real &i, const RealContext &rc) |
Returns the natural logarithm evaluated at the given floating point number. More... | |
expressions::Expression < RealContext, expressions::Wrapper < RealContext > , expressions::Log2Op_Context > | log2 (const Real &i, const RealContext &rc) |
Returns the base-2 logarithm evaluated at the given floating point number. More... | |
expressions::Expression < RealContext, expressions::Wrapper < RealContext > , expressions::Log10Op_Context > | log10 (const Real &i, const RealContext &rc) |
Returns the base-10 logarithm evaluated at the given floating point number. More... | |
expressions::Expression < RealContext, expressions::Wrapper < RealContext > , expressions::SqrtOp_Context > | sqrt (const Real &i, const RealContext &rc) |
Returns the square root of the given floating point number. More... | |
void | exp (Real &res, const Real &a) |
Computes the exponential function at a and stores the result in res . More... | |
void | log (Real &res, const Real &a) |
Computes the natural logarithm of a and stores the result in res . More... | |
void | log2 (Real &res, const Real &a) |
Computes the logarithm of a to base 2 and stores the result in res . More... | |
void | log10 (Real &res, const Real &a) |
Computes the logarithm of a to base 10 and stores the result in res . More... | |
void | sqrt (Real &res, const Real &a) |
Computes the square root of a and stores the result in res . More... | |
Special functions. | |
expressions::Expression < RealContext, expressions::Wrapper < RealContext > , expressions::GammaOp > | gamma (const Real &i) |
Returns the Gamma function evaluated at the given floating point number. More... | |
expressions::Expression < RealContext, expressions::Wrapper < RealContext > , expressions::LGammaOp > | lgamma (const Real &i) |
Returns the natural logarithm of the absolute value of the Gamma function evaluated at the given floating point number. More... | |
expressions::Expression < RealContext, expressions::Wrapper < RealContext > , expressions::LGamma2Op > | lgamma (int &sign, const Real &i) |
Returns the natural logarithm of the absolute value of the Gamma function evaluated at the given floating point number, as well as the sign of the Gamma function. More... | |
expressions::Expression < RealContext, expressions::Wrapper < RealContext > , expressions::GammaOp_Context > | gamma (const Real &i, const RealContext &rc) |
Returns the Gamma function evaluated at the given floating point number. More... | |
expressions::Expression < RealContext, expressions::Wrapper < RealContext > , expressions::LGammaOp_Context > | lgamma (const Real &i, const RealContext &rc) |
Returns the natural logarithm of the absolute value of the Gamma function evaluated at the given floating point number. More... | |
expressions::Expression < RealContext, expressions::Wrapper < RealContext > , expressions::LGamma2Op_Context > | lgamma (int &sign, const Real &i, const RealContext &rc) |
Returns the natural logarithm of the absolute value of the Gamma function evaluated at the given floating point number, as well as the sign of the Gamma function. More... | |
void | gamma (Real &res, const Real &a) |
Computes the Gamma function at a and stores the result in res . More... | |
void | lgamma (Real &res, const Real &a) |
Computes the logarithm of the absolute value of the Gamma function at a and stores the result in res . More... | |
void | lgamma (Real &res, int &sign, const Real &a) |
Computes the logarithm of the absolute value of the Gamma function at a and stores the result in res . The sign of the Gamma function at a is stored in sign . More... | |
Swap functions. | |
void | swap (plll::arithmetic::Integer &, plll::arithmetic::Integer &) PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE |
Swaps two plll::arithmetic::Integer objects. | |
void | swap (plll::arithmetic::Real &, plll::arithmetic::Real &) PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE |
Swaps two plll::arithmetic::Real objects. | |
template<typename Type > | |
void | swap (NInt< Type > &, NInt< Type > &) PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE |
Swaps two plll::arithmetic::NInt<> objects. | |
void | swap (Rational &, Rational &) PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE |
Swaps two plll::arithmetic::Rational objects. | |
Predicates. | |
bool | isZero (const Integer &) PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE |
Tests the given plll::arithmetic::Integer object for being zero. More... | |
bool | isZero (const Real &) PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE |
Tests the given plll::arithmetic::Real object for being zero. More... | |
bool | isOne (const Integer &) PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE |
Tests the given plll::arithmetic::Integer object for being one. More... | |
bool | isPMOne (const Integer &) PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE |
Tests the given plll::arithmetic::Integer object for being one or minus one. More... | |
bool | isPMTwo (const Integer &) PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE |
Tests the given plll::arithmetic::Integer object for being two or minus two. More... | |
bool | isOne (const Real &) PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE |
Tests the given plll::arithmetic::Real object for being one. More... | |
bool | isPositive (const Integer &) PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE |
Tests the given plll::arithmetic::Integer object for being strictly positive. More... | |
bool | isPositive (const Real &) PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE |
Tests the given plll::arithmetic::Real object for being strictly positive. More... | |
bool | isNonNegative (const Integer &) PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE |
Tests the given plll::arithmetic::Integer object for being positive or zero. More... | |
bool | isNonNegative (const Real &) PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE |
Tests the given plll::arithmetic::Real object for being positive or zero. More... | |
bool | isNegative (const Integer &) PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE |
Tests the given plll::arithmetic::Integer object for being strictly negative. More... | |
bool | isNegative (const Real &) PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE |
Tests the given plll::arithmetic::Real object for being strictly negative. More... | |
bool | isNonPositive (const Integer &) PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE |
Tests the given plll::arithmetic::Integer object for being negative or zero. More... | |
bool | isNonPositive (const Real &) PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE |
Tests the given plll::arithmetic::Real object for being negative or zero. More... | |
template<typename Type > | |
bool | isZero (const NInt< Type > &) PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE |
Tests the given plll::arithmetic::Integer object for being zero. More... | |
template<typename Type > | |
bool | isOne (const NInt< Type > &) PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE |
Tests the given plll::arithmetic::Integer object for being one. More... | |
template<typename Type > | |
bool | isPMOne (const NInt< Type > &) PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE |
Tests the given plll::arithmetic::Integer object for being one or minus one. More... | |
template<typename Type > | |
bool | isPMTwo (const NInt< Type > &) PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE |
Tests the given plll::arithmetic::Integer object for being two or minus two. More... | |
template<typename Type > | |
bool | isPositive (const NInt< Type > &) PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE |
Tests the given plll::arithmetic::Integer object for being strictly positive. More... | |
template<typename Type > | |
bool | isNonNegative (const NInt< Type > &) PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE |
Tests the given plll::arithmetic::Integer object for being positive or zero. More... | |
template<typename Type > | |
bool | isNegative (const NInt< Type > &) PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE |
Tests the given plll::arithmetic::Integer object for being strictly negative. More... | |
template<typename Type > | |
bool | isNonPositive (const NInt< Type > &) PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE |
Tests the given plll::arithmetic::Integer object for being negative or zero. More... | |
bool | isZero (const Rational &r) PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE |
Tests the given rational number for being zero. More... | |
bool | isOne (const Rational &r) PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE |
Tests the given plll::arithmetic::Real object for being zero. More... | |
bool | isPositive (const Rational &r) PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE |
Tests the given rational number for being strictly positive. More... | |
bool | isNonNegative (const Rational &r) PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE |
Tests the given rational number for being positive or zero. More... | |
bool | isNegative (const Rational &r) PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE |
Tests the given rational number for being strictly negative. More... | |
bool | isNonPositive (const Rational &r) PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE |
Tests the given rational number for being negative or zero. More... | |
Stream input/output. | |
std::ostream & | operator<< (std::ostream &, const Integer &) |
Outputs the integer on the given output stream. | |
std::istream & | operator>> (std::istream &, Integer &) |
Reads the integer from the given input stream. | |
std::ostream & | operator<< (std::ostream &, const Real &) |
Outputs the floating point number on the given output stream. | |
std::istream & | operator>> (std::istream &, Real &) |
Reads the floating point number from the given input stream. | |
template<typename Type > | |
std::ostream & | operator<< (std::ostream &, const NInt< Type > &) |
Outputs the integer on the given output stream. | |
template<typename Type > | |
std::istream & | operator>> (std::istream &, NInt< Type > &) |
Reads the integer from the given input stream. | |
std::ostream & | operator<< (std::ostream &s, const Rational &r) |
Outputs the rational number on the given output stream. | |
std::istream & | operator>> (std::istream &s, Rational &r) |
Reads the rational number from the given input stream. | |
Setting to specific constants. | |
void | setNaN (Real &) |
Sets the given floating point number to Not a Number . | |
void | setInfinity (Real &r, bool sign=true) |
Sets the given floating point number to . More... | |
void | setZero (Integer &) |
Sets the given integer to zero. | |
void | setZero (Real &r, bool sign=true) |
Sets the given floating point number to . More... | |
void | setOne (Integer &) |
Sets the given integer to one. | |
void | setOne (Real &) |
Sets the given floating point number to one. | |
template<typename Type > | |
void | setZero (NInt< Type > &) PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE |
Sets the given integer to zero. | |
template<typename Type > | |
void | setOne (NInt< Type > &) PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE |
Sets the given integer to one. | |
void | setZero (Rational &r, bool sign=true) |
Sets the given rational number to . More... | |
void | setOne (Rational &r) |
Sets the given rational number to one. More... | |
Sign querying/modification. | |
int | sign (const Integer &) PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE |
Returns the sign of the given integer. More... | |
int | sign (const Real &) PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE |
Returns the sign of the given floating point number. More... | |
void | makeAbs (Integer &a) PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE |
Makes the operand non-negative. More... | |
void | makeAbs (Real &a) PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE |
Makes the operand non-negative. More... | |
template<typename Type > | |
int | sign (const NInt< Type > &) PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE |
Returns the sign of the given integer. More... | |
template<typename Type > | |
void | makeAbs (NInt< Type > &a) PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE |
Makes the operand non-negative. More... | |
void | makeAbs (Rational &a) PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE |
Makes the operand non-negative. More... | |
int | sign (const Rational &r) PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE |
Returns the sign of the given rational number. More... | |
Bit manipulation. | |
int | bit (const Integer &x, long n) PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE |
Returns the n bit of in the usual binary representation. More... | |
void | setbit (Integer &x, long n, bool value=true) |
Sets the n -th bit of to value . More... | |
template<typename Type > | |
int | bit (const NInt< Type > &x, long n) PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE |
Returns the n bit of in the usual binary representation. More... | |
template<typename Type > | |
void | setbit (NInt< Type > &x, long n, bool value=true) PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE |
Sets the n -th bit of to value . More... | |
Functional versions of operators. | |
void | increment (Integer &r, const Integer &a) |
Increments a by one and stores the result in r . More... | |
void | decrement (Integer &r, const Integer &a) |
Decrements a by one and stores the result in r . More... | |
void | add (Integer &r, const Integer &a, const Integer &b) |
Adds a and b and stores the result in r . More... | |
void | sub (Integer &r, const Integer &a, const Integer &b) |
Subtracts b from a and stores the result in r . More... | |
void | mul (Integer &r, const Integer &a, const Integer &b) |
Multiplies a with b and stores the result in r . More... | |
void | neg (Integer &r, const Integer &a) |
Negates a and stores the result in r . More... | |
void | div (Integer &r, const Integer &a, const Integer &b) |
Divides a by b and stores the result in r . More... | |
void | mod (Integer &r, const Integer &a, const Integer &b) |
Takes the remainder of the division of a by b and stores it in r . More... | |
void | divmod (Integer &q, Integer &r, const Integer &a, const Integer &b) |
Stores quotient and remainder of the division of a by b in q respectively r . More... | |
void | abs (Integer &r, const Integer &a) |
Takes the absolute value of a and stores the result in r . More... | |
void | addmul (Integer &r, const Integer &a, const Integer &b) |
Multiplies a and b and adds the result to r . More... | |
void | submul (Integer &r, const Integer &a, const Integer &b) |
Multiplies a and b and subtracts the result from r . More... | |
void | band (Integer &r, const Integer &a, const Integer &b) |
Computes the bitwise and of a and b and stores the result in r . More... | |
void | bor (Integer &r, const Integer &a, const Integer &b) |
Computes the bitwise or of a and b and stores the result in r . More... | |
void | bxor (Integer &r, const Integer &a, const Integer &b) |
Computes the bitwise exclusive or of a and b and stores the result in r . More... | |
void | bneg (Integer &r, const Integer &a) |
Takes the bitwise complement of a and stores the result in r . More... | |
void | shl (Integer &r, const Integer &a, long b) |
Shifts a by b bits to the left and stores the result in r . More... | |
void | shl (Integer &r, const Integer &a, const Integer &b) |
Shifts a by b bits to the right and stores the result in r . More... | |
void | shr (Integer &r, const Integer &a, long b) |
Shifts a by b bits to the left and stores the result in r . More... | |
void | shr (Integer &r, const Integer &a, const Integer &b) |
Shifts a by b bits to the right and stores the result in r . More... | |
void | square (Integer &r, const Integer &a) |
Computes the square of a and stores the result in r . More... | |
void | add (Real &r, const Real &a, const Real &b) |
Adds a and b and stores the result in r . More... | |
void | sub (Real &r, const Real &a, const Real &b) |
Subtracts b from a and stores the result in r . More... | |
void | mul (Real &r, const Real &a, const Real &b) |
Multiplies a with b and stores the result in r . More... | |
void | div (Real &r, const Real &a, const Real &b) |
Divides a by b and stores the result in r . More... | |
void | mod (Real &r, const Real &a, const Real &b) |
Takes the remainder of the division of a by b and stores it in r . More... | |
void | divmod (Real &q, Real &r, const Real &a, const Real &b) |
Stores quotient and remainder of the division of a by b in q respectively r . More... | |
void | shl (Real &r, const Real &a, const Real &b) |
Multiplies a by and stores the result in r . More... | |
void | shr (Real &r, const Real &a, const Real &b) |
Multiplies a by and stores the result in r . More... | |
void | shl (Real &r, const Real &a, long b) |
Multiplies a by and stores the result in r . More... | |
void | shr (Real &r, const Real &a, long b) |
Multiplies a by and stores the result in r . More... | |
void | increment (Real &r, const Real &a) |
Increments a by one and stores the result in r . More... | |
void | decrement (Real &r, const Real &a) |
Decrements a by one and stores the result in r . More... | |
void | neg (Real &r, const Real &a) |
Negates a and stores the result in r . More... | |
void | abs (Real &r, const Real &a) |
Takes the absolute value of a and stores the result in r . More... | |
void | addmul (Real &r, const Real &a, const Real &b) |
Multiplies a and b and adds the result to r . More... | |
void | submul (Real &r, const Real &a, const Real &b) |
Multiplies a and b and subtracts the result from r . More... | |
void | square (Real &r, const Real &a) |
Computes the square of a and stores the result in r . More... | |
template<typename Type > | |
void | add (NInt< Type > &r, const NInt< Type > &a, const NInt< Type > &b) PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE |
Adds a and b and stores the result in r . More... | |
template<typename Type > | |
void | sub (NInt< Type > &r, const NInt< Type > &a, const NInt< Type > &b) PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE |
Subtracts b from a and stores the result in r . More... | |
template<typename Type > | |
void | addmul (NInt< Type > &r, const NInt< Type > &a, const NInt< Type > &b) PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE |
Multiplies a and b and adds the result to r . More... | |
template<typename Type > | |
void | submul (NInt< Type > &r, const NInt< Type > &a, const NInt< Type > &b) PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE |
Multiplies a and b and subtracts the result from r . More... | |
template<typename Type > | |
void | mul (NInt< Type > &r, const NInt< Type > &a, const NInt< Type > &b) PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE |
Multiplies a with b and stores the result in r . More... | |
template<typename Type > | |
void | div (NInt< Type > &r, const NInt< Type > &a, const NInt< Type > &b) PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE |
Divides a by b and stores the result in r . More... | |
template<typename Type > | |
void | divmod (NInt< Type > &q, NInt< Type > &r, const NInt< Type > &a, const NInt< Type > &b) PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE |
Stores quotient and remainder of the division of a by b in q respectively r . More... | |
template<typename Type > | |
void | mod (NInt< Type > &r, const NInt< Type > &a, const NInt< Type > &b) PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE |
Takes the remainder of the division of a by b and stores it in r . More... | |
template<typename Type > | |
void | shl (NInt< Type > &r, const NInt< Type > &a, long b) PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE |
Shifts a by b bits to the left and stores the result in r . More... | |
template<typename Type > | |
void | shr (NInt< Type > &r, const NInt< Type > &a, long b) PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE |
Shifts a by b bits to the left and stores the result in r . More... | |
template<typename Type > | |
void | shl (NInt< Type > &r, const NInt< Type > &a, const NInt< Type > &b) PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE |
Shifts a by b bits to the left and stores the result in r . More... | |
template<typename Type > | |
void | shr (NInt< Type > &r, const NInt< Type > &a, const NInt< Type > &b) PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE |
Shifts a by b bits to the left and stores the result in r . More... | |
template<typename Type > | |
void | increment (NInt< Type > &r, const NInt< Type > &a) PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE |
Increments a by one and stores the result in r . More... | |
template<typename Type > | |
void | decrement (NInt< Type > &r, const NInt< Type > &a) PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE |
Decrements a by one and stores the result in r . More... | |
template<typename Type > | |
void | neg (NInt< Type > &r, const NInt< Type > &a) PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE |
Negates a and stores the result in r . More... | |
template<typename Type > | |
void | abs (NInt< Type > &r, const NInt< Type > &a) PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE |
Takes the absolute value of a and stores the result in r . More... | |
template<typename Type > | |
void | square (NInt< Type > &r, const NInt< Type > &a) PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE |
Computes the square of a and stores the result in r . More... | |
void | addmul (Rational &r, const Rational &a, const Rational &b) |
Multiplies a and b and adds the result to r . More... | |
void | submul (Rational &r, const Rational &a, const Rational &b) |
Multiplies a and b and subtracts the result from r . More... | |
void | add (Rational &r, const Rational &a, const Rational &b) |
Adds a and b and stores the result in r . More... | |
void | sub (Rational &r, const Rational &a, const Rational &b) |
Subtracts b from a and stores the result in r . More... | |
void | mul (Rational &r, const Rational &a, const Rational &b) |
Multiplies a with b and stores the result in r . More... | |
void | div (Rational &r, const Rational &a, const Rational &b) |
Divides a by b and stores the result in r . More... | |
void | mod (Rational &r, const Rational &a, const Rational &b) |
Takes the remainder of the division of a by b and stores it in r . More... | |
void | shl (Rational &r, const Rational &a, long b) |
Multiplies a by and stores the result in r . More... | |
void | shr (Rational &r, const Rational &a, long b) |
Multiplies a by and stores the result in r . More... | |
void | increment (Rational &r, const Rational &a) |
Increments a by one and stores the result in r . More... | |
void | decrement (Rational &r, const Rational &a) |
Negates a and stores the result in r . More... | |
void | neg (Rational &r, const Rational &a) |
Negates a and stores the result in r . More... | |
void | abs (Rational &r, const Rational &a) |
Takes the absolute value of a and stores the result in r . More... | |
void | square (Rational &r, const Rational &a) |
Computes the square of a and stores the result in r . More... | |
Conversion functions. | |
template<class SourceType , class DestContext > | |
void | convert (typename DestContext::Type &dst, const SourceType &src, const DestContext &context) |
Converts the value in src to the type described by context and stores the result in dst . More... | |
template<class SourceType , class DestContext > | |
implementation::conversion_impl < SourceType, DestContext > ::RetVal | convert (const SourceType &src, const DestContext &context) |
Converts the value in src to the type described by context and returns the result. More... | |
template<class SourceType , class DestContext > | |
void | convert_fraction (typename DestContext::Type &dst, const SourceType &src1, const SourceType &src2, const DestContext &context) |
Converts the values in src1 and scr2 to the type described by context and stores their quotient in dst . More... | |
template<class SourceType , class DestContext > | |
implementation::conversion_impl < SourceType, DestContext > ::RetVal_Frac | convert_fraction (const SourceType &src1, const SourceType &src2, const DestContext &context) |
Converts the values in src1 and scr2 to the type described by context and returns their quotient. More... | |
template<class SourceType , class DestContext > | |
void | convert_floor (typename DestContext::Type &dst, const SourceType &src, const DestContext &context) |
Converts the floor of the value in src to the type described by context and stores the result in dst . More... | |
template<class SourceType , class DestContext > | |
implementation::conversion_impl < SourceType, DestContext > ::RetVal_Floor | convert_floor (const SourceType &src, const DestContext &context) |
Converts the floor of the value in src to the type described by context and returns the result. More... | |
template<class SourceType , class DestContext > | |
void | convert_round (typename DestContext::Type &dst, const SourceType &src, const DestContext &context) |
Converts the rounded value in src to the type described by context and stores the result in dst . More... | |
template<class SourceType , class DestContext > | |
implementation::conversion_impl < SourceType, DestContext > ::RetVal_Round | convert_round (const SourceType &src, const DestContext &context) |
Converts the rounded value in src to the type described by context and returns the result. More... | |
template<class SourceType , class DestContext > | |
void | convert_round (typename DestContext::Type &dst, const SourceType &src, bool &up, const DestContext &context) |
Converts the rounded value in src to the type described by context and stores the result in dst . Stores in up whether the value was rounded up or down. More... | |
template<class SourceType , class DestContext > | |
implementation::conversion_impl < SourceType, DestContext > ::RetVal_Round2 | convert_round (const SourceType &src, bool &up, const DestContext &context) |
Converts the rounded value in src to the type described by context and returns the result. Stores in up whether the value was rounded up or down. More... | |
template<class SourceType , class DestContext > | |
void | convert_ceil (typename DestContext::Type &dst, const SourceType &src, const DestContext &context) |
Converts the ceil of the value in src to the type described by context and stores the result in dst . More... | |
template<class SourceType , class DestContext > | |
implementation::conversion_impl < SourceType, DestContext > ::RetVal_Ceil | convert_ceil (const SourceType &src, const DestContext &context) |
Converts the ceil of the value in src to the type described by context and returns the result in dst . More... | |
template<class Native , class SourceType > | |
implementation::nativeconversion_impl2 < Native, SourceType, traits::type_traits< Native > ::is_inttype||!traits::type_traits < Native >::is_number, traits::type_traits < SourceType >::is_inttype||!traits::type_traits < SourceType >::is_number > ::RetVal | convert (const SourceType &src) |
Converts the value in src to the native type Native and returns the result. More... | |
template<class Native , class SourceType > | |
implementation::nativeconversion_impl2 < Native, SourceType, traits::type_traits< Native > ::is_inttype||!traits::type_traits < Native >::is_number, traits::type_traits < SourceType >::is_inttype||!traits::type_traits < SourceType >::is_number > ::RetVal_Floor | convert_floor (const SourceType &src) |
Converts the floor of the value in src to the native type Native and returns the result. More... | |
template<class Native , class SourceType > | |
implementation::nativeconversion_impl2 < Native, SourceType, traits::type_traits< Native > ::is_inttype||!traits::type_traits < Native >::is_number, traits::type_traits < SourceType >::is_inttype||!traits::type_traits < SourceType >::is_number > ::RetVal_Round | convert_round (const SourceType &src) |
Converts the rounded value of src to the native type Native and returns the result. More... | |
template<class Native , class SourceType > | |
implementation::nativeconversion_impl2 < Native, SourceType, traits::type_traits< Native > ::is_inttype||!traits::type_traits < Native >::is_number, traits::type_traits < SourceType >::is_inttype||!traits::type_traits < SourceType >::is_number > ::RetVal_Round2 | convert_round (const SourceType &src, bool &up) |
Converts the rounded value of src to the native type Native and returns the result. Returns whether the value was rounded up or not in up . More... | |
template<class Native , class SourceType > | |
implementation::nativeconversion_impl2 < Native, SourceType, traits::type_traits< Native > ::is_inttype||!traits::type_traits < Native >::is_number, traits::type_traits < SourceType >::is_inttype||!traits::type_traits < SourceType >::is_number > ::RetVal_Ceil | convert_ceil (const SourceType &src) |
Converts the ceil of the value in src to the native type Native and returns the result. More... | |
Contains the arithmetic backend of plll
.
The plll::arithmetic
namespace contains all arithmetic code of plll
, such as contexts, expression templates, conversion facilities and traits.
|
inline |
Takes the absolute value of a
and stores the result in r
.
r | The result. |
a | The operand. |
Definition at line 1285 of file rational.hpp.
|
inline |
Takes the absolute value of a
and stores the result in r
.
r | The result. |
a | The operand. |
Definition at line 1458 of file arithmetic-gmp.hpp.
|
inline |
Takes the absolute value of a
and stores the result in r
.
r | The result. |
a | The operand. |
Definition at line 1752 of file arithmetic-nint.hpp.
|
inline |
Takes the absolute value of a
and stores the result in r
.
r | The result. |
a | The operand. |
Definition at line 2902 of file arithmetic-gmp.hpp.
|
inline |
Computes and returns the absolute value of i
.
i | The operand. |
Definition at line 1758 of file arithmetic-nint.hpp.
|
inline |
Returns the absolute value of the given rational number.
i | The operand. |
Definition at line 995 of file rational-ops.hpp.
|
inline |
Returns the absolute value of the given rational number.
i | The operand. |
rc | The context whose precision to use for the result. |
Definition at line 1060 of file rational-ops.hpp.
|
inline |
Returns the absolute value of the given floating point number.
i | The operand. |
Definition at line 1437 of file arithmetic-gmp-rops.hpp.
|
inline |
Computes and returns the absolute value of i
.
i | The operand. |
Definition at line 1490 of file arithmetic-gmp-iops.hpp.
|
inline |
Returns the absolute value of the given floating point number.
i | The operand. |
rc | The context whose precision to use for the result. |
Definition at line 1851 of file arithmetic-gmp-rops.hpp.
|
inline |
Computes the arccosine of a
and stores the result in res
.
res | The result. |
a | The value the function is evaluated at. |
Definition at line 3064 of file arithmetic-gmp.hpp.
|
inline |
Returns the arccosine of the given floating point number.
i | The operand. |
Definition at line 1506 of file arithmetic-gmp-rops.hpp.
|
inline |
Returns the arccosine of the given floating point number.
i | The operand. |
rc | The context whose precision to use for the result. |
Definition at line 1926 of file arithmetic-gmp-rops.hpp.
|
inline |
Adds a
and b
and stores the result in r
.
r | The result. |
a | The first operand. |
b | The second operand. |
Definition at line 887 of file rational.hpp.
|
inline |
Adds a
and b
and stores the result in r
.
r | The result. |
a | The first operand. |
b | The second operand. |
Definition at line 1319 of file arithmetic-gmp.hpp.
|
inline |
Adds a
and b
and stores the result in r
.
r | The result. |
a | The first operand. |
b | The second operand. |
Definition at line 1631 of file arithmetic-nint.hpp.
|
inline |
Adds a
and b
and stores the result in r
.
r | The result. |
a | The first operand. |
b | The second operand. |
Definition at line 2444 of file arithmetic-gmp.hpp.
|
inline |
Multiplies a
and b
and adds the result to r
.
r | The accumulator. |
a | The first operand. |
b | The second operand. |
Definition at line 1463 of file arithmetic-gmp.hpp.
|
inline |
Multiplies a
and b
and adds the result to r
.
r | The accumulator. |
a | The first operand. |
b | The second operand. |
Definition at line 1643 of file arithmetic-nint.hpp.
|
inline |
Multiplies a
and b
and adds the result to r
.
r | The accumulator. |
a | The first operand. |
b | The second operand. |
Definition at line 2588 of file arithmetic-gmp.hpp.
|
inline |
Multiplies a
and b
and adds the result to r
.
r | The accumulator. |
a | The first operand. |
b | The second operand. |
Definition at line 1256 of file rational-ops.hpp.
long plll::arithmetic::approxLog2 | ( | const Integer & | x | ) |
Quickly approximates and returns the approximation.
x | A non-zero integer. |
Definition at line 1793 of file arithmetic-gmp.hpp.
|
inline |
Quickly approximates and returns the approximation.
x | A non-zero integer. |
Definition at line 2161 of file arithmetic-nint.hpp.
|
inline |
Computes the arcsine of a
and stores the result in res
.
res | The result. |
a | The value the function is evaluated at. |
Definition at line 3055 of file arithmetic-gmp.hpp.
|
inline |
Returns the arcsine of the given floating point number.
i | The operand. |
Definition at line 1495 of file arithmetic-gmp-rops.hpp.
|
inline |
Returns the arcsine of the given floating point number.
i | The operand. |
rc | The context whose precision to use for the result. |
Definition at line 1914 of file arithmetic-gmp-rops.hpp.
|
inline |
Computes the arctangent of a
and stores the result in res
.
res | The result. |
a | The value the function is evaluated at. |
Definition at line 3073 of file arithmetic-gmp.hpp.
|
inline |
Returns the arctangent of the given floating point number.
i | The operand. |
Definition at line 1517 of file arithmetic-gmp-rops.hpp.
|
inline |
Returns the arctangent of the given floating point number.
i | The operand. |
rc | The context whose precision to use for the result. |
Definition at line 1938 of file arithmetic-gmp-rops.hpp.
|
inline |
Computes the arctangent of and stores the result in
res. The signs of
xand
y` are used to determine the quadrant and yield a result in .
res | The result. |
y | The numerator of the fraction the function is evaluated at. |
x | The denominator of the fraction the function is evaluated at. |
Definition at line 3082 of file arithmetic-gmp.hpp.
|
inline |
Returns the arctangent of , using the signs of x
and y
to determine the quadrant.
y | The numerator. |
x | The denominator. |
Definition at line 1531 of file arithmetic-gmp-rops.hpp.
|
inline |
Returns the arctangent of , using the signs of x
and y
to determine the quadrant.
y | The numerator. |
x | The denominator. |
rc | The context whose precision to use for the result. |
Definition at line 1953 of file arithmetic-gmp-rops.hpp.
|
inline |
Computes the bitwise and of a
and b
and stores the result in r
.
r | The result. |
a | The first operand. |
b | The second operand. |
Definition at line 1555 of file arithmetic-gmp.hpp.
|
inline |
Returns the n
bit of in the usual binary representation.
x | The integer whose bit to query. |
n | The index of the bit to query. |
Definition at line 1773 of file arithmetic-gmp.hpp.
|
inline |
Returns the n
bit of in the usual binary representation.
x | The integer whose bit to query. |
n | The index of the bit to query. |
Definition at line 1846 of file arithmetic-nint.hpp.
|
inline |
Computes and returns n
such that .
x | A non-zero integer. |
Definition at line 1810 of file arithmetic-gmp.hpp.
|
inline |
Computes and returns n
such that .
x | A non-zero integer. |
Definition at line 2168 of file arithmetic-nint.hpp.
|
inline |
Takes the bitwise complement of a
and stores the result in r
.
r | The result. |
a | The operand. |
Definition at line 1570 of file arithmetic-gmp.hpp.
|
inline |
Computes the bitwise or of a
and b
and stores the result in r
.
r | The result. |
a | The first operand. |
b | The second operand. |
Definition at line 1560 of file arithmetic-gmp.hpp.
|
inline |
Computes the bitwise exclusive or of a
and b
and stores the result in r
.
r | The result. |
a | The first operand. |
b | The second operand. |
Definition at line 1565 of file arithmetic-gmp.hpp.
void plll::arithmetic::ceilDiv | ( | Integer & | r, |
const Integer & | a, | ||
const Integer & | b | ||
) |
Computes and stores the result in r
.
r | The result. |
a | The divident. |
b | The divisor. |
Definition at line 1524 of file arithmetic-gmp.hpp.
void plll::arithmetic::ceilDiv | ( | NInt< Type > & | r, |
const NInt< Type > & | a, | ||
const NInt< Type > & | b | ||
) |
Computes and stores the result in r
.
r | The result. |
a | The divident. |
b | The divisor. |
Definition at line 2196 of file arithmetic-nint.hpp.
NInt< Type > plll::arithmetic::ceilDiv | ( | const NInt< Type > & | a, |
const NInt< Type > & | b | ||
) |
Computes and returns .
a | The divident. |
b | The divisor. |
Definition at line 2209 of file arithmetic-nint.hpp.
|
inline |
Computes and returns .
a | The first operand. |
b | The second operand. |
Definition at line 1596 of file arithmetic-gmp-iops.hpp.
long plll::arithmetic::ceilOfLog2 | ( | const Integer & | x | ) |
Computes and returns .
x | A non-zero integer. |
Definition at line 1798 of file arithmetic-gmp.hpp.
long plll::arithmetic::ceilOfLog2 | ( | const NInt< Type > & | x | ) |
Computes and returns .
x | A non-zero integer. |
Definition at line 1965 of file arithmetic-nint.hpp.
|
inline |
Compares the two rational numbers.
a | The first operand. |
b | The second operand. |
Definition at line 1320 of file rational.hpp.
|
inline |
Compares the two integers.
a | The first operand. |
b | The second operand. |
Definition at line 1718 of file arithmetic-gmp.hpp.
|
inline |
Compares the two floating point numbers.
a | The first operand. |
b | The second operand. |
Definition at line 2950 of file arithmetic-gmp.hpp.
|
inline |
Compares the two integers.
a | The first operand. |
b | The second operand. |
Definition at line 1799 of file arithmetic-nint.hpp.
|
inline |
Compares the two rational numbers in absolute value.
a | The first operand. |
b | The second operand. |
Definition at line 1331 of file rational.hpp.
|
inline |
Compares the two integers in absolute value.
a | The first operand. |
b | The second operand. |
Definition at line 1742 of file arithmetic-gmp.hpp.
|
inline |
Compares the two floating point numbers in absolute value.
a | The first operand. |
b | The second operand. |
Definition at line 3002 of file arithmetic-gmp.hpp.
|
inline |
Compares the two integers in absolute value.
a | The first operand. |
b | The second operand. |
Definition at line 1806 of file arithmetic-nint.hpp.
void plll::arithmetic::convert | ( | typename DestContext::Type & | dst, |
const SourceType & | src, | ||
const DestContext & | context | ||
) |
Converts the value in src
to the type described by context
and stores the result in dst
.
SourceType | The source type. |
DestContext | The type of the arithmetic context for the destination. |
dst | The destination variable. |
src | The source variable. Can also be a C or C++ string. |
context | The arithmetic context for the destination. |
Definition at line 734 of file arithmetic.hpp.
implementation::conversion_impl<SourceType, DestContext>::RetVal plll::arithmetic::convert | ( | const SourceType & | src, |
const DestContext & | context | ||
) |
Converts the value in src
to the type described by context
and returns the result.
SourceType | The source type. |
DestContext | The type of the arithmetic context for the destination. |
src | The source variable. Can also be a C or C++ string. |
context | The arithmetic context for the destination. |
Definition at line 753 of file arithmetic.hpp.
implementation::nativeconversion_impl2<Native, SourceType, traits::type_traits<Native>::is_inttype || !traits::type_traits<Native>::is_number, traits::type_traits<SourceType>::is_inttype || !traits::type_traits<SourceType>::is_number>::RetVal plll::arithmetic::convert | ( | const SourceType & | src | ) |
Converts the value in src
to the native type Native
and returns the result.
Native | The native type to convert to. Can also be std::string . |
SourceType | The source type. |
src | The source variable. |
Native
.Definition at line 1032 of file arithmetic.hpp.
void plll::arithmetic::convert_ceil | ( | typename DestContext::Type & | dst, |
const SourceType & | src, | ||
const DestContext & | context | ||
) |
Converts the ceil of the value in src
to the type described by context
and stores the result in dst
.
This method is only allowed in case src
is a real type and dst
an integer type.
SourceType | The source type. |
DestContext | The type of the arithmetic context for the destination. |
dst | The destination variable. |
src | The source variable. |
context | The arithmetic context for the destination. |
Definition at line 955 of file arithmetic.hpp.
implementation::conversion_impl<SourceType, DestContext>::RetVal_Ceil plll::arithmetic::convert_ceil | ( | const SourceType & | src, |
const DestContext & | context | ||
) |
Converts the ceil of the value in src
to the type described by context
and returns the result in dst
.
This method is only allowed in case src
is a real type and context
an integer context.
SourceType | The source type. |
DestContext | The type of the arithmetic context for the destination. |
src | The source variable. |
context | The arithmetic context for the destination. |
Definition at line 977 of file arithmetic.hpp.
implementation::nativeconversion_impl2<Native, SourceType, traits::type_traits<Native>::is_inttype || !traits::type_traits<Native>::is_number, traits::type_traits<SourceType>::is_inttype || !traits::type_traits<SourceType>::is_number>::RetVal_Ceil plll::arithmetic::convert_ceil | ( | const SourceType & | src | ) |
Converts the ceil of the value in src
to the native type Native
and returns the result.
Native | The native type to convert to. |
SourceType | The source type. |
src | The source variable. |
Definition at line 1120 of file arithmetic.hpp.
void plll::arithmetic::convert_floor | ( | typename DestContext::Type & | dst, |
const SourceType & | src, | ||
const DestContext & | context | ||
) |
Converts the floor of the value in src
to the type described by context
and stores the result in dst
.
This method is only allowed in case src
is a real type and dst
an integer type.
SourceType | The source type. |
DestContext | The type of the arithmetic context for the destination. |
dst | The destination variable. |
src | The source variable. |
context | The arithmetic context for the destination. |
Definition at line 819 of file arithmetic.hpp.
implementation::conversion_impl<SourceType, DestContext>::RetVal_Floor plll::arithmetic::convert_floor | ( | const SourceType & | src, |
const DestContext & | context | ||
) |
Converts the floor of the value in src
to the type described by context
and returns the result.
This method is only allowed in case src
is a real type and context
an integer context.
SourceType | The source type. |
DestContext | The type of the arithmetic context for the destination. |
src | The source variable. |
context | The arithmetic context for the destination. |
Definition at line 841 of file arithmetic.hpp.
implementation::nativeconversion_impl2<Native, SourceType, traits::type_traits<Native>::is_inttype || !traits::type_traits<Native>::is_number, traits::type_traits<SourceType>::is_inttype || !traits::type_traits<SourceType>::is_number>::RetVal_Floor plll::arithmetic::convert_floor | ( | const SourceType & | src | ) |
Converts the floor of the value in src
to the native type Native
and returns the result.
Native | The native type to convert to. |
SourceType | The source type. |
src | The source variable. |
Definition at line 1052 of file arithmetic.hpp.
void plll::arithmetic::convert_fraction | ( | typename DestContext::Type & | dst, |
const SourceType & | src1, | ||
const SourceType & | src2, | ||
const DestContext & | context | ||
) |
Converts the values in src1
and scr2
to the type described by context
and stores their quotient in dst
.
This method is only allowed in case context
a real context.
SourceType | The source type. |
DestContext | The type of the arithmetic context for the destination. |
dst | The destination variable. |
src1 | The source variable for the numerator. |
src2 | The source variable for the denominator. |
context | The arithmetic context for the destination. |
Definition at line 774 of file arithmetic.hpp.
implementation::conversion_impl<SourceType, DestContext>::RetVal_Frac plll::arithmetic::convert_fraction | ( | const SourceType & | src1, |
const SourceType & | src2, | ||
const DestContext & | context | ||
) |
Converts the values in src1
and scr2
to the type described by context
and returns their quotient.
This method is only allowed in case context
a real context.
SourceType | The source type. |
DestContext | The type of the arithmetic context for the destination. |
src1 | The source variable for the numerator. |
src2 | The source variable for the denominator. |
context | The arithmetic context for the destination. |
Definition at line 797 of file arithmetic.hpp.
void plll::arithmetic::convert_round | ( | typename DestContext::Type & | dst, |
const SourceType & | src, | ||
const DestContext & | context | ||
) |
Converts the rounded value in src
to the type described by context
and stores the result in dst
.
This method is only allowed in case src
is a real type and dst
an integer type.
SourceType | The source type. |
DestContext | The type of the arithmetic context for the destination. |
dst | The destination variable. |
src | The source variable. |
context | The arithmetic context for the destination. |
Definition at line 863 of file arithmetic.hpp.
implementation::conversion_impl<SourceType, DestContext>::RetVal_Round plll::arithmetic::convert_round | ( | const SourceType & | src, |
const DestContext & | context | ||
) |
Converts the rounded value in src
to the type described by context
and returns the result.
This method is only allowed in case src
is a real type and context
an integer context.
SourceType | The source type. |
DestContext | The type of the arithmetic context for the destination. |
src | The source variable. |
context | The arithmetic context for the destination. |
Definition at line 885 of file arithmetic.hpp.
void plll::arithmetic::convert_round | ( | typename DestContext::Type & | dst, |
const SourceType & | src, | ||
bool & | up, | ||
const DestContext & | context | ||
) |
Converts the rounded value in src
to the type described by context
and stores the result in dst
. Stores in up
whether the value was rounded up or down.
This method is only allowed in case src
is a real type and dst
an integer type.
SourceType | The source type. |
DestContext | The type of the arithmetic context for the destination. |
dst | The destination variable. |
src | The source variable. |
up | Will be set to true if src was rounded up, or false if it was rounded down. |
context | The arithmetic context for the destination. |
Definition at line 909 of file arithmetic.hpp.
implementation::conversion_impl<SourceType, DestContext>::RetVal_Round2 plll::arithmetic::convert_round | ( | const SourceType & | src, |
bool & | up, | ||
const DestContext & | context | ||
) |
Converts the rounded value in src
to the type described by context
and returns the result. Stores in up
whether the value was rounded up or down.
This method is only allowed in case src
is a real type and context
an integer context.
SourceType | The source type. |
DestContext | The type of the arithmetic context for the destination. |
src | The source variable. |
up | Will be set to true if src was rounded up, or false if it was rounded down. |
context | The arithmetic context for the destination. |
Definition at line 933 of file arithmetic.hpp.
implementation::nativeconversion_impl2<Native, SourceType, traits::type_traits<Native>::is_inttype || !traits::type_traits<Native>::is_number, traits::type_traits<SourceType>::is_inttype || !traits::type_traits<SourceType>::is_number>::RetVal_Round plll::arithmetic::convert_round | ( | const SourceType & | src | ) |
Converts the rounded value of src
to the native type Native
and returns the result.
Native | The native type to convert to. |
SourceType | The source type. |
src | The source variable. |
Definition at line 1074 of file arithmetic.hpp.
implementation::nativeconversion_impl2<Native, SourceType, traits::type_traits<Native>::is_inttype || !traits::type_traits<Native>::is_number, traits::type_traits<SourceType>::is_inttype || !traits::type_traits<SourceType>::is_number>::RetVal_Round2 plll::arithmetic::convert_round | ( | const SourceType & | src, |
bool & | up | ||
) |
Converts the rounded value of src
to the native type Native
and returns the result. Returns whether the value was rounded up or not in up
.
Native | The native type to convert to. |
SourceType | The source type. |
src | The source variable. |
up | Will be set to true if src was rounded up, or false if it was rounded down. |
Definition at line 1098 of file arithmetic.hpp.
|
inline |
Computes the cosine of a
and stores the result in res
.
res | The result. |
a | The value the function is evaluated at. |
Definition at line 3037 of file arithmetic-gmp.hpp.
|
inline |
Returns the cosine of the given floating point number.
i | The operand. |
Definition at line 1473 of file arithmetic-gmp-rops.hpp.
|
inline |
Returns the cosine of the given floating point number.
i | The operand. |
rc | The context whose precision to use for the result. |
Definition at line 1890 of file arithmetic-gmp-rops.hpp.
|
inline |
Negates a
and stores the result in r
.
r | The result. |
a | The operand. |
Definition at line 1265 of file rational.hpp.
|
inline |
Decrements a
by one and stores the result in r
.
r | The result. |
a | The operand. |
Definition at line 1314 of file arithmetic-gmp.hpp.
|
inline |
Decrements a
by one and stores the result in r
.
r | The result. |
a | The operand. |
Definition at line 1740 of file arithmetic-nint.hpp.
|
inline |
Decrements a
by one and stores the result in r
.
r | The result. |
a | The operand. |
Definition at line 2884 of file arithmetic-gmp.hpp.
|
inline |
Divides a
by b
and stores the result in r
.
r | The result. |
a | The first operand. |
b | The second operand. |
Definition at line 1081 of file rational.hpp.
|
inline |
Divides a
by b
and stores the result in r
.
r | The result. |
a | The first operand. |
b | The second operand. |
Definition at line 1399 of file arithmetic-gmp.hpp.
|
inline |
Divides a
by b
and stores the result in r
.
r | The result. |
a | The first operand. |
b | The second operand. |
Definition at line 1661 of file arithmetic-nint.hpp.
|
inline |
Divides a
by b
and stores the result in r
.
r | The result. |
a | The first operand. |
b | The second operand. |
Definition at line 2693 of file arithmetic-gmp.hpp.
|
inline |
Stores quotient and remainder of the division of a
by b
in q
respectively r
.
q | The quotient. |
r | The remainder. |
a | The first operand. |
b | The second operand. |
Definition at line 1439 of file arithmetic-gmp.hpp.
|
inline |
Stores quotient and remainder of the division of a
by b
in q
respectively r
.
q | The quotient. |
r | The remainder. |
a | The first operand. |
b | The second operand. |
Definition at line 1673 of file arithmetic-nint.hpp.
|
inline |
Stores quotient and remainder of the division of a
by b
in q
respectively r
.
q | The quotient. |
r | The remainder. |
a | The first operand. |
b | The second operand. |
Definition at line 2787 of file arithmetic-gmp.hpp.
|
inline |
Computes an Euclidean Division of a
by b
.
q | The quotient of a divided by b . |
r | The remainder of a divided by b , i.e. a modulo b . |
a | The first operand. |
b | The second operand. Must be non-zero. |
Computes q
and r
such that a == q * b + r
and that and .
Definition at line 1646 of file arithmetic-gmp.hpp.
|
inline |
Computes an Euclidean Division of a
by b
.
q | The quotient of a divided by b . |
r | The remainder of a divided by b , i.e. a modulo b . |
a | The first operand. |
b | The second operand. Must be non-zero. |
Computes q
and r
such that a == q * b + r
and that and .
Definition at line 2238 of file arithmetic-nint.hpp.
|
inline |
Computes an Euclidean Division of a
by b
.
q | The quotient of a divided by b . |
r | The remainder of a divided by b , i.e. a modulo b . |
a | The first operand. |
b | The second operand. Must be non-zero. |
Computes q
and r
such that a == q * b + r
and that .
Definition at line 1652 of file arithmetic-gmp.hpp.
|
inline |
Computes an Euclidean Division of a
by b
.
q | The quotient of a divided by b . |
r | The remainder of a divided by b , i.e. a modulo b . |
a | The first operand. |
b | The second operand. Must be non-zero. |
Computes q
and r
such that a == q * b + r
and that .
Definition at line 2246 of file arithmetic-nint.hpp.
|
inline |
Computes the exponential function at a
and stores the result in res
.
res | The result. |
a | The value the function is evaluated at. |
Definition at line 3094 of file arithmetic-gmp.hpp.
|
inline |
Returns the exponential function evaluated at the given floating point number.
i | The operand. |
Definition at line 1548 of file arithmetic-gmp-rops.hpp.
|
inline |
Returns the exponential function evaluated at the given floating point number.
i | The operand. |
rc | The context whose precision to use for the result. |
rc | The context whose precision to use for the result. |
Definition at line 1972 of file arithmetic-gmp-rops.hpp.
void plll::arithmetic::floorDiv | ( | Integer & | r, |
const Integer & | a, | ||
const Integer & | b | ||
) |
Computes and stores the result in r
.
r | The result. |
a | The divident. |
b | The divisor. |
Definition at line 1519 of file arithmetic-gmp.hpp.
void plll::arithmetic::floorDiv | ( | NInt< Type > & | r, |
const NInt< Type > & | a, | ||
const NInt< Type > & | b | ||
) |
Computes and stores the result in r
.
r | The result. |
a | The divident. |
b | The divisor. |
Definition at line 2175 of file arithmetic-nint.hpp.
NInt< Type > plll::arithmetic::floorDiv | ( | const NInt< Type > & | a, |
const NInt< Type > & | b | ||
) |
Computes and returns .
a | The divident. |
b | The divisor. |
Definition at line 2188 of file arithmetic-nint.hpp.
|
inline |
Computes and returns .
a | The base. |
b | The exponent. |
Definition at line 1583 of file arithmetic-gmp-iops.hpp.
long plll::arithmetic::floorOfLog2 | ( | const Integer & | x | ) |
Computes and returns .
x | A non-zero integer. |
Definition at line 1805 of file arithmetic-gmp.hpp.
long plll::arithmetic::floorOfLog2 | ( | const NInt< Type > & | x | ) |
Computes and returns .
x | A non-zero integer. |
Definition at line 1982 of file arithmetic-nint.hpp.
|
inline |
Computes the Gamma function at a
and stores the result in res
.
res | The result. |
a | The value the function is evaluated at. |
Definition at line 3139 of file arithmetic-gmp.hpp.
|
inline |
Returns the Gamma function evaluated at the given floating point number.
i | The operand. |
Definition at line 1607 of file arithmetic-gmp-rops.hpp.
|
inline |
Returns the Gamma function evaluated at the given floating point number.
i | The operand. |
rc | The context whose precision to use for the result. |
Definition at line 2036 of file arithmetic-gmp-rops.hpp.
|
inline |
Computes the non-negative Greatest Common Divisior r
of x
and y
.
r | The result is stored in here. |
x | The first operand. |
y | The first operand. |
Definition at line 1658 of file arithmetic-gmp.hpp.
|
inline |
Computes the non-negative Greatest Common Divisior r
of x
and y
.
r | The result is stored in here. |
x | The first operand. |
y | The first operand. |
Definition at line 2260 of file arithmetic-nint.hpp.
|
inline |
Computes and returns the non-negative Greatest Common Divisior of x
and y
.
x
and y
. x | The first operand. |
y | The first operand. |
Definition at line 2278 of file arithmetic-nint.hpp.
|
inline |
Computes and returns the non-negative Greatest Common Divisor of a
and b
.
a | The first operand. |
b | The second operand. |
Definition at line 1536 of file arithmetic-gmp-iops.hpp.
|
inline |
Increments a
by one and stores the result in r
.
r | The result. |
a | The operand. |
Definition at line 1258 of file rational.hpp.
|
inline |
Increments a
by one and stores the result in r
.
r | The result. |
a | The operand. |
Definition at line 1309 of file arithmetic-gmp.hpp.
|
inline |
Increments a
by one and stores the result in r
.
r | The result. |
a | The operand. |
Definition at line 1734 of file arithmetic-nint.hpp.
|
inline |
Increments a
by one and stores the result in r
.
r | The result. |
a | The operand. |
Definition at line 2875 of file arithmetic-gmp.hpp.
void plll::arithmetic::initArithmeticThreadAllocators | ( | ) |
Initializes the local thread allocator for the current thread, and sets the GMP and MPFR allocators to the local thread allocator.
This function must be called at the beginning of each thread (and, most importantly, of the process itself!) before any plll::arithmetic::Integer
or pll::arithmetic::Real
variable was initialized.
Violation of this will quite surely lead to crashes and/or segmentation faults.
|
inline |
Tests the given rational number for being strictly negative.
true
if and only if the argument is strictly negative. Definition at line 829 of file rational.hpp.
|
inline |
Tests the given plll::arithmetic::Integer
object for being strictly negative.
true
if and only if the argument is strictly negative. Definition at line 1631 of file arithmetic-gmp.hpp.
|
inline |
Tests the given plll::arithmetic::Real
object for being strictly negative.
true
if and only if the argument is strictly negative. Definition at line 2432 of file arithmetic-gmp.hpp.
|
inline |
Tests the given plll::arithmetic::Integer
object for being strictly negative.
true
if and only if the argument is strictly negative. Definition at line 1617 of file arithmetic-nint.hpp.
|
inline |
Tests the given rational number for being positive or zero.
true
if and only if the argument is positive or zero. Definition at line 824 of file rational.hpp.
|
inline |
Tests the given plll::arithmetic::Integer
object for being positive or zero.
true
if and only if the argument is positive or zero. Definition at line 1626 of file arithmetic-gmp.hpp.
|
inline |
Tests the given plll::arithmetic::Real
object for being positive or zero.
true
if and only if the argument is positive or zero. Definition at line 2426 of file arithmetic-gmp.hpp.
|
inline |
Tests the given plll::arithmetic::Integer
object for being positive or zero.
true
if and only if the argument is positive or zero. Definition at line 1610 of file arithmetic-nint.hpp.
|
inline |
Tests the given rational number for being negative or zero.
true
if and only if the argument is negative or zero. Definition at line 834 of file rational.hpp.
|
inline |
Tests the given plll::arithmetic::Integer
object for being negative or zero.
true
if and only if the argument is negative or zero. Definition at line 1636 of file arithmetic-gmp.hpp.
|
inline |
Tests the given plll::arithmetic::Real
object for being negative or zero.
true
if and only if the argument is negative or zero. Definition at line 2438 of file arithmetic-gmp.hpp.
|
inline |
Tests the given plll::arithmetic::Integer
object for being negative or zero.
true
if and only if the argument is negative or zero. Definition at line 1624 of file arithmetic-nint.hpp.
|
inline |
Tests the given plll::arithmetic::Real
object for being zero.
true
if and only if the argument is zero. Definition at line 814 of file rational.hpp.
|
inline |
Tests the given plll::arithmetic::Integer
object for being one.
true
if and only if the argument is one. Definition at line 1606 of file arithmetic-gmp.hpp.
|
inline |
Tests the given plll::arithmetic::Real
object for being one.
true
if and only if the argument is one. Definition at line 2414 of file arithmetic-gmp.hpp.
|
inline |
Tests the given plll::arithmetic::Integer
object for being one.
true
if and only if the argument is one. Definition at line 1582 of file arithmetic-nint.hpp.
|
inline |
Tests the given plll::arithmetic::Integer
object for being one or minus one.
true
if and only if the argument is . Definition at line 1611 of file arithmetic-gmp.hpp.
|
inline |
Tests the given plll::arithmetic::Integer
object for being one or minus one.
true
if and only if the argument is . Definition at line 1589 of file arithmetic-nint.hpp.
|
inline |
Tests the given plll::arithmetic::Integer
object for being two or minus two.
true
if and only if the argument is . Definition at line 1616 of file arithmetic-gmp.hpp.
|
inline |
Tests the given plll::arithmetic::Integer
object for being two or minus two.
true
if and only if the argument is . Definition at line 1596 of file arithmetic-nint.hpp.
|
inline |
Tests the given rational number for being strictly positive.
true
if and only if the argument is strictly positive. Definition at line 819 of file rational.hpp.
|
inline |
Tests the given plll::arithmetic::Integer
object for being strictly positive.
true
if and only if the argument is strictly positive. Definition at line 1621 of file arithmetic-gmp.hpp.
|
inline |
Tests the given plll::arithmetic::Real
object for being strictly positive.
true
if and only if the argument is strictly positive. Definition at line 2420 of file arithmetic-gmp.hpp.
|
inline |
Tests the given plll::arithmetic::Integer
object for being strictly positive.
true
if and only if the argument is strictly positive. Definition at line 1603 of file arithmetic-nint.hpp.
|
inline |
Tests the given rational number for being zero.
true
if and only if the argument is zero. Definition at line 809 of file rational.hpp.
|
inline |
Tests the given plll::arithmetic::Integer
object for being zero.
true
if and only if the argument is zero. Definition at line 1601 of file arithmetic-gmp.hpp.
|
inline |
Tests the given plll::arithmetic::Real
object for being zero.
true
if and only if the argument is zero. Definition at line 2408 of file arithmetic-gmp.hpp.
|
inline |
Tests the given plll::arithmetic::Integer
object for being zero.
true
if and only if the argument is zero. Definition at line 1575 of file arithmetic-nint.hpp.
|
inline |
Computes the non-negative Least Common Multiple r
of x
and y
.
r | The result is stored in here. |
x | The first operand. |
y | The first operand. |
Definition at line 1682 of file arithmetic-gmp.hpp.
|
inline |
Computes the non-negative Least Common Multiple r
of x
and y
.
r | The result is stored in here. |
x | The first operand. |
y | The first operand. |
Definition at line 2330 of file arithmetic-nint.hpp.
|
inline |
Computes and returns the non-negative Least Common Multiple of x
and y
.
x
and y
. x | The first operand. |
y | The first operand. |
Definition at line 2337 of file arithmetic-nint.hpp.
|
inline |
Computes and returns the non-negative Least Common Multiple of a
and b
.
a | The first operand. |
b | The second operand. |
Definition at line 1549 of file arithmetic-gmp-iops.hpp.
|
inline |
Computes the logarithm of the absolute value of the Gamma function at a
and stores the result in res
.
res | The result. |
a | The value the function is evaluated at. |
Definition at line 3148 of file arithmetic-gmp.hpp.
|
inline |
Computes the logarithm of the absolute value of the Gamma function at a
and stores the result in res
. The sign of the Gamma function at a
is stored in sign
.
res | The result. |
sign | Will be set to 1 if and -1 otherwise. |
a | The value the function is evaluated at. |
Definition at line 3158 of file arithmetic-gmp.hpp.
|
inline |
Returns the natural logarithm of the absolute value of the Gamma function evaluated at the given floating point number.
i | The operand. |
Definition at line 1619 of file arithmetic-gmp-rops.hpp.
|
inline |
Returns the natural logarithm of the absolute value of the Gamma function evaluated at the given floating point number, as well as the sign of the Gamma function.
sign | The integer variable to store the sign of in. |
i | The operand. |
Definition at line 1633 of file arithmetic-gmp-rops.hpp.
|
inline |
Returns the natural logarithm of the absolute value of the Gamma function evaluated at the given floating point number.
i | The operand. |
rc | The context whose precision to use for the result. |
Definition at line 2049 of file arithmetic-gmp-rops.hpp.
|
inline |
Returns the natural logarithm of the absolute value of the Gamma function evaluated at the given floating point number, as well as the sign of the Gamma function.
sign | The integer variable to store the sign of in. |
i | The operand. |
rc | The context whose precision to use for the result. |
Definition at line 2064 of file arithmetic-gmp-rops.hpp.
|
inline |
Computes the natural logarithm of a
and stores the result in res
.
res | The result. |
a | The value the function is evaluated at. |
Definition at line 3103 of file arithmetic-gmp.hpp.
|
inline |
Returns the natural logarithm evaluated at the given floating point number.
i | The operand. |
Definition at line 1559 of file arithmetic-gmp-rops.hpp.
|
inline |
Returns the natural logarithm evaluated at the given floating point number.
i | The operand. |
rc | The context whose precision to use for the result. |
Definition at line 1984 of file arithmetic-gmp-rops.hpp.
|
inline |
Computes the logarithm of a
to base 10 and stores the result in res
.
res | The result. |
a | The value the function is evaluated at. |
Definition at line 3121 of file arithmetic-gmp.hpp.
|
inline |
Returns the base-10 logarithm evaluated at the given floating point number.
i | The operand. |
Definition at line 1581 of file arithmetic-gmp-rops.hpp.
|
inline |
Returns the base-10 logarithm evaluated at the given floating point number.
i | The operand. |
rc | The context whose precision to use for the result. |
Definition at line 2008 of file arithmetic-gmp-rops.hpp.
|
inline |
Computes the logarithm of a
to base 2 and stores the result in res
.
res | The result. |
a | The value the function is evaluated at. |
Definition at line 3112 of file arithmetic-gmp.hpp.
|
inline |
Returns the base-2 logarithm evaluated at the given floating point number.
i | The operand. |
Definition at line 1570 of file arithmetic-gmp-rops.hpp.
|
inline |
Returns the base-2 logarithm evaluated at the given floating point number.
i | The operand. |
rc | The context whose precision to use for the result. |
Definition at line 1996 of file arithmetic-gmp-rops.hpp.
|
inline |
Makes the operand non-negative.
a | The operand. |
Definition at line 1298 of file rational.hpp.
|
inline |
Makes the operand non-negative.
a | The operand. |
Definition at line 1641 of file arithmetic-gmp.hpp.
|
inline |
Makes the operand non-negative.
a | The operand. |
Definition at line 2911 of file arithmetic-gmp.hpp.
|
inline |
Makes the operand non-negative.
a | The operand. |
Definition at line 1764 of file arithmetic-nint.hpp.
|
inline |
Takes the remainder of the division of a
by b
and stores it in r
.
r | The result. |
a | The first operand. |
b | The second operand. |
Definition at line 1171 of file rational.hpp.
|
inline |
Takes the remainder of the division of a
by b
and stores it in r
.
r | The result. |
a | The first operand. |
b | The second operand. |
Definition at line 1422 of file arithmetic-gmp.hpp.
|
inline |
Takes the remainder of the division of a
by b
and stores it in r
.
r | The result. |
a | The first operand. |
b | The second operand. |
Definition at line 2775 of file arithmetic-gmp.hpp.
|
inline |
Takes the remainder of the division of a
by b
and stores it in r
.
r | The result. |
a | The first operand. |
b | The second operand. |
Definition at line 1667 of file arithmetic-nint.hpp.
|
inline |
Multiplies a
with b
and stores the result in r
.
r | The result. |
a | The first operand. |
b | The second operand. |
Definition at line 1008 of file rational.hpp.
|
inline |
Multiplies a
with b
and stores the result in r
.
r | The result. |
a | The first operand. |
b | The second operand. |
Definition at line 1377 of file arithmetic-gmp.hpp.
|
inline |
Multiplies a
with b
and stores the result in r
.
r | The result. |
a | The first operand. |
b | The second operand. |
Definition at line 1655 of file arithmetic-nint.hpp.
|
inline |
Multiplies a
with b
and stores the result in r
.
r | The result. |
a | The first operand. |
b | The second operand. |
Definition at line 2641 of file arithmetic-gmp.hpp.
|
inline |
Negates a
and stores the result in r
.
r | The result. |
a | The operand. |
Definition at line 1272 of file rational.hpp.
|
inline |
Negates a
and stores the result in r
.
r | The result. |
a | The operand. |
Definition at line 1394 of file arithmetic-gmp.hpp.
|
inline |
Negates a
and stores the result in r
.
r | The result. |
a | The operand. |
Definition at line 1746 of file arithmetic-nint.hpp.
|
inline |
Negates a
and stores the result in r
.
r | The result. |
a | The operand. |
Definition at line 2893 of file arithmetic-gmp.hpp.
|
inline |
Compares the current integer with the given one for inequality.
a | The first operand. |
b | The second operand. |
true
if a
does not equal b
. Definition at line 1545 of file arithmetic-nint.hpp.
|
inline |
Compares the two rational numbers a
and b
for inequality.
a | The first operand. |
b | The second operand. |
true
if and only if a
does not equal b
. Definition at line 457 of file rational-ops.hpp.
|
inline |
Compares the two floating point numbers a
and b
for inequality.
a | The first operand. |
b | The second operand. |
true
if and only if a
does not equal b
. Definition at line 944 of file arithmetic-gmp-rops.hpp.
|
inline |
Compares the current integer with the given one for inequality.
a | The first operand. |
b | The second operand. |
true
if a
does not equal b
. Definition at line 1155 of file arithmetic-gmp-iops.hpp.
|
inline |
Divides the first by the second integer and returns the remainder.
a | The first operand. |
b | The second operand. |
Definition at line 1412 of file arithmetic-nint.hpp.
|
inline |
Divides the first by the second integer and returns the remainder.
a | The first operand. |
b | The second operand. |
Definition at line 327 of file arithmetic-gmp-iops.hpp.
|
inline |
Divides the first by the second floating point number and returns the remainder.
a | The first operand. |
b | The second operand. |
Definition at line 410 of file arithmetic-gmp-rops.hpp.
|
inline |
Returns the remainder of this rational number divided by the by the argument.
a | The first operand. |
b | The second operand. |
Definition at line 812 of file rational-ops.hpp.
|
inline |
Divides this rational number by the given rational number r
and stores the remainder in this rational number.
cur | The rational number to work on. |
r | The rational number to divide by. |
Definition at line 297 of file rational-ops.hpp.
|
inline |
Divides cur
by the given integer i
and stores the remainder in cur
.
cur | The integer to operate on. |
i | The integer to divide by. |
cur
containing the result. Definition at line 1446 of file arithmetic-nint.hpp.
|
inline |
Divides cur
by the given floating point number r
and stores the remainder in cur
.
cur | The floating point number to operate on. |
r | The floating point number to divide by. |
cur
containing the result. Definition at line 801 of file arithmetic-gmp-rops.hpp.
|
inline |
Divides cur
by the given integer i
and stores the remainder in cur
.
cur | The integer to operate on. |
i | The integer to divide by. |
cur
containing the result. Definition at line 897 of file arithmetic-gmp-iops.hpp.
|
inline |
Computes the bitwise and of the two integers and returns the result.
a | The first operand. |
b | The second operand. |
Definition at line 341 of file arithmetic-gmp-iops.hpp.
|
inline |
Computes the bitwise and of cur
with i
and stores the result in cur
.
cur | The integer to operate on. |
i | The second operand. |
cur
containing the result. Definition at line 923 of file arithmetic-gmp-iops.hpp.
|
inline |
Multiplies the two integers and returns the result.
a | The first operand. |
b | The second operand. |
Definition at line 1400 of file arithmetic-nint.hpp.
|
inline |
Multiplies the two integers and returns the result.
a | The first operand. |
b | The second operand. |
Definition at line 299 of file arithmetic-gmp-iops.hpp.
|
inline |
Multiplies the two floating point numbers and returns the result.
a | The first operand. |
b | The second operand. |
Definition at line 382 of file arithmetic-gmp-rops.hpp.
|
inline |
Multiplies the argument with this rational number and returns the result.
a | The first operand. |
b | The second operand. |
Definition at line 784 of file rational-ops.hpp.
|
inline |
Multiplies the given rational number r
with this rational number.
cur | The rational number to work on. |
r | The rational number to multiply to this rational number. |
Definition at line 270 of file rational-ops.hpp.
|
inline |
Multiplies the given integer i
with cur
.
cur | The integer to operate on. |
i | The integer to multiply to cur . |
cur
containing the result. Definition at line 1432 of file arithmetic-nint.hpp.
|
inline |
Multiplies the given floating point number r
with cur
.
cur | The floating point number to operate on. |
r | The floating point number to multiply to cur . |
cur
containing the result. Definition at line 774 of file arithmetic-gmp-rops.hpp.
|
inline |
Multiplies the given integer i
with cur
.
cur | The integer to operate on. |
i | The integer to multiply to cur . |
cur
containing the result. Definition at line 870 of file arithmetic-gmp-iops.hpp.
|
inline |
Adds the two integers and returns the result.
a | The first operand. |
b | The second operand. |
Definition at line 271 of file arithmetic-gmp-iops.hpp.
|
inline |
Adds the two integers and returns the result.
a | The first operand. |
b | The second operand. |
Definition at line 1388 of file arithmetic-nint.hpp.
|
inline |
Adds the two floating point numbers and returns the result.
a | The first operand. |
b | The second operand. |
Definition at line 354 of file arithmetic-gmp-rops.hpp.
|
inline |
Adds the argument to this rational number and returns the result.
a | The first operand. |
b | The second operand. |
Definition at line 757 of file rational-ops.hpp.
|
inline |
Increments the integer by one and returns the previous value.
cur | The integer to work on. |
Definition at line 1481 of file arithmetic-nint.hpp.
|
inline |
Increments the integer by one and returns the new value.
cur | The integer to work on. |
cur
). Definition at line 1493 of file arithmetic-nint.hpp.
|
inline |
Increments this rational number by one and returns the previous value.
cur | The rational number to work on. |
Definition at line 388 of file rational-ops.hpp.
|
inline |
Increments this rational number by one and returns the new value.
cur | The rational number to work on. |
Definition at line 414 of file rational-ops.hpp.
|
inline |
Increments the integer by one and returns the previous value.
cur | The integer to work on. |
Definition at line 753 of file arithmetic-gmp-iops.hpp.
|
inline |
Increments the integer by one and returns the new value.
cur | The integer to work on. |
cur
). Definition at line 779 of file arithmetic-gmp-iops.hpp.
|
inline |
Increments cur
by one and returns the previous value.
cur | The floating point number to operate on. |
Definition at line 875 of file arithmetic-gmp-rops.hpp.
|
inline |
Increments cur
by one and returns the new value.
cur | The floating point number to operate on. |
Definition at line 901 of file arithmetic-gmp-rops.hpp.
|
inline |
Adds the given rational number r
to this rational number.
cur | The rational number to work on. |
r | The rational number to add to this rational number. |
Definition at line 240 of file rational-ops.hpp.
|
inline |
Adds the given multiplication expression to this rational number.
Note that the faster addmul()
command is used for this special case where the product of two rational numbers is added to a third one.
cur | The rational number to work on. |
E | The multiplication expression to add to this rational number. |
Definition at line 257 of file rational-ops.hpp.
|
inline |
Adds the integer i
to cur
.
cur | The integer to operate on. |
i | The integer to add to cur . |
cur
containing the result. Definition at line 1425 of file arithmetic-nint.hpp.
|
inline |
Adds the floating point number r
to cur
.
cur | The floating point number to operate on. |
r | The floating point number to add to cur . |
cur
containing the result. Definition at line 744 of file arithmetic-gmp-rops.hpp.
|
inline |
Adds the given multiplication expression to cur
.
Note that the faster addmul()
command is used for this special case where the product of two floating point numbers is added to a third one.
cur | The floating point number to operate on. |
E | The multiplication expression to add to cur . |
cur
containing the result. Definition at line 761 of file arithmetic-gmp-rops.hpp.
|
inline |
Adds the given multiplication expression to cur
.
Note that the faster addmul()
command is used for this special case where the product of two integers is added to a third one.
cur | The integer to operate on. |
E | The multiplication expression to add to cur . |
cur
containing the result. Definition at line 844 of file arithmetic-gmp-iops.hpp.
|
inline |
Adds the integer i
to cur
.
cur | The integer to operate on. |
i | The integer to add to cur . |
cur
containing the result. Definition at line 857 of file arithmetic-gmp-iops.hpp.
|
inline |
Negates the integer.
a | The integer. |
Definition at line 249 of file arithmetic-gmp-iops.hpp.
|
inline |
Negates the integer.
a | The integer. |
Definition at line 1382 of file arithmetic-nint.hpp.
|
inline |
Subtracts the second from the first integer and returns the result.
a | The first operand. |
b | The second operand. |
Definition at line 285 of file arithmetic-gmp-iops.hpp.
|
inline |
Subtracts the second from the first integer and returns the result.
a | The first operand. |
b | The second operand. |
Definition at line 1394 of file arithmetic-nint.hpp.
|
inline |
Negates the floating point number.
a | The floating point number. |
Definition at line 342 of file arithmetic-gmp-rops.hpp.
|
inline |
Subtracts the second from the first floating point number and returns the result.
a | The first operand. |
b | The second operand. |
Definition at line 368 of file arithmetic-gmp-rops.hpp.
|
inline |
Negates this rational number.
a | The operand. |
Definition at line 745 of file rational-ops.hpp.
|
inline |
Subtracts the argument from this rational number and returns the result.
a | The first operand. |
b | The second operand. |
Definition at line 770 of file rational-ops.hpp.
|
inline |
Decrements the integer by one and returns the previous value.
cur | The integer to work on. |
Definition at line 1487 of file arithmetic-nint.hpp.
|
inline |
Decreases the integer by one and returns the new value.
cur | The integer to work on. |
cur
). Definition at line 1500 of file arithmetic-nint.hpp.
|
inline |
Decrements this rational number by one and returns the previous value.
cur | The rational number to work on. |
Definition at line 401 of file rational-ops.hpp.
|
inline |
Decrements this rational number by one and returns the new value.
cur | The rational number to work on. |
Definition at line 426 of file rational-ops.hpp.
|
inline |
Decrements the integer by one and returns the previous value.
cur | The integer to work on. |
Definition at line 766 of file arithmetic-gmp-iops.hpp.
|
inline |
Decreases the integer by one and returns the new value.
cur | The integer to work on. |
cur
). Definition at line 791 of file arithmetic-gmp-iops.hpp.
|
inline |
Decrements cur
by one and returns the previous value.
cur | The floating point number to operate on. |
Definition at line 888 of file arithmetic-gmp-rops.hpp.
|
inline |
Decrements cur
by one and returns the new value.
cur | The floating point number to operate on. |
Definition at line 913 of file arithmetic-gmp-rops.hpp.
|
inline |
Subtracts the given rational number r
from this rational number.
cur | The rational number to work on. |
r | The rational number to subtract from this rational number. |
Definition at line 210 of file rational-ops.hpp.
|
inline |
Subtracts the given multiplication expression from this rational number.
Note that the faster submul()
command is used for this special case where the product of two rational numbers is subtracted from a third one.
cur | The rational number to work on. |
E | The multiplication expression to subtract from this rational number. |
Definition at line 227 of file rational-ops.hpp.
|
inline |
Subtracts the integer i
from cur
.
cur | The integer to operate on. |
i | The integer to subtract from cur . |
cur
containing the result. Definition at line 1418 of file arithmetic-nint.hpp.
|
inline |
Subtracts the floating point number r
from cur
.
cur | The floating point number to operate on. |
r | The floating point number to subtract from cur . |
cur
containing the result. Definition at line 714 of file arithmetic-gmp-rops.hpp.
|
inline |
Subtracts the multiplication expression E
from cur
.
Note that the faster submul()
command is used for this special case where the product of two floating point numbers is subtracted from a third one.
cur | The floating point number to operate on. |
E | The multiplication expression to subtract from cur . |
cur
containing the result. Definition at line 731 of file arithmetic-gmp-rops.hpp.
|
inline |
Subtracts the multiplication expression E
from cur
.
Note that the faster submul()
command is used for this special case where the product of two integers is subtracted from a third one.
cur | The integer to operate on. |
E | The multiplication expression to subtract from cur . |
cur
containing the result. Definition at line 814 of file arithmetic-gmp-iops.hpp.
|
inline |
Subtracts the integer i
from cur
.
cur | The integer to operate on. |
i | The integer to subtract from cur . |
cur
containing the result. Definition at line 827 of file arithmetic-gmp-iops.hpp.
|
inline |
Divides the first by the second integer and returns the result.
a | The first operand. |
b | The second operand. |
Definition at line 1406 of file arithmetic-nint.hpp.
|
inline |
Divides the first by the second integer and returns the result.
a | The first operand. |
b | The second operand. |
Definition at line 313 of file arithmetic-gmp-iops.hpp.
|
inline |
Divides the first by the second floating point number and returns the result.
a | The first operand. |
b | The second operand. |
Definition at line 396 of file arithmetic-gmp-rops.hpp.
|
inline |
Divides this rational number by the argument and returns the result.
a | The first operand. |
b | The second operand. |
Definition at line 798 of file rational-ops.hpp.
|
inline |
Divides this rational number by the given rational number r
.
cur | The rational number to work on. |
r | The rational number to divide by. |
Definition at line 283 of file rational-ops.hpp.
|
inline |
Divides cur
by the given integer i
.
cur | The integer to operate on. |
i | The integer to divide by. |
cur
containing the result. Definition at line 1439 of file arithmetic-nint.hpp.
|
inline |
Divides cur
by the given floating point number r
.
cur | The floating point number to operate on. |
r | The floating point number to divide by. |
cur
containing the result. Definition at line 787 of file arithmetic-gmp-rops.hpp.
|
inline |
Divides cur
by the given integer i
.
cur | The integer to operate on. |
i | The integer to divide by. |
cur
containing the result. Definition at line 883 of file arithmetic-gmp-iops.hpp.
|
inline |
Compares the current integer with the given one.
a | The first operand. |
b | The second operand. |
true
if a
is less than b
. Definition at line 1563 of file arithmetic-nint.hpp.
|
inline |
Compares the two rational numbers a
and b
.
a | The first operand. |
b | The second operand. |
true
if and only if a
is less than b
. Definition at line 493 of file rational-ops.hpp.
|
inline |
Compares the two floating point numbers a
and b
.
a | The first operand. |
b | The second operand. |
true
if and only if a
is less than b
. Definition at line 980 of file arithmetic-gmp-rops.hpp.
|
inline |
Compares the current integer with the given one.
a | The first operand. |
b | The second operand. |
true
if a
is less than b
. Definition at line 1188 of file arithmetic-gmp-iops.hpp.
|
inline |
Computes the bitwise left shift of the first integer by the number of bits given by the second integer, and returns the result.
This effectively multiplies the first integer by 2 to the power of the second integer.
a | The first operand. |
b | The second operand. |
Definition at line 1507 of file arithmetic-nint.hpp.
|
inline |
Computes the bitwise left shift of the first integer by the number of bits given by the second integer, and returns the result.
This effectively multiplies the first integer by 2 to the power of the second integer.
a | The first operand. |
b | The second operand. |
Definition at line 1523 of file arithmetic-nint.hpp.
|
inline |
Computes the bitwise left shift of the first integer by the number of bits given by the second integer, and returns the result.
This effectively multiplies the first integer by 2 to the power of the second integer.
a | The first operand. |
b | The second operand. |
Definition at line 386 of file arithmetic-gmp-iops.hpp.
|
inline |
Computes the bitwise left shift of the first integer by the number of bits given by the second integer, and returns the result.
This effectively multiplies the first integer by 2 to the power of the second integer.
a | The first operand. |
b | The second operand. |
Definition at line 420 of file arithmetic-gmp-iops.hpp.
|
inline |
Multiplies a
with 2 to the power of b
and returns the result.
a | The first operand. |
b | The second operand. |
Definition at line 426 of file arithmetic-gmp-rops.hpp.
|
inline |
Multiplies a
with 2 to the power of b
and returns the result.
a | The first operand. |
b | The second operand. |
Definition at line 457 of file arithmetic-gmp-rops.hpp.
|
inline |
Multiplies this rational number with 2 to the power of b
and returns the result.
a | The first operand. |
b | The second operand. |
Definition at line 826 of file rational-ops.hpp.
|
inline |
Multiplies this rational number by 2 to the power of r
.
cur | The rational number to work on. |
r | The exponent. |
Definition at line 310 of file rational-ops.hpp.
|
inline |
Computes the bitwise left shift of cur
by i
bits, and stores the result in cur
.
This effectively multiplies cur
by 2 to the power of i
.
cur | The integer to operate on. |
i | The second operand. |
cur
containing the result. Definition at line 1453 of file arithmetic-nint.hpp.
|
inline |
Computes the bitwise left shift of cur
by i
bits, and stores the result in cur
.
This effectively multiplies cur
by 2 to the power of i
.
cur | The integer to operate on. |
i | The second operand. |
cur
containing the result. Definition at line 1467 of file arithmetic-nint.hpp.
|
inline |
Multiplies cur
by 2 to the power of r
.
cur | The floating point number to operate on. |
r | The exponent. |
cur
containing the result.Definition at line 816 of file arithmetic-gmp-rops.hpp.
|
inline |
Multiplies cur
by 2 to the power of r
.
cur | The floating point number to operate on. |
r | The exponent. |
cur
containing the result. Definition at line 844 of file arithmetic-gmp-rops.hpp.
|
inline |
Computes the bitwise left shift of cur
by i
bits, and stores the result in cur
.
This effectively multiplies cur
by 2 to the power of i
.
cur | The integer to operate on. |
i | The second operand. |
cur
containing the result. Definition at line 953 of file arithmetic-gmp-iops.hpp.
|
inline |
Computes the bitwise left shift of cur
by i
bits, and stores the result in cur
.
This effectively multiplies cur
by 2 to the power of i
.
cur | The integer to operate on. |
i | The second operand. |
cur
containing the result. Definition at line 985 of file arithmetic-gmp-iops.hpp.
|
inline |
Compares the current integer with the given one.
a | The first operand. |
b | The second operand. |
true
if a
is less than or equal to b
. Definition at line 1551 of file arithmetic-nint.hpp.
|
inline |
Compares the two rational numbers a
and b
.
a | The first operand. |
b | The second operand. |
true
if and only if a
is less than or equal to b
. Definition at line 469 of file rational-ops.hpp.
|
inline |
Compares the two floating point numbers a
and b
.
a | The first operand. |
b | The second operand. |
true
if and only if a
is less than or equal to b
. Definition at line 956 of file arithmetic-gmp-rops.hpp.
|
inline |
Compares the current integer with the given one.
a | The first operand. |
b | The second operand. |
true
if a
is less than or equal to b
. Definition at line 1166 of file arithmetic-gmp-iops.hpp.
|
inline |
Compares the current integer with the given one for equality.
a | The first operand. |
b | The second operand. |
true
if a
equals b
. Definition at line 1539 of file arithmetic-nint.hpp.
|
inline |
Compares the two rational numbers a
and b
for equality.
a | The first operand. |
b | The second operand. |
true
if and only if a
equals b
. Definition at line 445 of file rational-ops.hpp.
|
inline |
Compares the two floating point numbers a
and b
for equality.
a | The first operand. |
b | The second operand. |
true
if and only if a
equals b
. Definition at line 932 of file arithmetic-gmp-rops.hpp.
|
inline |
Compares the current integer with the given one for equality.
a | The first operand. |
b | The second operand. |
true
if a
equals b
. Definition at line 1144 of file arithmetic-gmp-iops.hpp.
|
inline |
Compares the current integer with the given one.
a | The first operand. |
b | The second operand. |
true
if a
is greater than b
. Definition at line 1569 of file arithmetic-nint.hpp.
|
inline |
Compares the two rational numbers a
and b
.
a | The first operand. |
b | The second operand. |
true
if and only if a
is greater than b
. Definition at line 505 of file rational-ops.hpp.
|
inline |
Compares the two floating point numbers a
and b
.
a | The first operand. |
b | The second operand. |
true
if and only if a
is greater than b
. Definition at line 992 of file arithmetic-gmp-rops.hpp.
|
inline |
Compares the current integer with the given one.
a | The first operand. |
b | The second operand. |
true
if a
is greater than b
. Definition at line 1199 of file arithmetic-gmp-iops.hpp.
|
inline |
Compares the current integer with the given one.
a | The first operand. |
b | The second operand. |
true
if a
is greater than or equal to b
. Definition at line 1557 of file arithmetic-nint.hpp.
|
inline |
Compares the two rational numbers a
and b
.
a | The first operand. |
b | The second operand. |
true
if and only if a
is greater than or equal to b
. Definition at line 481 of file rational-ops.hpp.
|
inline |
Compares the two floating point numbers a
and b
.
a | The first operand. |
b | The second operand. |
true
if and only if a
is greater than or equal to b
. Definition at line 968 of file arithmetic-gmp-rops.hpp.
|
inline |
Compares the current integer with the given one.
a | The first operand. |
b | The second operand. |
true
if a
is greater than or equal to b
. Definition at line 1177 of file arithmetic-gmp-iops.hpp.
|
inline |
Computes the bitwise right shift of the first integer by the number of bits given by the second integer, and returns the result.
This effectively divides the first integer by 2 to the power of the second integer, and rounds towards zero.
a | The first operand. |
b | The second operand. |
Definition at line 1515 of file arithmetic-nint.hpp.
|
inline |
Computes the bitwise right shift of the first integer by the number of bits given by the second integer, and returns the result.
This effectively divides the first integer by 2 to the power of the second integer, and rounds towards zero.
a | The first operand. |
b | The second operand. |
Definition at line 1531 of file arithmetic-nint.hpp.
|
inline |
Computes the bitwise right shift of the first integer by the number of bits given by the second integer, and returns the result.
This effectively divides the first integer by 2 to the power of the second integer, and rounds towards zero.
a | The first operand. |
b | The second operand. |
Definition at line 404 of file arithmetic-gmp-iops.hpp.
|
inline |
Computes the bitwise right shift of the first integer by the number of bits given by the second integer, and returns the result.
This effectively divides the first integer by 2 to the power of the second integer, and rounds towards zero.
a | The first operand. |
b | The second operand. |
Definition at line 435 of file arithmetic-gmp-iops.hpp.
|
inline |
Divides a
by 2 to the power of b
and returns the result.
a | The first operand. |
b | The second operand. |
Definition at line 443 of file arithmetic-gmp-rops.hpp.
|
inline |
Divides a
by 2 to the power of b
and returns the result.
a | The first operand. |
b | The second operand. |
Definition at line 469 of file arithmetic-gmp-rops.hpp.
|
inline |
Divides this rational number by 2 to the power of b
and returns the result.
a | The first operand. |
b | The second operand. |
Definition at line 838 of file rational-ops.hpp.
|
inline |
Divides this rational number by 2 to the power of r
.
cur | The rational number to work on. |
r | The exponent. |
Definition at line 323 of file rational-ops.hpp.
|
inline |
Computes the bitwise right shift of cur
by i
bits, and stores the result in cur
.
This effectively divides cur
by 2 to the power of i
, and rounds towards zero.
cur | The integer to operate on. |
i | The second operand. |
cur
containing the result. Definition at line 1460 of file arithmetic-nint.hpp.
|
inline |
Computes the bitwise right shift of cur
by i
bits, and stores the result in cur
.
This effectively divides cur
by 2 to the power of i
, and rounds towards zero.
cur | The integer to operate on. |
i | The second operand. |
cur
containing the result. Definition at line 1474 of file arithmetic-nint.hpp.
|
inline |
Divides cur
by 2 to the power of r
.
cur | The floating point number to operate on. |
r | The exponent. |
cur
containing the result.Definition at line 831 of file arithmetic-gmp-rops.hpp.
|
inline |
Divides cur
by 2 to the power of r
.
cur | The floating point number to operate on. |
r | The exponent. |
cur
containing the result. Definition at line 857 of file arithmetic-gmp-rops.hpp.
|
inline |
Computes the bitwise right shift of cur
by i
bits, and stores the result in cur
.
This effectively divides cur
by 2 to the power of i
, and rounds towards zero.
cur | The integer to operate on. |
i | The second operand. |
cur
containing the result. Definition at line 969 of file arithmetic-gmp-iops.hpp.
|
inline |
Computes the bitwise right shift of cur
by i
bits, and stores the result in cur
.
This effectively divides cur
by 2 to the power of i
, and rounds towards zero.
cur | The integer to operate on. |
i | The second operand. |
cur
containing the result. Definition at line 1001 of file arithmetic-gmp-iops.hpp.
|
inline |
Computes the bitwise exclusive or of the two integers and returns the result.
a | The first operand. |
b | The second operand. |
Definition at line 369 of file arithmetic-gmp-iops.hpp.
|
inline |
Computes the bitwise exclusive or of cur
with i
and stores the result in cur
.
cur | The integer to operate on. |
i | The second operand. |
cur
containing the result. Definition at line 937 of file arithmetic-gmp-iops.hpp.
|
inline |
Computes the bitwise or of the two integers and returns the result.
a | The first operand. |
b | The second operand. |
Definition at line 355 of file arithmetic-gmp-iops.hpp.
|
inline |
Computes the bitwise or of cur
with i
and stores the result in cur
.
cur | The integer to operate on. |
i | The second operand. |
cur
containing the result. Definition at line 910 of file arithmetic-gmp-iops.hpp.
|
inline |
Bitwise negates the integer.
a | The integer. |
Definition at line 259 of file arithmetic-gmp-iops.hpp.
|
inline |
Raises a
to the power e
and stores the result in r
.
r | The result. |
a | The base. |
e | The exponent. |
Definition at line 1361 of file rational.hpp.
|
inline |
Raises a
to the power e
and stores the result in r
.
r | The result. |
a | The base. |
e | The exponent. |
Definition at line 1381 of file rational.hpp.
void plll::arithmetic::power | ( | Rational & | r, |
const Rational & | a, | ||
const Integer & | e | ||
) |
Raises a
to the power e
and stores the result in r
.
r | The result. |
a | The base. |
e | The exponent. |
|
inline |
Raises a
to the power b
and stores the result in r
.
r | The result. |
a | The base. |
b | The exponent. |
Definition at line 1503 of file arithmetic-gmp.hpp.
|
inline |
Raises a
to the power b
and stores the result in r
.
r | The result. |
a | The base. |
b | The exponent. |
Definition at line 1511 of file arithmetic-gmp.hpp.
|
inline |
Computes and returns a
raised to the power of b
.
a | The first operand. |
b | The second operand. |
Definition at line 1899 of file arithmetic-nint.hpp.
|
inline |
Raises a
to the power b
and stores the result in r
.
r | The result. |
a | The base. |
b | The exponent. |
Definition at line 1893 of file arithmetic-nint.hpp.
|
inline |
Computes and returns a
raised to the power of b
.
a | The first operand. |
b | The second operand. |
Definition at line 1911 of file arithmetic-nint.hpp.
|
inline |
Raises a
to the power b
and stores the result in r
.
r | The result. |
a | The base. |
b | The exponent. |
Definition at line 1905 of file arithmetic-nint.hpp.
|
inline |
Returns a
raised to the power of b
.
a | The base. |
b | The exponent. |
Definition at line 1020 of file rational-ops.hpp.
|
inline |
Raises a
to the power b
and stores the result in res
.
res | The result. |
a | The base. |
b | The exponent. |
Definition at line 3185 of file arithmetic-gmp.hpp.
|
inline |
Returns a
raised to the power of b
.
a | The base. |
b | The exponent. |
Definition at line 1031 of file rational-ops.hpp.
|
inline |
Raises a
to the power b
and stores the result in res
.
res | The result. |
a | The base. |
b | The exponent. |
Definition at line 3194 of file arithmetic-gmp.hpp.
|
inline |
Returns a
raised to the power of b
.
a | The base. |
b | The exponent. |
Definition at line 1043 of file rational-ops.hpp.
|
inline |
Returns a
raised to the power of b
.
a | The base. |
b | The exponent. |
rc | The context whose precision to use for the result. |
Definition at line 1087 of file rational-ops.hpp.
|
inline |
Returns a
raised to the power of b
.
a | The base. |
b | The exponent. |
rc | The context whose precision to use for the result. |
Definition at line 1099 of file rational-ops.hpp.
|
inline |
Returns a
raised to the power of b
.
a | The base. |
b | The exponent. |
rc | The context whose precision to use for the result. |
Definition at line 1112 of file rational-ops.hpp.
|
inline |
Computes and returns a
raised to the power of b
.
a | The first operand. |
b | The second operand. |
Definition at line 1566 of file arithmetic-gmp-iops.hpp.
|
inline |
Computes and returns a
raised to the power of b
.
a | The base. |
b | The exponent. |
Definition at line 1625 of file arithmetic-gmp-iops.hpp.
|
inline |
Returns a
raised to the power of b
.
a | The base. |
b | The exponent. |
Definition at line 1648 of file arithmetic-gmp-rops.hpp.
|
inline |
Returns a
raised to the power of b
.
a | The base. |
b | The exponent. |
Definition at line 1659 of file arithmetic-gmp-rops.hpp.
|
inline |
Returns a
raised to the power of b
.
a | The base. |
b | The exponent. |
Definition at line 1671 of file arithmetic-gmp-rops.hpp.
|
inline |
Returns a
raised to the power of b
.
a | The base. |
b | The exponent. |
Definition at line 1686 of file arithmetic-gmp-rops.hpp.
|
inline |
Returns a
raised to the power of b
.
a | The base. |
b | The exponent. |
rc | The context whose precision to use for the result. |
Definition at line 2081 of file arithmetic-gmp-rops.hpp.
|
inline |
Returns a
raised to the power of b
.
a | The base. |
b | The exponent. |
rc | The context whose precision to use for the result. |
Definition at line 2094 of file arithmetic-gmp-rops.hpp.
|
inline |
Returns a
raised to the power of b
.
a | The base. |
b | The exponent. |
rc | The context whose precision to use for the result. |
Definition at line 2108 of file arithmetic-gmp-rops.hpp.
|
inline |
Returns a
raised to the power of b
.
a | The base. |
b | The exponent. |
rc | The context whose precision to use for the result. |
Definition at line 2124 of file arithmetic-gmp-rops.hpp.
void plll::arithmetic::roundDiv | ( | Integer & | r, |
const Integer & | a, | ||
const Integer & | b | ||
) |
Computes (rounding to the next integer) and stores the result in r
.
r | The result. |
a | The divident. |
b | The divisor. |
Definition at line 1529 of file arithmetic-gmp.hpp.
void plll::arithmetic::roundDiv | ( | NInt< Type > & | r, |
const NInt< Type > & | a, | ||
const NInt< Type > & | b | ||
) |
Computes (rounding to the next integer) and stores the result in r
.
r | The result. |
a | The divident. |
b | The divisor. |
Definition at line 2217 of file arithmetic-nint.hpp.
NInt< Type > plll::arithmetic::roundDiv | ( | const NInt< Type > & | a, |
const NInt< Type > & | b | ||
) |
Computes and returns (rounding to the next integer).
a | The divident. |
b | The divisor. |
Definition at line 2230 of file arithmetic-nint.hpp.
|
inline |
Computes and returns .
a | The first operand. |
b | The second operand. |
Definition at line 1609 of file arithmetic-gmp-iops.hpp.
|
inline |
Sets the n
-th bit of to value
.
x | The integer whose bits to modify. |
n | The index of the bit to set or clear. |
value | The new value of the n -th bit. The default value is true . |
Definition at line 1779 of file arithmetic-gmp.hpp.
|
inline |
Sets the n
-th bit of to value
.
x | The integer whose bits to modify. |
n | The index of the bit to set or clear. |
value | The new value of the n -th bit. The default value is true . |
Definition at line 1855 of file arithmetic-nint.hpp.
|
inline |
Sets the given floating point number to .
r | The floating point variable to set to infinity. |
sign | If true , the number is set to , and otherwise to . The default value is true . |
Definition at line 2927 of file arithmetic-gmp.hpp.
|
inline |
Sets the given rational number to one.
r | The rational number variable to set to one. |
Definition at line 1313 of file rational.hpp.
|
inline |
Sets the given rational number to .
Note that the sign is ignored, as there is no distinction between the rational +0 and -0.
r | The rational number variable to set to zero. |
sign | This is ignored. The default value is true . |
Definition at line 1306 of file rational.hpp.
|
inline |
Sets the given floating point number to .
r | The floating point variable to set to zero. |
sign | If true , the number is set to , and otherwise to . The default value is true . |
Definition at line 2932 of file arithmetic-gmp.hpp.
|
inline |
Multiplies a
by and stores the result in r
.
r | The result. |
a | The first operand. |
b | The second operand. |
Definition at line 1194 of file rational.hpp.
|
inline |
Shifts a
by b
bits to the left and stores the result in r
.
r | The result. |
a | The first operand. |
b | The second operand. |
Definition at line 1575 of file arithmetic-gmp.hpp.
|
inline |
Shifts a
by b
bits to the right and stores the result in r
.
r | The result. |
a | The first operand. |
b | The second operand. |
Definition at line 1583 of file arithmetic-gmp.hpp.
|
inline |
Shifts a
by b
bits to the left and stores the result in r
.
r | The result. |
a | The first operand. |
b | The second operand. |
Definition at line 1681 of file arithmetic-nint.hpp.
|
inline |
Multiplies a
by and stores the result in r
.
r | The result. |
a | The first operand. |
b | The second operand. |
Definition at line 2825 of file arithmetic-gmp.hpp.
|
inline |
Shifts a
by b
bits to the left and stores the result in r
.
r | The result. |
a | The first operand. |
b | The second operand. |
Definition at line 1719 of file arithmetic-nint.hpp.
|
inline |
Multiplies a
by and stores the result in r
.
r | The result. |
a | The first operand. |
b | The second operand. |
Definition at line 2857 of file arithmetic-gmp.hpp.
|
inline |
Multiplies a
by and stores the result in r
.
r | The result. |
a | The first operand. |
b | The second operand. |
Definition at line 1226 of file rational.hpp.
|
inline |
Shifts a
by b
bits to the left and stores the result in r
.
r | The result. |
a | The first operand. |
b | The second operand. |
Definition at line 1588 of file arithmetic-gmp.hpp.
|
inline |
Shifts a
by b
bits to the right and stores the result in r
.
r | The result. |
a | The first operand. |
b | The second operand. |
Definition at line 1596 of file arithmetic-gmp.hpp.
|
inline |
Shifts a
by b
bits to the left and stores the result in r
.
r | The result. |
a | The first operand. |
b | The second operand. |
Definition at line 1700 of file arithmetic-nint.hpp.
|
inline |
Multiplies a
by and stores the result in r
.
r | The result. |
a | The first operand. |
b | The second operand. |
Definition at line 2841 of file arithmetic-gmp.hpp.
|
inline |
Shifts a
by b
bits to the left and stores the result in r
.
r | The result. |
a | The first operand. |
b | The second operand. |
Definition at line 1725 of file arithmetic-nint.hpp.
|
inline |
Multiplies a
by and stores the result in r
.
r | The result. |
a | The first operand. |
b | The second operand. |
Definition at line 2866 of file arithmetic-gmp.hpp.
|
inline |
Returns the sign of the given rational number.
Definition at line 1342 of file rational.hpp.
|
inline |
Returns the sign of the given integer.
Definition at line 1767 of file arithmetic-gmp.hpp.
|
inline |
Returns the sign of the given floating point number.
Definition at line 3013 of file arithmetic-gmp.hpp.
|
inline |
Returns the sign of the given integer.
Definition at line 1815 of file arithmetic-nint.hpp.
|
inline |
Computes the sine of a
and stores the result in res
.
res | The result. |
a | The value the function is evaluated at. |
Definition at line 3028 of file arithmetic-gmp.hpp.
|
inline |
Returns the sine of the given floating point number.
i | The operand. |
Definition at line 1462 of file arithmetic-gmp-rops.hpp.
|
inline |
Returns the sine of the given floating point number.
i | The operand. |
rc | The context whose precision to use for the result. |
Definition at line 1878 of file arithmetic-gmp-rops.hpp.
|
inline |
Computes the square root of a
and stores the result in res
.
res | The result. |
a | The value the function is evaluated at. |
Definition at line 3130 of file arithmetic-gmp.hpp.
|
inline |
Returns the square root of the given floating point number.
i | The operand. |
Definition at line 1592 of file arithmetic-gmp-rops.hpp.
|
inline |
Returns the square root of the given floating point number.
i | The operand. |
rc | The context whose precision to use for the result. |
Definition at line 2020 of file arithmetic-gmp-rops.hpp.
|
inline |
Computes and stores the result in r
.
r | The result. |
a | The operand. |
Definition at line 1540 of file arithmetic-gmp.hpp.
|
inline |
Computes and stores the result in r
.
r | The result. |
a | The operand. |
Definition at line 1917 of file arithmetic-nint.hpp.
|
inline |
Computes and returns .
a | The operand. |
|
inline |
Computes and returns the ceil of the square root of i
.
i | The operand. |
Definition at line 1512 of file arithmetic-gmp-iops.hpp.
|
inline |
Computes and stores the result in r
.
r | The result. |
a | The operand. |
Definition at line 1550 of file arithmetic-gmp.hpp.
|
inline |
Computes and stores the result in r
.
r | The result. |
a | The operand. |
Definition at line 1941 of file arithmetic-nint.hpp.
|
inline |
Computes and returns .
a | The operand. |
|
inline |
Computes and returns the floor of the square root of i
.
i | The operand. |
Definition at line 1521 of file arithmetic-gmp-iops.hpp.
|
inline |
Computes the square of a
and stores the result in r
.
r | The result. |
a | The operand. |
Definition at line 1348 of file rational.hpp.
|
inline |
Computes the square of a
and stores the result in r
.
r | The result. |
a | The operand. |
Definition at line 1788 of file arithmetic-gmp.hpp.
|
inline |
Computes the square of a
and stores the result in r
.
r | The result. |
a | The operand. |
Definition at line 1871 of file arithmetic-nint.hpp.
|
inline |
Computes and returns the square of i
.
i | The operand. |
Definition at line 1865 of file arithmetic-nint.hpp.
|
inline |
Computes the square of a
and stores the result in r
.
r | The result. |
a | The operand. |
Definition at line 3019 of file arithmetic-gmp.hpp.
|
inline |
Returns the square of the given rational number.
i | The operand. |
Definition at line 1005 of file rational-ops.hpp.
|
inline |
Returns the square of the given rational number.
i | The operand. |
rc | The context whose precision to use for the result. |
Definition at line 1071 of file rational-ops.hpp.
|
inline |
Returns the square of the given floating point number.
i | The operand. |
Definition at line 1447 of file arithmetic-gmp-rops.hpp.
|
inline |
Computes and returns the square of i
.
i | The operand. |
Definition at line 1499 of file arithmetic-gmp-iops.hpp.
|
inline |
Returns the square of the given floating point number.
i | The operand. |
rc | The context whose precision to use for the result. |
Definition at line 1862 of file arithmetic-gmp-rops.hpp.
|
inline |
Subtracts b
from a
and stores the result in r
.
r | The result. |
a | The first operand. |
b | The second operand. |
Definition at line 918 of file rational.hpp.
|
inline |
Subtracts b
from a
and stores the result in r
.
r | The result. |
a | The first operand. |
b | The second operand. |
Definition at line 1339 of file arithmetic-gmp.hpp.
|
inline |
Subtracts b
from a
and stores the result in r
.
r | The result. |
a | The first operand. |
b | The second operand. |
Definition at line 1637 of file arithmetic-nint.hpp.
|
inline |
Subtracts b
from a
and stores the result in r
.
r | The result. |
a | The first operand. |
b | The second operand. |
Definition at line 2496 of file arithmetic-gmp.hpp.
|
inline |
Multiplies a
and b
and subtracts the result from r
.
r | The accumulator. |
a | The first operand. |
b | The second operand. |
Definition at line 1483 of file arithmetic-gmp.hpp.
|
inline |
Multiplies a
and b
and subtracts the result from r
.
r | The accumulator. |
a | The first operand. |
b | The second operand. |
Definition at line 1649 of file arithmetic-nint.hpp.
|
inline |
Multiplies a
and b
and subtracts the result from r
.
r | The accumulator. |
a | The first operand. |
b | The second operand. |
Definition at line 2614 of file arithmetic-gmp.hpp.
|
inline |
Multiplies a
and b
and subtracts the result from r
.
r | The accumulator. |
a | The first operand. |
b | The second operand. |
Definition at line 1262 of file rational-ops.hpp.
|
inline |
Computes the tangent of a
and stores the result in res
.
res | The result. |
a | The value the function is evaluated at. |
Definition at line 3046 of file arithmetic-gmp.hpp.
|
inline |
Returns the tangent of the given floating point number.
i | The operand. |
Definition at line 1484 of file arithmetic-gmp-rops.hpp.
|
inline |
Returns the tangent of the given floating point number.
i | The operand. |
rc | The context whose precision to use for the result. |
Definition at line 1902 of file arithmetic-gmp-rops.hpp.
|
inline |
Computes the non-negative extended Greatest Common Divisior r
of x
and y
.
r | The result is stored in here. |
a | The Bezout coefficient of x . |
b | The Bezout coefficient of y . |
x | The first operand. |
y | The first operand. |
Afterwards, the variables r
, a
and b
satisfy r == a * x + b * y
.
Definition at line 1676 of file arithmetic-gmp.hpp.
|
inline |
Computes the non-negative extended Greatest Common Divisior r
of x
and y
.
r | The result is stored in here. |
a | The Bezout coefficient of x . |
b | The Bezout coefficient of y . |
x | The first operand. |
y | The first operand. |
Afterwards, the variables r
, a
and b
satisfy r == a * x + b * y
.
Definition at line 2286 of file arithmetic-nint.hpp.