plll  1.0
plll::arithmetic::RealContext Class Reference

Represents an arithmetic context for arbitrary precision floating point values. More...

#include <arithmetic-gmp.hpp>

Classes

class  UniformRNG
 

Public Types

enum  
 The properties of arbitrary precision floating point numbers.
 
typedef arithmetic::Real Real
 The floating point type.
 
typedef arithmetic::Real Type
 The floating point type.
 

Public Member Functions

Real getEpsilon () const
 Returns the machine constant for the current context. More...
 
void getEpsilon (Real &) const
 Sets the argument to the machine constant for the current context. More...
 
Real getEuler () const
 Returns an approximation of the Euler number $\exp(1)$ for the current context. More...
 
void getEuler (Real &) const
 Sets the argument to an approximation of the Euler number $\exp(1)$ for the current context. More...
 
Real getLog2 () const
 Returns an approximation of the natural logarithm $\log 2$ for the current context. More...
 
void getLog2 (Real &) const
 Sets the argument to an approximation of the natural logarithm $\log 2$ for the current context. More...
 
Real getPi () const
 Returns an approximation of $\pi$ for the current context. More...
 
void getPi (Real &) const
 Sets the argument to an approximation of $\pi$ for the current context. More...
 
unsigned long getRealPrecision () const PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE
 Returns the precision of this context.
 
 RealContext () PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE
 Creates a new real context with the current global default precision.
 
 RealContext (long prec) PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE
 Creates a new real context with the given precision.
 
void setRealPrecision (unsigned long prec) PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE
 Sets the precision of this context. More...
 

Static Public Member Functions

static unsigned long getMaxRealPrecision () PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE
 Returns the maximal possible precision for this context.
 
static unsigned long getMinRealPrecision () PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE
 Returns the minimal possible precision for this context.
 

Friends

RealContextgetThreadRealContext ()
 Retrieves a context for the current thread. The context is thread local and cannot be accessed by this method from other threads.
 

Detailed Description

Represents an arithmetic context for arbitrary precision floating point values.

See also
Contexts.

Definition at line 1872 of file arithmetic-gmp.hpp.

Member Function Documentation

Real plll::arithmetic::RealContext::getEpsilon ( ) const
inline

Returns the machine constant for the current context.

See also
Constants

Definition at line 3539 of file arithmetic-gmp.hpp.

void plll::arithmetic::RealContext::getEpsilon ( Real x) const
inline

Sets the argument to the machine constant for the current context.

See also
Constants

Definition at line 3546 of file arithmetic-gmp.hpp.

Real plll::arithmetic::RealContext::getEuler ( ) const
inline

Returns an approximation of the Euler number $\exp(1)$ for the current context.

See also
Constants

Definition at line 3568 of file arithmetic-gmp.hpp.

void plll::arithmetic::RealContext::getEuler ( Real x) const
inline

Sets the argument to an approximation of the Euler number $\exp(1)$ for the current context.

See also
Constants

Definition at line 3575 of file arithmetic-gmp.hpp.

Real plll::arithmetic::RealContext::getLog2 ( ) const
inline

Returns an approximation of the natural logarithm $\log 2$ for the current context.

See also
Constants

Definition at line 3580 of file arithmetic-gmp.hpp.

void plll::arithmetic::RealContext::getLog2 ( Real x) const
inline

Sets the argument to an approximation of the natural logarithm $\log 2$ for the current context.

See also
Constants

Definition at line 3587 of file arithmetic-gmp.hpp.

Real plll::arithmetic::RealContext::getPi ( ) const
inline

Returns an approximation of $\pi$ for the current context.

See also
Constants

Definition at line 3556 of file arithmetic-gmp.hpp.

void plll::arithmetic::RealContext::getPi ( Real x) const
inline

Sets the argument to an approximation of $\pi$ for the current context.

See also
Constants

Definition at line 3563 of file arithmetic-gmp.hpp.

void plll::arithmetic::RealContext::setRealPrecision ( unsigned long  prec)
inline

Sets the precision of this context.

If the precision is too small or too large, it will be clipped to the permissive interval bounds.

Parameters
precThe new precision.

Definition at line 1929 of file arithmetic-gmp.hpp.


The documentation for this class was generated from the following file: