MPFRCPP Interface Specification

Note


Contents


1. Macro

1.1. GMP C++ Interface [<mpfrcpp/mpfrcpp.hpp>]

Items corresponding to the GMP C++ Interface will be used if GMP_CPP_INTERFACE defined.

#ifdef __GMP_PLUSPLUS__
#define GMP_CPP_INTERFACE
#endif

1.2. MPFRCPP Version [<mpfrcpp/mpfrcpp.hpp>]

#define MPFRCPP_VERSION_MAJOR 1
#define MPFRCPP_VERSION_MINOR 1
#define MPFRCPP_VERSION_PATCHLEVEL 6

Do not use MPFRCPP_VERSION_ definitions unless you really need preprocessing. Use Version class from the core/version.hpp.

1.3. MPFRCPP Debug Mode [<library/error.hpp>]

If MPFRCPP_DEBUG defined, exceptions (see below) will cause writing in STDERR in their constructors.

#define MPFRCPP_DEBUG

2. Namespaces

Namespaces used in MPFRCPP are listed below.

mpfrcpp
The main library namespace
mpfrcpp::internal
Internal. Do not access
mpfrcpp::test
Library test classes (work in progress)

3. Library Classes [<mpfrcpp/library/*>]

3.1. Exceptions [<mpfrcpp/library/error.hpp>]

Classes with Error postfix are based on std::exception [stdexcept].

namespace mpfrcpp {
class ComparisonWithNaNError : public std::exception {
#ifdef MPFRCPP_DEBUG
    ComparisonWithNaNError () { std::cerr << what() << std::endl; }
#endif
    const char* what () const throw();
};

class ConversionDoesNotFitsError : public std::exception {
#ifdef MPFRCPP_DEBUG
    ConversionDoesNotFitsError () { std::cerr << what() << std::endl; }
#endif
    const char* what () const throw();
};

class InvalidNumberStringError : public std::exception {
#ifdef MPFRCPP_DEBUG
    InvalidNumberStringError () { std::cerr << what() << std::endl; }
#endif
    const char* what () const throw();
};

class StringOutputError : public std::exception {
#ifdef MPFRCPP_DEBUG
    StringOutputError () { std::cerr << what() << std::endl; }
#endif
    const char* what () const throw();
};

class UnknownRoundModeError : public std::exception {
#ifdef MPFRCPP_DEBUG
    UnknownRoundModeError () { std::cerr << what() << std::endl; }
#endif
    const char* what () const throw();
};
}    // namespace mpfrcpp

3.2. Flags [<mpfrcpp/library/flags.hpp>]

Class Flags contains static methods wrapping connected MPFR functions. Available flags are:

namespace mpfrcpp {
class Flags {
public:
    static void clear () throw();

    static bool getErange    () throw();
    static bool getInexact   () throw();
    static bool getNaN       () throw();
    static bool getOverflow  () throw();
    static bool getUnderflow () throw();

    static void setErange    (bool) throw();
    static void setInexact   (bool) throw();
    static void setNaN       (bool) throw();
    static void setOverflow  (bool) throw();
    static void setUnderflow (bool) throw();
};
}    // namespace mpfrcpp

3.3. Global Parameters [<mpfrcpp/library/global_parameters.hpp>]

GlobalParameters object is binded to main library class Real and stores main parameters: default precision, round mode, output base, whether initialize new number as zero, or whether as NaN.

namespace mpfrcpp {
class GlobalParameters {
public:

    GlobalParameters (const Precision& = Precision(),
                      const Base& = Base(),
                      const RoundMode& = RoundMode(),
                      bool initializeByZero = true) throw();

    void setDefaultBase(const Base&) throw();
    Base getDefaultBase() const throw();

    void setDefaultPrecision(const Precision&) throw();
    Precision getDefaultPrecision() const throw();

    void setDefaultRoundMode(const RoundMode&) throw();
    RoundMode getDefaultRoundMode() const throw();

    bool initializeByZero() throw();
    bool initializeByNaN() throw();
    bool isInitializedByZero() const throw();
    bool isInitializedByNaN() const throw();

// Methods implemented in MPFR:

    static int setExponentMin (const Exponent&) throw();
    static Exponent getExponentMin () throw();

    static int setExponentMax (const Exponent&) throw();
    static Exponent getExponentMax () throw();

    static Exponent getExponentMinMin() throw();
    static Exponent getExponentMinMax() throw();
    static Exponent getExponentMaxMin() throw();
    static Exponent getExponentMaxMax() throw();
};
}    // namespace mpfrcpp

4. Core Classes [<mpfrcpp/core/*>]

4.1. Primitive Wrapper [<mpfrcpp/core/primitive_wrapper.hpp>]

Primitive Wrapper stores scalar type object as it's field. It needed to prevent mixing of integer numbers with different mean (number base, number exponent for example) while passing arguments to certain method or using method polymorphism.

Bounder performs mapping from set of possible T values to some [min, max] interval.

namespace mpfrcpp {
template<typename T> class Bounder {
public:
    Bounder () throw();
    virtual T operator() (const T&) const throw();
};
}    // namespace mpfrcpp

Our library uses the following mapping scheme:

// INFORMATIVE EXAMPLE
class SomeBounder : public Bounder<T> {
public:
    T operator() (const T& x) const throw() {
        if (x > MAX) return MAX;
        if (x < MIN) return MIN;
        return x;
    }
};
namespace mpfrcpp {
template<typename T, class BounderT = Bounder<T> > class PrimitiveWrapper {
protected:

    T x_;
    T get () const throw();
    void set (const T&) throw();
    static BounderT b_;

public:

    PrimitiveWrapper (const T&) throw();
    PrimitiveWrapper (const PrimitiveWrapper);

    T operator= (const T&) throw();
    PrimitiveWrapper<T> operator= (const PrimitiveWrapper<T>&);

    operator T() const throw();

    bool operator== (const T&) const throw();
    bool operator!= (const T&) const throw();
    bool operator<= (const T&) const throw();
    bool operator>= (const T&) const throw();
    bool operator<  (const T&) const throw();
    bool operator>  (const T&) const throw();

    PrimitiveWrapper operator+ (const T&) const throw();
    PrimitiveWrapper operator- (const T&) const throw();
    PrimitiveWrapper operator* (const T&) const throw();
    PrimitiveWrapper operator/ (const T&) const throw();
    PrimitiveWrapper operator% (const T&) const throw();

    PrimitiveWrapper operator++ (int) const throw();
    PrimitiveWrapper operator-- (int) const throw();
    PrimitiveWrapper operator++ () const throw();
    PrimitiveWrapper operator-- () const throw();

    PrimitiveWrapper& operator+= (const T&) throw();
    PrimitiveWrapper& operator-= (const T&) throw();
    PrimitiveWrapper& operator*= (const T&) throw();
    PrimitiveWrapper& operator/= (const T&) throw();
    PrimitiveWrapper& operator%= (const T&) throw();

    std::string toString () const throw();
    operator std::string() const throw();
};

template <typename T, class BounderT> std::ostream& operator<<
    (std::ostream&, const PrimitiveWrapper<T, BounderT>&) throw();
}    // namespace mpfrcpp

4.2. Number Base [<mpfrcpp/core/base.hpp>]

namespace mpfrcpp {
class BaseBounder : public Bounder<unsigned short int> {
public:
    unsigned short int operator() (const unsigned short int&)
        const throw();
};

class Base :
    public PrimitiveWrapper<unsigned short int, BaseBounder> {
public:
    Base (unsigned short int = 10) throw();
    unsigned short int getInt () const throw();
    void setInt (unsigned short int) throw();
};
}    // namespace mpfrcpp

4.3. Number Exponent [<mpfrcpp/core/exp.hpp>]

namespace mpfrcpp {
class ExponentBounder : public Bounder<mp_exp_t> {
public:
    ExponentBounder () throw();
};

class Exponent :
    public PrimitiveWrapper<mp_exp_t, ExponentBounder> {
public:
    Exponent (mp_exp_t = 0) throw();
    mp_exp_t getMpExpT () const throw();
    void setMpExpT (mp_exp_t) throw();
};
}    // namespace mpfrcpp

4.4. Number Precision [<mpfrcpp/core/precision.hpp>]

Precision is the number of digits in floating point number mantissa.

namespace mpfrcpp {
class PrecisionBounder : public Bounder<mpfr_prec_t> {
public:
    mpfr_prec_t operator() (const mpfr_prec_t&) const throw();
};

class Precision :
    public PrimitiveWrapper<mpfr_prec_t, PrecisionBounder> {
public:
    Precision (mpfr_prec_t = 53) throw();
    mpfr_prec_t getMpfrPrecT () const throw();
    void setMpfrPrecT (mpfr_prec_t) throw();
};
}    // namespace mpfrcpp

4.5. Round Mode [<mpfrcpp/core/round_mode.hpp>]

namespace mpfrcpp {
class RoundMode {
public:
    RoundMode (const std::float_round_style& = std::round_to_nearest) throw();

    std::float_round_style getFloatRoundStyle () const throw();
    mpfr_rnd_t getMpfrRndT () const throw();

    void setFloatRoundStyle (const std::float_round_style&) throw();
    void setMpfrRndT (const mpfr_rnd_t&) throw();

    const char* toString() const throw (unknownRoundModeError);
    operator std::string() const throw (unknownRoundModeError);
        // equivalent to toString()
};
}    // namespace mpfrcpp

Avoid constructing RoundMode. Use pre-defined objects:

extern RoundMode roundTowardZero;
extern RoundMode roundToNearest;
extern RoundMode roundTowardInfinity;
extern RoundMode roundTowardNegInfinity;

The table below lists corresponding GMP macro and std::float_round_style values.

Round Mode GMP macro std::float_round_style value Pre-defined RoundMode object
Toward zero GMP_RNDZ std::round_toward_zero mpfrcpp::roundTowardZero
To nearest GMP_RNDN std::round_to_nearest mpfrcpp::roundToNearest
Toward infinity GMP_RNDU std::round_toward_infinity mpfrcpp::roundTowardInfinity
Toward negative infinity GMP_RNDD std::round_toward_neg_infinity mpfrcpp::roundTowardNegInfinity

4.6. Product (Library) Version [<mpfrcpp/core/version.hpp>]

namespace mpfrcpp {
class Version {
public:
    Version (unsigned int major, unsigned int minor, unsigned int patch)
        throw();

    unsigned int getMajor() const throw();
    unsigned int getMinor() const throw();
    unsigned int getPatch() const throw();
    std::string toString() const throw();
    operator std::string() const throw (); // equivalent to toString()

    bool operator>  (const Version&) const throw();
    bool operator<  (const Version&) const throw();
    bool operator>= (const Version&) const throw();
    bool operator<= (const Version&) const throw();
    bool operator== (const Version&) const throw();
    bool operator!= (const Version&) const throw();
};
}    // namespace mpfrcpp
namespace mpfrcpp {
extern Version MPFRCPPVersion;
extern Version MPFRVersion;

4.7. Numeric Functions [<mpfrcpp/core/numeric_function.hpp>]

NumericFunction is the base for every MPFRCPP numeric function.

namespace mpfrcpp {
class NumericFunction {
public:
    NumericFunction () throw();
    NumericFunction (const Precision&,
                     const RoundMode& =
                         Real::getParameters().getDefaultRoundMode()) throw();
    void setPrecision (const Precision&) throw();
    void setRoundMode (const RoundMode&) throw();
    Precision getPrecision () const throw();
    RoundMode getRoundMode () const throw();
};
}    // namespace mpfrcpp

NumericFunctions is a set of NumericFunction objects (as pointers). Should be used for synchronous changing of precision and round mode.

namespace mpfrcpp {
class NumericFunctions {
public:
    NumericFunctions() throw();
    template<typename T> void insert (T*) throw();
        // NOTE: insertion keeps precision and round mode
    template<typename T> void erase (T*) throw();

// Set Precision / RoundMode for each stored function:
    void setPrecision (const Precision&) throw();
    void setRoundMode (const RoundMode&) throw();
};
}    // namespace mpfrcpp

4.8. Random State [<mpfrcpp/core/random_state.hpp>]

Wrapper to the GMP Random State type (gmp_randstate_t). See the GMP manual for details.

namespace mpfrcpp {
class RandomState {
public:

    // Mersenne Twister algorithm
    RandomState () throw();

    // Copying
    RandomState (const RandomState&) throw();
    RandomState (const gmp_randstate_t&) throw();
    RandomState& operator= (const RandomState&) throw();

    // Linear congruental algorithm X = (aX+c) mod 2^{m2exp}
    RandomState (const mpz_class& a, unsigned long int c,
                 unsigned long int m2exp) throw();

    // Linear congruental algorithm with data selected from a table
    RandomState (unsigned long int size ) throw();

    gmp_randstate_t& getGmpRandstateT () throw();
    const gmp_randstate_t& getGmpRandstateT () const throw();

    void seed (const mpz_class&) throw();
    void seed (unsigned long int) throw();

    ~RandomState () throw();
};
}    // namespace mpfrcpp

5. Class Real [<mpfrcpp/real/*>]

Class Real stores the floating-point number. Some global library methods are implemented as static methods of Real.

namespace mpfrcpp {
class Real {
public:

/**
 * Constructors
 */

    Real (const Precision& = getParameters().getDefaultPrecision()) throw();
    Real (const Real&) throw(); // With the same precision
    Real (const Real&, const Precision&, const RoundMode&) throw();
    // With the specified precision and round mode
    Real (const Real&, const Precision&) throw();
    // With the specified precision and default round mode
    Real (const Real&, const RoundMode&) throw();
    // With the specified round mode and default precision

    Real (const mpfr_t&,
          const Precision& = getParameters().getDefaultPrecision(),
          const RoundMode& = getParameters().getDefaultRoundMode()) throw();
    Real (const mpfr_t&, const RoundMode&) throw();

    Real (const unsigned long int,
          const Precision& = getParameters().getDefaultPrecision(),
          const RoundMode& = getParameters().getDefaultRoundMode()) throw();
    Real (const unsigned long int, const RoundMode&) throw();

    Real (const unsigned int,
          const Precision& = getParameters().getDefaultPrecision(),
          const RoundMode& = getParameters().getDefaultRoundMode()) throw();
    Real (const unsigned int, const RoundMode&) throw();

    Real (const unsigned short int,
          const Precision& = getParameters().getDefaultPrecision(),
          const RoundMode& = getParameters().getDefaultRoundMode()) throw();
    Real (const unsigned short int, const RoundMode&) throw();

    Real (const long int,
          const Precision& = getParameters().getDefaultPrecision(),
          const RoundMode& = getParameters().getDefaultRoundMode()) throw();
    Real (const long int, const RoundMode&) throw();

    Real (const int,
          const Precision& = getParameters().getDefaultPrecision(),
          const RoundMode& = getParameters().getDefaultRoundMode()) throw();
    Real (const int, const RoundMode&) throw();

    Real (const short int,
          const Precision& = getParameters().getDefaultPrecision(),
          const RoundMode& = getParameters().getDefaultRoundMode()) throw();
    Real (const short int, const RoundMode&) throw();

    Real (const double&,
          const Precision& = getParameters().getDefaultPrecision(),
          const RoundMode& = getParameters().getDefaultRoundMode()) throw();
    Real (const double&, const RoundMode&) throw();

    Real (const long double&,
          const Precision& = getParameters().getDefaultPrecision(),
          const RoundMode& = getParameters().getDefaultRoundMode()) throw();
    Real (const long double&, const RoundMode&) throw();

    Real (const mpz_t&,
          const Precision& = getParameters().getDefaultPrecision(),
          const RoundMode& = getParameters().getDefaultRoundMode()) throw();
    Real (const mpz_t&, const RoundMode&) throw();

    Real (const mpq_t&,
          const Precision& = getParameters().getDefaultPrecision(),
          const RoundMode& = getParameters().getDefaultRoundMode()) throw();
    Real (const mpq_t&, const RoundMode&) throw();

    Real (const mpf_t&,
          const RoundMode& = getParameters().getDefaultRoundMode()) throw();

    Real (const std::string&, const Base&,
          const Precision& = getParameters().getDefaultPrecision(),
          const RoundMode& = getParameters().getDefaultRoundMode())
            throw(InvalidNumberStringError);
    Real (const std::string&, const Base&, const RoundMode&)
            throw(InvalidNumberStringError);
    Real (const std::string&,
          const Precision& = getParameters().getDefaultPrecision())
            throw(InvalidNumberStringError);
    Real (const std::string&, const RoundMode&)
            throw(InvalidNumberStringError);

#ifdef GMP_CPP_INTERFACE
    Real (const mpz_class&,
          const Precision& = getParameters().getDefaultPrecision(),
          const RoundMode& = getParameters().getDefaultRoundMode()) throw();
    Real (const mpz_class&, const RoundMode&) throw();

    Real (const mpq_class&,
          const Precision& = getParameters().getDefaultPrecision(),
          const RoundMode& = getParameters().getDefaultRoundMode()) throw();
    Real (const mpq_class&, const RoundMode&) throw();

    Real (const mpf_class&,
          const RoundMode& = getParameters().getDefaultRoundMode()) throw();
#endif    // GMP_CPP_INTERFACE

    ~Real() throw();

/**
 * Static methods
 */

    static GlobalParameters& getParameters() throw();
    static void setParameters (GlobalParameters&) throw();
    static Real epsilon (const Precision& =
                              getParameters().getDefaultPrecision()) throw();

/**
 * Non-static methods
 */

    int checkRange () throw();
    // BUG: NON-CONST, mpfr_check_range() argument isn't const
    Exponent getExponent () const throw();

    mpfr_t& getMpfrT () throw();
    const mpfr_t& getMpfrT () const throw();
    Precision getPrecision() const throw();

    template <typename T> bool isFits () const throw();

    bool isInfinity () const throw();
    bool isInteger () const throw();
    bool isNaN () const throw();
    bool isNumber () const throw();
    bool isZero () const throw();

    void round (const Precision&, const RoundMode&) throw();
    void round (const Precision&) throw(); // with default round mode
    void setExponent (const Exponent&) throw();
    void setPrecision(const Precision&) throw();
    void setPrecision(mpfr_prec_t) throw();
    void setToInfinity (const int sign) throw();
    void setToNaN () throw();
    int sign () const throw(ComparisonWithNaNError);
    void subnormalize (const Precision&,
                       const RoundMode& =
                           getParameters().getDefaultRoundMode()) throw();

/**
 * toString
 *     p is precision FOR GIVEN BASE.
 *     p = -1 means real precision.
 *     now p = 0 is equivalent to p = -1, but reserved to denote precision 0
 *     in further versions.
 */

    std::string toString () const throw(StringOutputError);
    std::string toString (int p, const RoundMode&, const Base&)
        const throw(StringOutputError);
    std::string toString (int p) const throw(StringOutputError);
    std::string toString (const RoundMode&) const throw(StringOutputError);
    std::string toString (const Base&) const throw(StringOutputError);
    std::string toString (int p, const RoundMode&)
        const throw(StringOutputError);
    std::string toString (int p, const Base&)
        const throw(StringOutputError);
    std::string toString (const RoundMode&, const Base&)
        const throw(StringOutputError);

/**
 * Assignment
 */

    Real& operator= (const Real&) throw();
    Real& operator= (const mpfr_t&) throw();
    Real& operator= (const unsigned long int) throw();
    Real& operator= (const unsigned int) throw();
    Real& operator= (const unsigned short int) throw();
    Real& operator= (const long int) throw();
    Real& operator= (const int) throw();
    Real& operator= (const short int) throw();
    Real& operator= (const double&) throw();
    Real& operator= (const long double&) throw();
    Real& operator= (const mpz_t&) throw();
    Real& operator= (const mpq_t&) throw();
    Real& operator= (const mpf_t&) throw();

#ifdef GMP_CPP_INTERFACE
    Real& operator= (const mpz_class&) throw();
    Real& operator= (const mpq_class&) throw();
    Real& operator= (const mpf_class&) throw();
#endif    // GMP_CPP_INTERFACE

Real& operator= (const std::string&) throw();
Real& operator= (const bool) throw();

/**
 * Conversion
 */

    operator double () const throw(ConversionDoesNotFitsError);
    operator long int () const throw(ConversionDoesNotFitsError);
    operator int () const throw(ConversionDoesNotFitsError);
    operator short int () const throw(ConversionDoesNotFitsError);
    operator long double () const throw(ConversionDoesNotFitsError);

#ifdef GMP_CPP_INTERFACE
    operator mpz_class () const throw();
    operator mpf_class () const throw();
#endif

    operator std::string() const throw(StringOutputError);
    // equivalent to toString()
    operator unsigned long int() const throw(ConversionDoesNotFitsError);
    operator unsigned int() const throw(ConversionDoesNotFitsError);
    operator unsigned short int() const throw(ConversionDoesNotFitsError);

/**
 * Arithmetic operators
 */

    Real operator- () const throw();
    Real operator+ () const throw();

    Real operator+ (const Real&) const throw();
    Real operator+ (const unsigned long int&) const throw();
    Real operator+ (const unsigned int&) const throw();
    Real operator+ (const unsigned short int&) const throw();
    Real operator+ (const long int&) const throw();
    Real operator+ (const int&) const throw();
    Real operator+ (const short int&) const throw();
    Real operator+ (const mpz_t&) const throw();
    Real operator+ (const mpq_t&) const throw();

    Real operator- (const Real&) const throw();
    Real operator- (const unsigned long int&) const throw();
    Real operator- (const unsigned int&) const throw();
    Real operator- (const unsigned short int&) const throw();
    Real operator- (const long int&) const throw();
    Real operator- (const int&) const throw();
    Real operator- (const short int&) const throw();
    Real operator- (const mpz_t&) const throw();
    Real operator- (const mpq_t&) const throw();

    Real operator* (const Real&) const throw();
    Real operator* (const unsigned long int&) const throw();
    Real operator* (const unsigned int&) const throw();
    Real operator* (const unsigned short int&) const throw();
    Real operator* (const long int&) const throw();
    Real operator* (const int&) const throw();
    Real operator* (const short int&) const throw();
    Real operator* (const mpz_t&) const throw();
    Real operator* (const mpq_t&) const throw();

    Real operator/ (const Real&) const throw();
    Real operator/ (const unsigned long int&) const throw();
    Real operator/ (const unsigned int&) const throw();
    Real operator/ (const unsigned short int&) const throw();
    Real operator/ (const long int&) const throw();
    Real operator/ (const int&) const throw();
    Real operator/ (const short int&) const throw();
    Real operator/ (const mpz_t&) const throw();
    Real operator/ (const mpq_t&) const throw();

    Real operator^ (const Real&) const throw();
    Real operator^ (const unsigned long int&) const throw();
    Real operator^ (const unsigned int&) const throw();
    Real operator^ (const unsigned short int&) const throw();
    Real operator^ (const long int&) const throw();
    Real operator^ (const int&) const throw();
    Real operator^ (const short int&) const throw();
    Real operator^ (const mpz_t&) const throw();

#ifdef GMP_CPP_INTERFACE
    Real operator^ (const mpz_class&) const throw();
#endif    // GMP_CPP_INTERFACE

    Real operator-- (int) throw();
    Real operator++ (int) throw();
    Real operator-- () throw();
    Real operator++ () throw();

/**
 * Comparison
 */

    bool operator> (const Real&) const throw(ComparisonWithNaNError);
    bool operator>= (const Real&) const throw(ComparisonWithNaNError);
    bool operator< (const Real&) const throw(ComparisonWithNaNError);
    bool operator<= (const Real&) const throw(ComparisonWithNaNError);
    bool operator== (const Real&) const throw(ComparisonWithNaNError);
    bool operator!= (const Real&) const throw(ComparisonWithNaNError);

};    // class Real
}    // namespace mpfrcpp

5.1. Arithmetic Operators [<mpfrcpp/real/arithmetic_operators.hpp>]

(In-class operator overloads are listed above.)

Addition

namespace mpfrcpp {
Real operator+ (const unsigned long int&, const Real&) throw();
Real operator+ (const unsigned int&, const Real&) throw();
Real operator+ (const unsigned short int&, const Real&) throw();

Real operator+ (const long int&, const Real&) throw();
Real operator+ (const int&, const Real&) throw();
Real operator+ (const short int&, const Real&) throw();

Real operator+ (const mpz_t&, const Real&) throw();
Real operator+ (const mpq_t&, const Real&) throw();
}    // namespace mpfrcpp

Substraction

namespace mpfrcpp {
Real operator- (const unsigned long int&, const Real&) throw();
Real operator- (const unsigned int&, const Real&) throw();
Real operator- (const unsigned short int&, const Real&) throw();

Real operator- (const long int&, const Real&) throw();
Real operator- (const int&, const Real&) throw();
Real operator- (const short int&, const Real&) throw();
}    // namespace mpfrcpp

Multiplication

namespace mpfrcpp {
Real operator* (const unsigned long int&, const Real&) throw();
Real operator* (const unsigned int&, const Real&) throw();
Real operator* (const unsigned short int&, const Real&) throw();

Real operator* (const long int&, const Real&) throw();
Real operator* (const int&, const Real&) throw();
Real operator* (const short int&, const Real&) throw();

Real operator* (const mpz_t&, const Real&) throw();
Real operator* (const mpq_t&, const Real&) throw();
}    // namespace mpfrcpp

Division

namespace mpfrcpp {
Real operator/ (const unsigned long int&, const Real&) throw();
Real operator/ (const unsigned int&, const Real&) throw();
Real operator/ (const unsigned short int&, const Real&) throw();

Real operator/ (const long int&, const Real&) throw();
Real operator/ (const int&, const Real&) throw();
Real operator/ (const short int&, const Real&) throw();
}    // namespace mpfrcpp

Power

namespace mpfrcpp {
Real operator^ (const unsigned long int&, const Real&) throw();
Real operator^ (const unsigned int&, const Real&) throw();
Real operator^ (const unsigned short int&, const Real&) throw();
}    // namespace mpfrcpp

Operations with assignment

namespace mpfrcpp {
template <typename T> Real& operator+= (Real&, const T &) throw();
template <typename T> Real& operator-= (Real&, const T &) throw();
template <typename T> Real& operator*= (Real&, const T &) throw();
template <typename T> Real& operator/= (Real&, const T &) throw();
template <typename T> Real& operator^= (Real&, const T &) throw();
}    // namespace mpfrcpp

5.2. Stream I/O [<mpfrcpp/real/stream.hpp>]

Note that incorrect input will be indicated by std::ios_base::failbit.

namespace mpfrcpp {
std::ostream& operator<< (std::ostream&, const Real&) throw(stringOutputError);
std::istream& operator>> (std::istream&, Real&)       throw();
}    // namespace mpfrcpp

6. Functions [<mpfrcpp/functions/*>]

6.1. Basic Arithmetic Functions [<mpfrcpp/functions/basic_arithmetic.hpp>]

Addition

namespace mpfrcpp {
class AddClass : public NumericFunction {
public:
    AddClass () throw();
    AddClass (const Precision&, const RoundMode&) throw();
    AddClass (const Precision&) throw();
    AddClass (const RoundMode&) throw();

    Real operator() (const Real&, const Real&) const throw();
    Real operator() (const Real&, const Real&, const Precision&, const RoundMode&) const throw();
    Real operator() (const Real&, const Real&, const Precision&) const throw();
    Real operator() (const Real&, const Real&, const RoundMode&) const throw();

    Real operator() (const Real&, const unsigned long int&) const throw();
    Real operator() (const Real&, const unsigned long int&, const Precision&, const RoundMode&) const throw();
    Real operator() (const Real&, const unsigned long int&, const Precision&) const throw();
    Real operator() (const Real&, const unsigned long int&, const RoundMode&) const throw();
    Real operator() (const Real&, const unsigned int&) const throw();
    Real operator() (const Real&, const unsigned int&, const Precision&, const RoundMode&) const throw();
    Real operator() (const Real&, const unsigned int&, const Precision&) const throw();
    Real operator() (const Real&, const unsigned int&, const RoundMode&) const throw();
    Real operator() (const Real&, const unsigned short int&) const throw();
    Real operator() (const Real&, const unsigned short int&, const Precision&, const RoundMode&) const throw();
    Real operator() (const Real&, const unsigned short int&, const Precision&) const throw();
    Real operator() (const Real&, const unsigned short int&, const RoundMode&) const throw();

    Real operator() (const Real&, const long int&) const throw();
    Real operator() (const Real&, const long int&, const Precision&, const RoundMode&) const throw();
    Real operator() (const Real&, const long int&, const Precision&) const throw();
    Real operator() (const Real&, const long int&, const RoundMode&) const throw();
    Real operator() (const Real&, const int&) const throw();
    Real operator() (const Real&, const int&, const Precision&, const RoundMode&) const throw();
    Real operator() (const Real&, const int&, const Precision&) const throw();
    Real operator() (const Real&, const int&, const RoundMode&) const throw();
    Real operator() (const Real&, const short int&) const throw();
    Real operator() (const Real&, const short int&, const Precision&, const RoundMode&) const throw();
    Real operator() (const Real&, const short int&, const Precision&) const throw();
    Real operator() (const Real&, const short int&, const RoundMode&) const throw();

    Real operator() (const Real&, const mpz_t&) const throw();
    Real operator() (const Real&, const mpz_t&, const Precision&, const RoundMode&) const throw();
    Real operator() (const Real&, const mpz_t&, const Precision&) const throw();
    Real operator() (const Real&, const mpz_t&, const RoundMode&) const throw();

    Real operator() (const Real&, const mpq_t&) const throw();
    Real operator() (const Real&, const mpq_t&, const Precision&, const RoundMode&) const throw();
    Real operator() (const Real&, const mpq_t&, const Precision&) const throw();
    Real operator() (const Real&, const mpq_t&, const RoundMode&) const throw();

    Real operator() (const unsigned long int&, const Real&) const throw();
    Real operator() (const unsigned long int&, const Real&, const Precision&, const RoundMode&) const throw();
    Real operator() (const unsigned long int&, const Real&, const Precision&) const throw();
    Real operator() (const unsigned long int&, const Real&, const RoundMode&) const throw();
    Real operator() (const unsigned int&, const Real&) const throw();
    Real operator() (const unsigned int&, const Real&, const Precision&, const RoundMode&) const throw();
    Real operator() (const unsigned int&, const Real&, const Precision&) const throw();
    Real operator() (const unsigned int&, const Real&, const RoundMode&) const throw();
    Real operator() (const unsigned short int&, const Real&) const throw();
    Real operator() (const unsigned short int&, const Real&, const Precision&, const RoundMode&) const throw();
    Real operator() (const unsigned short int&, const Real&, const Precision&) const throw();
    Real operator() (const unsigned short int&, const Real&, const RoundMode&) const throw();

    Real operator() (const long int&, const Real&) const throw();
    Real operator() (const long int&, const Real&, const Precision&, const RoundMode&) const throw();
    Real operator() (const long int&, const Real&, const Precision&) const throw();
    Real operator() (const long int&, const Real&, const RoundMode&) const throw();
    Real operator() (const int&, const Real&) const throw();
    Real operator() (const int&, const Real&, const Precision&, const RoundMode&) const throw();
    Real operator() (const int&, const Real&, const Precision&) const throw();
    Real operator() (const int&, const Real&, const RoundMode&) const throw();
    Real operator() (const short int&, const Real&) const throw();
    Real operator() (const short int&, const Real&, const Precision&, const RoundMode&) const throw();
    Real operator() (const short int&, const Real&, const Precision&) const throw();
    Real operator() (const short int&, const Real&, const RoundMode&) const throw();

    Real operator() (const mpz_t&, const Real&) const throw();
    Real operator() (const mpz_t&, const Real&, const Precision&, const RoundMode&) const throw();
    Real operator() (const mpz_t&, const Real&, const Precision&) const throw();
    Real operator() (const mpz_t&, const Real&, const RoundMode&) const throw();

#ifdef GMP_CPP_INTERFACE
    Real operator() (const mpz_class&, const Real&) const throw();
    Real operator() (const mpz_class&, const Real&, const Precision&, const RoundMode&) const throw();
    Real operator() (const mpz_class&, const Real&, const Precision&) const throw();
    Real operator() (const mpz_class&, const Real&, const RoundMode&) const throw();
#endif    // GMP_CPP_INTERFACE

    Real operator() (const mpq_t&, const Real&) const throw();
    Real operator() (const mpq_t&, const Real&, const Precision&, const RoundMode&) const throw();
    Real operator() (const mpq_t&, const Real&, const Precision&) const throw();
    Real operator() (const mpq_t&, const Real&, const RoundMode&) const throw();

#ifdef GMP_CPP_INTERFACE
    Real operator() (const mpq_class&, const Real&) const throw();
    Real operator() (const mpq_class&, const Real&, const Precision&, const RoundMode&) const throw();
    Real operator() (const mpq_class&, const Real&, const Precision&) const throw();
    Real operator() (const mpq_class&, const Real&, const RoundMode&) const throw();
#endif    // GMP_CPP_INTERFACE
};
}    // namespace mpfrcpp

Subtraction

namespace mpfrcpp {
class SubClass : public NumericFunction {
public:
    SubClass () throw();
    SubClass (const Precision&, const RoundMode&) throw();
    SubClass (const Precision&) throw();
    SubClass (const RoundMode&) throw();

    Real operator() (const Real&, const Real&) const throw();
    Real operator() (const Real&, const Real&, const Precision&, const RoundMode&) const throw();
    Real operator() (const Real&, const Real&, constconst Precision&) const throw();
    Real operator() (const Real&, const Real&, const RoundMode&) const throw();

    Real operator() (const Real&, const unsigned long int&) const throw();
    Real operator() (const Real&, const unsigned long int&, const Precision&, const RoundMode&) const throw();
    Real operator() (const Real&, const unsigned long int&, const Precision&) const throw();
    Real operator() (const Real&, const unsigned long int&, const RoundMode&) const throw();
    Real operator() (const Real&, const unsigned int&) const throw();
    Real operator() (const Real&, const unsigned int&, const Precision&, const RoundMode&) const throw();
    Real operator() (const Real&, const unsigned int&, const Precision&) const throw();
    Real operator() (const Real&, const unsigned int&, const RoundMode&) const throw();
    Real operator() (const Real&, const unsigned short int&) const throw();
    Real operator() (const Real&, const unsigned short int&, const Precision&, const RoundMode&) const throw();
    Real operator() (const Real&, const unsigned short int&, const Precision&) const throw();
    Real operator() (const Real&, const unsigned short int&, const RoundMode&) const throw();

    Real operator() (const Real&, const long int&) const throw();
    Real operator() (const Real&, const long int&, const Precision&, const RoundMode&) const throw();
    Real operator() (const Real&, const long int&, const Precision&) const throw();
    Real operator() (const Real&, const long int&, const RoundMode&) const throw();
    Real operator() (const Real&, const int&) const throw();
    Real operator() (const Real&, const int&, const Precision&, const RoundMode&) const throw();
    Real operator() (const Real&, const int&, const Precision&) const throw();
    Real operator() (const Real&, const int&, const RoundMode&) const throw();
    Real operator() (const Real&, const short int&) const throw();
    Real operator() (const Real&, const short int&, const Precision&, const RoundMode&) const throw();
    Real operator() (const Real&, const short int&, const Precision&) const throw();
    Real operator() (const Real&, const short int&, const RoundMode&) const throw();

    Real operator() (const Real&, const mpz_t&) const throw();
    Real operator() (const Real&, const mpz_t&, const Precision&, const RoundMode&) const throw();
    Real operator() (const Real&, const mpz_t&, const Precision&) const throw();
    Real operator() (const Real&, const mpz_t&, const RoundMode&) const throw();

#ifdef GMP_CPP_INTERFACE
    Real operator() (const Real&, const mpz_class&) const throw();
    Real operator() (const Real&, const mpz_class&, const Precision&, const RoundMode&) const throw();
    Real operator() (const Real&, const mpz_class&, const Precision&) const throw();
    Real operator() (const Real&, const mpz_class&, const RoundMode&) const throw();
#endif    // GMP_CPP_INTERFACE

    Real operator() (const Real&, const mpq_t&) const throw();
    Real operator() (const Real&, const mpq_t&, const Precision&, const RoundMode&) const throw();
    Real operator() (const Real&, const mpq_t&, const Precision&) const throw();
    Real operator() (const Real&, const mpq_t&, const RoundMode&) const throw();

#ifdef GMP_CPP_INTERFACE
    Real operator() (const Real&, const mpq_class&) const throw();
    Real operator() (const Real&, const mpq_class&, const Precision&, const RoundMode&) const throw();
    Real operator() (const Real&, const mpq_class&, const Precision&) const throw();
    Real operator() (const Real&, const mpq_class&, const RoundMode&) const throw();
#endif    // GMP_CPP_INTERFACE

    Real operator() (const unsigned long int&, const Real&) const throw();
    Real operator() (const unsigned long int&, const Real&, const Precision&, const RoundMode&) const throw();
    Real operator() (const unsigned long int&, const Real&, const Precision&) const throw();
    Real operator() (const unsigned long int&, const Real&, const RoundMode&) const throw();
    Real operator() (const unsigned int&, const Real&) const throw();
    Real operator() (const unsigned int&, const Real&, const Precision&, const RoundMode&) const throw();
    Real operator() (const unsigned int&, const Real&, const Precision&) const throw();
    Real operator() (const unsigned int&, const Real&, const RoundMode&) const throw();
    Real operator() (const unsigned short int&, const Real&) const throw();
    Real operator() (const unsigned short int&, const Real&, const Precision&, const RoundMode&) const throw();
    Real operator() (const unsigned short int&, const Real&, const Precision&) const throw();
    Real operator() (const unsigned short int&, const Real&, const RoundMode&) const throw();

    Real operator() (const long int&, const Real&) const throw();
    Real operator() (const long int&, const Real&, const Precision&, const RoundMode&) const throw();
    Real operator() (const long int&, const Real&, const Precision&) const throw();
    Real operator() (const long int&, const Real&, const RoundMode&) const throw();
    Real operator() (const int&, const Real&) const throw();
    Real operator() (const int&, const Real&, const Precision&, const RoundMode&) const throw();
    Real operator() (const int&, const Real&, const Precision&) const throw();
    Real operator() (const int&, const Real&, const RoundMode&) const throw();
    Real operator() (const short int&, const Real&) const throw();
    Real operator() (const short int&, const Real&, const Precision&, const RoundMode&) const throw();
    Real operator() (const short int&, const Real&, const Precision&) const throw();
    Real operator() (const short int&, const Real&, const RoundMode&) const throw();

};
}    // namespace mpfrcpp

Multiplication

namespace mpfrcpp {
class MulClass : public NumericFunction {
public:
    MulClass () throw();
    MulClass (const Precision&, const RoundMode&) throw();
    MulClass (const Precision&) throw();
    MulClass (const RoundMode&) throw();

    Real operator() (const Real&, const Real&) const throw();
    Real operator() (const Real&, const Real&, const Precision&, const RoundMode&) const throw();
    Real operator() (const Real&, const Real&, const Precision&) const throw();
    Real operator() (const Real&, const Real&, const RoundMode&) const throw();

    Real operator() (const Real&, const unsigned long int&) const throw();
    Real operator() (const Real&, const unsigned long int&, const Precision&, const RoundMode&) const throw();
    Real operator() (const Real&, const unsigned long int&, const Precision&) const throw();
    Real operator() (const Real&, const unsigned long int&, const RoundMode&) const throw();
    Real operator() (const Real&, const unsigned int&) const throw();
    Real operator() (const Real&, const unsigned int&, const Precision&, const RoundMode&) const throw();
    Real operator() (const Real&, const unsigned int&, const Precision&) const throw();
    Real operator() (const Real&, const unsigned int&, const RoundMode&) const throw();
    Real operator() (const Real&, const unsigned short int&) const throw();
    Real operator() (const Real&, const unsigned short int&, const Precision&, const RoundMode&) const throw();
    Real operator() (const Real&, const unsigned short int&, const Precision&) const throw();
    Real operator() (const Real&, const unsigned short int&, const RoundMode&) const throw();

    Real operator() (const Real&, const long int&) const throw();
    Real operator() (const Real&, const long int&, const Precision&, const RoundMode&) const throw();
    Real operator() (const Real&, const long int&, const Precision&) const throw();
    Real operator() (const Real&, const long int&, const RoundMode&) const throw();
    Real operator() (const Real&, const int&) const throw();
    Real operator() (const Real&, const int&, const Precision&, const RoundMode&) const throw();
    Real operator() (const Real&, const int&, const Precision&) const throw();
    Real operator() (const Real&, const int&, const RoundMode&) const throw();
    Real operator() (const Real&, const short int&) const throw();
    Real operator() (const Real&, const short int&, const Precision&, const RoundMode&) const throw();
    Real operator() (const Real&, const short int&, const Precision&) const throw();
    Real operator() (const Real&, const short int&, const RoundMode&) const throw();

    Real operator() (const Real&, const mpz_t&) const throw();
    Real operator() (const Real&, const mpz_t&, const Precision&, const RoundMode&) const throw();
    Real operator() (const Real&, const mpz_t&, const Precision&) const throw();
    Real operator() (const Real&, const mpz_t&, const RoundMode&) const throw();

#ifdef GMP_CPP_INTERFACE
    Real operator() (const Real&, const mpz_class&) const throw();
    Real operator() (const Real&, const mpz_class&, const Precision&, const RoundMode&) const throw();
    Real operator() (const Real&, const mpz_class&, const Precision&) const throw();
    Real operator() (const Real&, const mpz_class&, const RoundMode&) const throw();
#endif    // GMP_CPP_INTERFACE

    Real operator() (const Real&, const mpq_t&) const throw();
    Real operator() (const Real&, const mpq_t&, const Precision&, const RoundMode&) const throw();
    Real operator() (const Real&, const mpq_t&, const Precision&) const throw();
    Real operator() (const Real&, const mpq_t&, const RoundMode&) const throw();

#ifdef GMP_CPP_INTERFACE
    Real operator() (const Real&, const mpq_class&) const throw();
    Real operator() (const Real&, const mpq_class&, const Precision&, const RoundMode&) const throw();
    Real operator() (const Real&, const mpq_class&, const Precision&) const throw();
    Real operator() (const Real&, const mpq_class&, const RoundMode&) const throw();
#endif    // GMP_CPP_INTERFACE

    Real operator() (const unsigned long int&, const Real&) const throw();
    Real operator() (const unsigned long int&, const Real&, const Precision&, const RoundMode&) const throw();
    Real operator() (const unsigned long int&, const Real&, const Precision&) const throw();
    Real operator() (const unsigned long int&, const Real&, const RoundMode&) const throw();
    Real operator() (const unsigned int&, const Real&) const throw();
    Real operator() (const unsigned int&, const Real&, const Precision&, const RoundMode&) const throw();
    Real operator() (const unsigned int&, const Real&, const Precision&) const throw();
    Real operator() (const unsigned int&, const Real&, const RoundMode&) const throw();
    Real operator() (const unsigned short int&, const Real&) const throw();
    Real operator() (const unsigned short int&, const Real&, const Precision&, const RoundMode&) const throw();
    Real operator() (const unsigned short int&, const Real&, const Precision&) const throw();
    Real operator() (const unsigned short int&, const Real&, const RoundMode&) const throw();

    Real operator() (const long int&, const Real&) const throw();
    Real operator() (const long int&, const Real&, const Precision&, const RoundMode&) const throw();
    Real operator() (const long int&, const Real&, const Precision&) const throw();
    Real operator() (const long int&, const Real&, const RoundMode&) const throw();
    Real operator() (const int&, const Real&) const throw();
    Real operator() (const int&, const Real&, const Precision&, const RoundMode&) const throw();
    Real operator() (const int&, const Real&, const Precision&) const throw();
    Real operator() (const int&, const Real&, const RoundMode&) const throw();
    Real operator() (const short int&, const Real&) const throw();
    Real operator() (const short int&, const Real&, const Precision&, const RoundMode&) const throw();
    Real operator() (const short int&, const Real&, const Precision&) const throw();
    Real operator() (const short int&, const Real&, const RoundMode&) const throw();

    Real operator() (const mpz_t&, const Real&) const throw();
    Real operator() (const mpz_t&, const Real&, const Precision&, const RoundMode&) const throw();
    Real operator() (const mpz_t&, const Real&, const Precision&) const throw();
    Real operator() (const mpz_t&, const Real&, const RoundMode&) const throw();

    Real operator() (const mpq_t&, const Real&) const throw();
    Real operator() (const mpq_t&, const Real&, const Precision&, const RoundMode&) const throw();
    Real operator() (const mpq_t&, const Real&, const Precision&) const throw();
    Real operator() (const mpq_t&, const Real&, const RoundMode&) const throw();

};
}    // namespace mpfrcpp

Division

namespace mpfrcpp {
class DivClass : public NumericFunction {
public:
    DivClass () throw();
    DivClass (const Precision&, const RoundMode&) throw();
    DivClass (const Precision&) throw();
    DivClass (const RoundMode&) throw();

    Real operator() (const Real&, const Real&) const throw();
    Real operator() (const Real&, const Real&, const Precision&, const RoundMode&) const throw();
    Real operator() (const Real&, const Real&, const Precision&) const throw();
    Real operator() (const Real&, const Real&, const RoundMode&) const throw();

    Real operator() (const Real&, const unsigned long int&) const throw();
    Real operator() (const Real&, const unsigned long int&, const Precision&, const RoundMode&) const throw();
    Real operator() (const Real&, const unsigned long int&, const Precision&) const throw();
    Real operator() (const Real&, const unsigned long int&, const RoundMode&) const throw();
    Real operator() (const Real&, const unsigned int&) const throw();
    Real operator() (const Real&, const unsigned int&, const Precision&, const RoundMode&) const throw();
    Real operator() (const Real&, const unsigned int&, const Precision&) const throw();
    Real operator() (const Real&, const unsigned int&, const RoundMode&) const throw();
    Real operator() (const Real&, const unsigned short int&) const throw();
    Real operator() (const Real&, const unsigned short int&, const Precision&, const RoundMode&) const throw();
    Real operator() (const Real&, const unsigned short int&, const Precision&) const throw();
    Real operator() (const Real&, const unsigned short int&, const RoundMode&) const throw();

    Real operator() (const Real&, const long int&) const throw();
    Real operator() (const Real&, const long int&, const Precision&, const RoundMode&) const throw();
    Real operator() (const Real&, const long int&, const Precision&) const throw();
    Real operator() (const Real&, const long int&, const RoundMode&) const throw();
    Real operator() (const Real&, const int&) const throw();
    Real operator() (const Real&, const int&, const Precision&, const RoundMode&) const throw();
    Real operator() (const Real&, const int&, const Precision&) const throw();
    Real operator() (const Real&, const int&, const RoundMode&) const throw();
    Real operator() (const Real&, const short int&) const throw();
    Real operator() (const Real&, const short int&, const Precision&, const RoundMode&) const throw();
    Real operator() (const Real&, const short int&, const Precision&) const throw();
    Real operator() (const Real&, const short int&, const RoundMode&) const throw();

    Real operator() (const Real&, const mpz_t&) const throw();
    Real operator() (const Real&, const mpz_t&, const Precision&, const RoundMode&) const throw();
    Real operator() (const Real&, const mpz_t&, const Precision&) const throw();
    Real operator() (const Real&, const mpz_t&, const RoundMode&) const throw();

#ifdef GMP_CPP_INTERFACE
    Real operator() (const Real&, const mpz_class&) const throw();
    Real operator() (const Real&, const mpz_class&, const Precision&, const RoundMode&) const throw();
    Real operator() (const Real&, const mpz_class&, const Precision&) const throw();
    Real operator() (const Real&, const mpz_class&, const RoundMode&) const throw();
#endif    // GMP_CPP_INTERFACE

    Real operator() (const Real&, const mpq_t&) const throw();
    Real operator() (const Real&, const mpq_t&, const Precision&, const RoundMode&) const throw();
    Real operator() (const Real&, const mpq_t&, const Precision&) const throw();
    Real operator() (const Real&, const mpq_t&, const RoundMode&) const throw();

#ifdef GMP_CPP_INTERFACE
    Real operator() (const Real&, const mpq_class&) const throw();
    Real operator() (const Real&, const mpq_class&, const Precision&, const RoundMode&) const throw();
    Real operator() (const Real&, const mpq_class&, const Precision&) const throw();
    Real operator() (const Real&, const mpq_class&, const RoundMode&) const throw();
#endif    // GMP_CPP_INTERFACE

    Real operator() (const unsigned long int&, const Real&) const throw();
    Real operator() (const unsigned long int&, const Real&, const Precision&, const RoundMode&) const throw();
    Real operator() (const unsigned long int&, const Real&, const Precision&) const throw();
    Real operator() (const unsigned long int&, const Real&, const RoundMode&) const throw();
    Real operator() (const unsigned int&, const Real&) const throw();
    Real operator() (const unsigned int&, const Real&, const Precision&, const RoundMode&) const throw();
    Real operator() (const unsigned int&, const Real&, const Precision&) const throw();
    Real operator() (const unsigned int&, const Real&, const RoundMode&) const throw();
    Real operator() (const unsigned short int&, const Real&) const throw();
    Real operator() (const unsigned short int&, const Real&, const Precision&, const RoundMode&) const throw();
    Real operator() (const unsigned short int&, const Real&, const Precision&) const throw();
    Real operator() (const unsigned short int&, const Real&, const RoundMode&) const throw();

    Real operator() (const long int&, const Real&) const throw();
    Real operator() (const long int&, const Real&, const Precision&, const RoundMode&) const throw();
    Real operator() (const long int&, const Real&, const Precision&) const throw();
    Real operator() (const long int&, const Real&, const RoundMode&) const throw();
    Real operator() (const int&, const Real&) const throw();
    Real operator() (const int&, const Real&, const Precision&, const RoundMode&) const throw();
    Real operator() (const int&, const Real&, const Precision&) const throw();
    Real operator() (const int&, const Real&, const RoundMode&) const throw();
    Real operator() (const short int&, const Real&) const throw();
    Real operator() (const short int&, const Real&, const Precision&, const RoundMode&) const throw();
    Real operator() (const short int&, const Real&, const Precision&) const throw();
    Real operator() (const short int&, const Real&, const RoundMode&) const throw();

};
}    // namespace mpfrcpp

Negative Sign

namespace mpfrcpp {
class NegClass : public NumericFunction {
public:
    NegClass () throw();
    NegClass (const Precision&, const RoundMode&) throw();
    NegClass (const Precision&) throw();
    NegClass (const RoundMode&) throw();

    Real operator() (const Real&) const throw();
    Real operator() (const Real&, const Precision&, const RoundMode&) const throw();
    Real operator() (const Real&, const Precision&) const throw();
    Real operator() (const Real&, const RoundMode&) const throw();
};
}    // namespace mpfrcpp

Absolute Value

namespace mpfrcpp {
class AbsClass : public NumericFunction {
public:
    AbsClass () throw();
    AbsClass (const Precision&, const RoundMode&) throw();
    AbsClass (const Precision&) throw();
    AbsClass (const RoundMode&) throw();

    Real operator() (const Real&) const throw();
    Real operator() (const Real&, const Precision&, const RoundMode&) const throw();
    Real operator() (const Real&, const Precision&) const throw();
    Real operator() (const Real&, const RoundMode&) const throw();
};
}    // namespace mpfrcpp

Square Root

namespace mpfrcpp {
class SqrtClass : public NumericFunction {
public:
    SqrtClass () throw();
    SqrtClass (const Precision&, const RoundMode&) throw();
    SqrtClass (const Precision&) throw();
    SqrtClass (const RoundMode&) throw();

    Real operator() (const Real&) const throw();
    Real operator() (const Real&, const Precision&, const RoundMode&) const throw();
    Real operator() (const Real&, const Precision&) const throw();
    Real operator() (const Real&, const RoundMode&) const throw();
};
}    // namespace mpfrcpp

Cubic Root

namespace mpfrcpp {
class CbrtClass : public NumericFunction {
public:
    CbrtClass () throw();
    CbrtClass (const Precision&, const RoundMode&) throw();
    CbrtClass (const Precision&) throw();
    CbrtClass (const RoundMode&) throw();

    Real operator() (const Real&) const throw();
    Real operator() (const Real&, const Precision&, const RoundMode&) const throw();
    Real operator() (const Real&, const Precision&) const throw();
    Real operator() (const Real&, const RoundMode&) const throw();
};
}    // namespace mpfrcpp

kth Root

namespace mpfrcpp {
class RootClass : public NumericFunction {
public:
    RootClass () throw();
    RootClass (const Precision&, const RoundMode&) throw();
    RootClass (const Precision&) throw();
    RootClass (const RoundMode&) throw();

    Real operator() (const Real&, const unsigned long int k) const throw();
    Real operator() (const Real&, const unsigned long int k, const Precision&, const RoundMode&) const throw();
    Real operator() (const Real&, const unsigned long int k, const Precision&) const throw();
    Real operator() (const Real&, const unsigned long int k, const RoundMode&) const throw();
    Real operator() (const Real&, const unsigned int k) const throw();
    Real operator() (const Real&, const unsigned int k, const Precision&, const RoundMode&) const throw();
    Real operator() (const Real&, const unsigned int k, const Precision&) const throw();
    Real operator() (const Real&, const unsigned int k, const RoundMode&) const throw();
    Real operator() (const Real&, const unsigned short int k) const throw();
    Real operator() (const Real&, const unsigned short int k, const Precision&, const RoundMode&) const throw();
    Real operator() (const Real&, const unsigned short int k, const Precision&) const throw();
    Real operator() (const Real&, const unsigned short int k, const RoundMode&) const throw();
};
}    // namespace mpfrcpp

Square

namespace mpfrcpp {
class SqrClass : public NumericFunction {
public:
    SqrClass () throw();
    SqrClass (const Precision&, const RoundMode&) throw();
    SqrClass (const Precision&) throw();
    SqrClass (const RoundMode&) throw();

    Real operator() (const Real&) const throw();
    Real operator() (const Real&, const Precision&, const RoundMode&) const throw();
    Real operator() (const Real&, const Precision&) const throw();
    Real operator() (const Real&, const RoundMode&) const throw();
};
}    // namespace mpfrcpp

Power

namespace mpfrcpp {
class PowClass : public NumericFunction {
public:
    PowClass () throw();
    PowClass (const Precision&, const RoundMode&) throw();
    PowClass (const Precision&) throw();
    PowClass (const RoundMode&) throw();

    Real operator() (const Real&, const Real&) const throw();
    Real operator() (const Real&, const Real&, const Precision&, const RoundMode&) const throw();
    Real operator() (const Real&, const Real&, const Precision&) const throw();
    Real operator() (const Real&, const Real&, const RoundMode&) const throw();

    Real operator() (const Real&, const unsigned long int&) const throw();
    Real operator() (const Real&, const unsigned long int&, const Precision&, const RoundMode&) const throw();
    Real operator() (const Real&, const unsigned long int&, const Precision&) const throw();
    Real operator() (const Real&, const unsigned long int&, const RoundMode&) const throw();
    Real operator() (const Real&, const unsigned intint&) const throw();
    Real operator() (const Real&, const unsigned int&, const Precision&, const RoundMode&) const throw();
    Real operator() (const Real&, const unsigned int&, const Precision&) const throw();
    Real operator() (const Real&, const unsigned int&, const RoundMode&) const throw();
    Real operator() (const Real&, const unsigned short int&) const throw();
    Real operator() (const Real&, const unsigned short int&, const Precision&, const RoundMode&) const throw();
    Real operator() (const Real&, const unsigned short int&, const Precision&) const throw();
    Real operator() (const Real&, const unsigned short int&, const RoundMode&) const throw();

    Real operator() (const unsigned long int&, const Real&) const throw();
    Real operator() (const unsigned long int&, const Real&, const Precision&, const RoundMode&) const throw();
    Real operator() (const unsigned long int&, const Real&, const Precision&) const throw();
    Real operator() (const unsigned long int&, const Real&, const RoundMode&) const throw();
    Real operator() (const unsigned int&, const Real&) const throw();
    Real operator() (const unsigned int&, const Real&, const Precision&, const RoundMode&) const throw();
    Real operator() (const unsigned int&, const Real&, const Precision&) const throw();
    Real operator() (const unsigned int&, const Real&, const RoundMode&) const throw();
    Real operator() (const unsigned short int&, const Real&) const throw();
    Real operator() (const unsigned short int&, const Real&, const Precision&, const RoundMode&) const throw();
    Real operator() (const unsigned short int&, const Real&, const Precision&) const throw();
    Real operator() (const unsigned short int&, const Real&, const RoundMode&) const throw();

    Real operator() (const Real&, const long int&) const throw();
    Real operator() (const Real&, const long int&, const Precision&, const RoundMode&) const throw();
    Real operator() (const Real&, const long int&, const Precision&) const throw();
    Real operator() (const Real&, const long int&, const RoundMode&) const throw();
    Real operator() (const Real&, const int&) const throw();
    Real operator() (const Real&, const int&, const Precision&, const RoundMode&) const throw();
    Real operator() (const Real&, const int&, const Precision&) const throw();
    Real operator() (const Real&, const int&, const RoundMode&) const throw();
    Real operator() (const Real&, const short int&) const throw();
    Real operator() (const Real&, const short int&, const Precision&, const RoundMode&) const throw();
    Real operator() (const Real&, const short int&, const Precision&) const throw();
    Real operator() (const Real&, const short int&, const RoundMode&) const throw();

    Real operator() (const Real&, const mpz_t&) const throw();
    Real operator() (const Real&, const mpz_t&, const Precision&, const RoundMode&) const throw();
    Real operator() (const Real&, const mpz_t&, const Precision&) const throw();
    Real operator() (const Real&, const mpz_t&, const RoundMode&) const throw();

#ifdef GMP_CPP_INTERFACE
    Real operator() (const Real&, const mpz_class&) const throw();
    Real operator() (const Real&, const mpz_class&, const Precision&, const RoundMode&) const throw();
    Real operator() (const Real&, const mpz_class&, const Precision&) const throw();
    Real operator() (const Real&, const mpz_class&, const RoundMode&) const throw();
#endif    // GMP_CPP_INTERFACE

    Real operator() (const unsigned long int&, const unsigned long int&) const throw();
    Real operator() (const unsigned long int&, const unsigned long int&, const Precision&, const RoundMode&) const throw();
    Real operator() (const unsigned long int&, const unsigned long int&, const Precision&) const throw();
    Real operator() (const unsigned long int&, const unsigned long int&, const RoundMode&) const throw();

};
}    // namespace mpfrcpp

6.2. Exponential Functions [<mpfrcpp/functions/exponential.hpp>]

Exponential

namespace mpfrcpp {
class ExpClass : public NumericFunction {
public:
    ExpClass () throw();
    ExpClass (const Precision&, const RoundMode&) throw();
    ExpClass (const Precision&) throw();
    ExpClass (const RoundMode&) throw();

    Real operator() (const Real&) const throw ();
    Real operator() (const Real&, const Precision&, const RoundMode&) const throw ();
    Real operator() (const Real&, const Precision&) const throw ();
    Real operator() (const Real&, const RoundMode&) const throw ();
};
}    // namespace mpfrcpp

Exponential of x−1

namespace mpfrcpp {
class Expm1Class : public NumericFunction {
public:
    Expm1Class () throw();
    Expm1Class (const Precision&, const RoundMode&) throw();
    Expm1Class (const Precision&) throw();
    Expm1Class (const RoundMode&) throw();

    Real operator() (const Real&) const throw ();
    Real operator() (const Real&, const Precision&, const RoundMode&) const throw ();
    Real operator() (const Real&, const Precision&) const throw ();
    Real operator() (const Real&, const RoundMode&) const throw ();
};
}    // namespace mpfrcpp

10x

namespace mpfrcpp {
class Exp10Class : public NumericFunction {
public:
    Exp10Class () throw();
    Exp10Class (const Precision&, const RoundMode&) throw();
    Exp10Class (const Precision&) throw();
    Exp10Class (const RoundMode&) throw();

    Real operator() (const Real&) const throw ();
    Real operator() (const Real&, const Precision&, const RoundMode&) const throw ();
    Real operator() (const Real&, const Precision&) const throw ();
    Real operator() (const Real&, const RoundMode&) const throw ();
};
}    // namespace mpfrcpp

2x

namespace mpfrcpp {
class Exp2Class : public NumericFunction {
public:
    Exp2Class () throw();
    Exp2Class (const Precision&, const RoundMode&) throw();
    Exp2Class (const Precision&) throw();
    Exp2Class (const RoundMode&) throw();

    Real operator() (const Real&) const throw ();
    Real operator() (const Real&, const Precision&, const RoundMode&) const throw ();
    Real operator() (const Real&, const Precision&) const throw ();
    Real operator() (const Real&, const RoundMode&) const throw ();
};
}    // namespace mpfrcpp

6.3. Logarithmic Functions [<mpfrcpp/functions/logarithmic.hpp>]

Natural Logarithm

namespace mpfrcpp {
class LogClass : public NumericFunction {
public:
    LogClass () throw();
    LogClass (const Precision&, const RoundMode&) throw();
    LogClass (const Precision&) throw();
    LogClass (const RoundMode&) throw();

    Real operator() (const Real&) const throw ();
    Real operator() (const Real&, const Precision&, const RoundMode&) const throw ();
    Real operator() (const Real&, const Precision&) const throw ();
    Real operator() (const Real&, const RoundMode&) const throw ();
};
}    // namespace mpfrcpp

Decimal Logarithm

namespace mpfrcpp {
class Log10Class : public NumericFunction {
public:
    Log10Class () throw();
    Log10Class (const Precision&, const RoundMode&) throw();
    Log10Class (const Precision&) throw();
    Log10Class (const RoundMode&) throw();

    Real operator() (const Real&) const throw ();
    Real operator() (const Real&, const Precision&, const RoundMode&) const throw ();
    Real operator() (const Real&, const Precision&) const throw ();
    Real operator() (const Real&, const RoundMode&) const throw ();
};
}    // namespace mpfrcpp

Binary Logarithm

namespace mpfrcpp {
class Log2Class : public NumericFunction {
public:
    Log2Class () throw();
    Log2Class (const Precision&, const RoundMode&) throw();
    Log2Class (const Precision&) throw();
    Log2Class (const RoundMode&) throw();

    Real operator() (const Real&) const throw ();
    Real operator() (const Real&, const Precision&, const RoundMode&) const throw ();
    Real operator() (const Real&, const Precision&) const throw ();
    Real operator() (const Real&, const RoundMode&) const throw ();
};
}    // namespace mpfrcpp

Natural Logarithm of x+1

namespace mpfrcpp {
class Log1pClass : public NumericFunction {
public:
    Log1pClass () throw();
    Log1pClass (const Precision&, const RoundMode&) throw();
    Log1pClass (const Precision&) throw();
    Log1pClass (const RoundMode&) throw();

    Real operator() (const Real&) const throw ();
    Real operator() (const Real&, const Precision&, const RoundMode&) const throw ();
    Real operator() (const Real&, const Precision&) const throw ();
    Real operator() (const Real&, const RoundMode&) const throw ();
};
}    // namespace mpfrcpp

6.4. Trigonometric Functions [<mpfrcpp/functions/exponential.hpp>]

Sine

namespace mpfrcpp {
class SinClass : public NumericFunction {
public:
    SinClass () throw();
    SinClass (const Precision&, const RoundMode&) throw();
    SinClass (const Precision&) throw();
    SinClass (const RoundMode&) throw();

    Real operator() (const Real&) const throw ();
    Real operator() (const Real&, const Precision&, const RoundMode&) const throw ();
    Real operator() (const Real&, const Precision&) const throw ();
    Real operator() (const Real&, const RoundMode&) const throw ();
};
}    // namespace mpfrcpp

Sine and Cosine

namespace mpfrcpp {
class SinCosStruct {
public:
    SinCosStruct () throw() {}
    Real sin;
    Real cos;
};

class SinCosClass : public NumericFunction {
public:
    SinCosClass () throw();
    SinCosClass (const Precision&, const RoundMode&) throw();
    SinCosClass (const Precision&) throw();
    SinCosClass (const RoundMode&) throw();

    sinCosStruct operator() (const Real&) const throw ();
    sinCosStruct operator() (const Real&, const Precision&, const RoundMode&) const throw ();
    sinCosStruct operator() (const Real&, const Precision&) const throw ();
    sinCosStruct operator() (const Real&, const RoundMode&) const throw ();
};
}    // namespace mpfrcpp

Cosine

namespace mpfrcpp {
class CosClass : public NumericFunction {
public:
    CosClass () throw();
    CosClass (const Precision&, const RoundMode&) throw();
    CosClass (const Precision&) throw();
    CosClass (const RoundMode&) throw();

    Real operator() (const Real&) const throw ();
    Real operator() (const Real&, const Precision&, const RoundMode&) const throw ();
    Real operator() (const Real&, const Precision&) const throw ();
    Real operator() (const Real&, const RoundMode&) const throw ();
};
}    // namespace mpfrcpp

Secant

namespace mpfrcpp {
class SecClass : public NumericFunction {
public:
    SecClass () throw();
    SecClass (const Precision&, const RoundMode&) throw();
    SecClass (const Precision&) throw();
    SecClass (const RoundMode&) throw();

    Real operator() (const Real&) const throw ();
    Real operator() (const Real&, const Precision&, const RoundMode&) const throw ();
    Real operator() (const Real&, const Precision&) const throw ();
    Real operator() (const Real&, const RoundMode&) const throw ();
};
}    // namespace mpfrcpp

Cosecant

namespace mpfrcpp {
class CscClass : public NumericFunction {
public:
    CscClass () throw();
    CscClass (const Precision&, const RoundMode&) throw();
    CscClass (const Precision&) throw();
    CscClass (const RoundMode&) throw();

    Real operator() (const Real&) const throw ();
    Real operator() (const Real&, const Precision&, const RoundMode&) const throw ();
    Real operator() (const Real&, const Precision&) const throw ();
    Real operator() (const Real&, const RoundMode&) const throw ();
};
}    // namespace mpfrcpp

Tangent

namespace mpfrcpp {
class TanClass : public NumericFunction {
public:
    TanClass () throw();
    TanClass (const Precision&, const RoundMode&) throw();
    TanClass (const Precision&) throw();
    TanClass (const RoundMode&) throw();

    Real operator() (const Real&) const throw ();
    Real operator() (const Real&, const Precision&, const RoundMode&) const throw ();
    Real operator() (const Real&, const Precision&) const throw ();
    Real operator() (const Real&, const RoundMode&) const throw ();
};
}    // namespace mpfrcpp

Cotangent

namespace mpfrcpp {
class CotClass : public NumericFunction {
public:
    CotClass () throw();
    CotClass (const Precision&, const RoundMode&) throw();
    CotClass (const Precision&) throw();
    CotClass (const RoundMode&) throw();

    Real operator() (const Real&) const throw ();
    Real operator() (const Real&, const Precision&, const RoundMode&) const throw ();
    Real operator() (const Real&, const Precision&) const throw ();
    Real operator() (const Real&, const RoundMode&) const throw ();
};
}    // namespace mpfrcpp

6.5. Inverse Trigonometric Functions [<mpfrcpp/functions/inverse_trigonometric.hpp>]

Arc-sine

namespace mpfrcpp {
class AsinClass : public NumericFunction {
public:
    AsinClass () throw();
    AsinClass (const Precision&, const RoundMode&) throw();
    AsinClass (const Precision&) throw();
    AsinClass (const RoundMode&) throw();

    Real operator() (const Real&) const throw ();
    Real operator() (const Real&, const Precision&, const RoundMode&) const throw ();
    Real operator() (const Real&, const Precision&) const throw ();
    Real operator() (const Real&, const RoundMode&) const throw ();
};
}    // namespace mpfrcpp

Arc-cosine

namespace mpfrcpp {
class AcosClass : public NumericFunction {
public:
    AcosClass () throw();
    AcosClass (const Precision&, const RoundMode&) throw();
    AcosClass (const Precision&) throw();
    AcosClass (const RoundMode&) throw();

    Real operator() (const Real&) const throw ();
    Real operator() (const Real&, const Precision&, const RoundMode&) const throw ();
    Real operator() (const Real&, const Precision&) const throw ();
    Real operator() (const Real&, const RoundMode&) const throw ();
};
}    // namespace mpfrcpp

Arc-tangent

namespace mpfrcpp {
class AtanClass : public NumericFunction {
public:
    AtanClass () throw();
    AtanClass (const Precision&, const RoundMode&) throw();
    AtanClass (const Precision&) throw();
    AtanClass (const RoundMode&) throw();

    Real operator() (const Real&) const throw ();
    Real operator() (const Real&, const Precision&, const RoundMode&) const throw ();
    Real operator() (const Real&, const Precision&) const throw ();
    Real operator() (const Real&, const RoundMode&) const throw ();
};
}    // namespace mpfrcpp

Arc-tangent 2

namespace mpfrcpp {
class Atan2Class : public NumericFunction {
public:
    Atan2Class () throw();
    Atan2Class (const Precision&, const RoundMode&) throw();
    Atan2Class (const Precision&) throw();
    Atan2Class (const RoundMode&) throw();

    Real operator() (const Real&, const Real&) const throw ();
    Real operator() (const Real&, const Real&, const Precision&, const RoundMode&) const throw ();
    Real operator() (const Real&, const Real&, const Precision&) const throw ();
    Real operator() (const Real&, const Real&, const RoundMode&) const throw ();
};
}    // namespace mpfrcpp

6.6. Hyperbolic Functions [<mpfrcpp/functions/hyperbolic.hpp>]

Hyperbolic Sine

namespace mpfrcpp {
class SinhClass : public NumericFunction {
public:
    SinhClass () throw();
    SinhClass (const Precision&, const RoundMode&) throw();
    SinhClass (const Precision&) throw();
    SinhClass (const RoundMode&) throw();

    Real operator() (const Real&) const throw ();
    Real operator() (const Real&, const Precision&, const RoundMode&) const throw ();
    Real operator() (const Real&, const Precision&) const throw ();
    Real operator() (const Real&, const RoundMode&) const throw ();
};
}    // namespace mpfrcpp

Hyperbolic Cosine

namespace mpfrcpp {
class CoshClass : public NumericFunction {
public:
    CoshClass () throw();
    CoshClass (const Precision&, const RoundMode&) throw();
    CoshClass (const Precision&) throw();
    CoshClass (const RoundMode&) throw();

    Real operator() (const Real&) const throw ();
    Real operator() (const Real&, const Precision&, const RoundMode&) const throw ();
    Real operator() (const Real&, const Precision&) const throw ();
    Real operator() (const Real&, const RoundMode&) const throw ();
};
}    // namespace mpfrcpp

Hyperbolic Secant

namespace mpfrcpp {
class SechClass : public NumericFunction {
public:
    SechClass () throw();
    SechClass (const Precision&, const RoundMode&) throw();
    SechClass (const Precision&) throw();
    SechClass (const RoundMode&) throw();

    Real operator() (const Real&) const throw ();
    Real operator() (const Real&, const Precision&, const RoundMode&) const throw ();
    Real operator() (const Real&, const Precision&) const throw ();
    Real operator() (const Real&, const RoundMode&) const throw ();
};
}    // namespace mpfrcpp

Hyperbolic Cosecant

namespace mpfrcpp {
class CschClass : public NumericFunction {
public:
    CschClass () throw();
    CschClass (const Precision&, const RoundMode&) throw();
    CschClass (const Precision&) throw();
    CschClass (const RoundMode&) throw();

    Real operator() (const Real&) const throw ();
    Real operator() (const Real&, const Precision&, const RoundMode&) const throw ();
    Real operator() (const Real&, const Precision&) const throw ();
    Real operator() (const Real&, const RoundMode&) const throw ();
};
}    // namespace mpfrcpp

Hyperbolic Tangent

namespace mpfrcpp {
class TanhClass : public NumericFunction {
public:
    TanhClass () throw();
    TanhClass (const Precision&, const RoundMode&) throw();
    TanhClass (const Precision&) throw();
    TanhClass (const RoundMode&) throw();

    Real operator() (const Real&) const throw ();
    Real operator() (const Real&, const Precision&, const RoundMode&) const throw ();
    Real operator() (const Real&, const Precision&) const throw ();
    Real operator() (const Real&, const RoundMode&) const throw ();
};
}    // namespace mpfrcpp

Hyperbolic Cotangent

namespace mpfrcpp {
class CothClass : public NumericFunction {
public:
    CothClass () throw();
    CothClass (const Precision&, const RoundMode&) throw();
    CothClass (const Precision&) throw();
    CothClass (const RoundMode&) throw();

    Real operator() (const Real&) const throw ();
    Real operator() (const Real&, const Precision&, const RoundMode&) const throw ();
    Real operator() (const Real&, const Precision&) const throw ();
    Real operator() (const Real&, const RoundMode&) const throw ();
};
}    // namespace mpfrcpp

6.7. Inverse Hyperbolic Functions [<mpfrcpp/functions/inverse_hyperbolic.hpp>]

Inverse Hyperbolic Sine

namespace mpfrcpp {
class AsinhClass : public NumericFunction {
public:
    AsinhClass () throw();
    AsinhClass (const Precision&, const RoundMode&) throw();
    AsinhClass (const Precision&) throw();
    AsinhClass (const RoundMode&) throw();

    Real operator() (const Real&) const throw ();
    Real operator() (const Real&, const Precision&, const RoundMode&) const throw ();
    Real operator() (const Real&, const Precision&) const throw ();
    Real operator() (const Real&, const RoundMode&) const throw ();
};
}    // namespace mpfrcpp

Inverse Hyperbolic Cosine

namespace mpfrcpp {
class AcoshClass : public NumericFunction {
public:
    AcoshClass () throw();
    AcoshClass (const Precision&, const RoundMode&) throw();
    AcoshClass (const Precision&) throw();
    AcoshClass (const RoundMode&) throw();

    Real operator() (const Real&) const throw ();
    Real operator() (const Real&, const Precision&, const RoundMode&) const throw ();
    Real operator() (const Real&, const Precision&) const throw ();
    Real operator() (const Real&, const RoundMode&) const throw ();
};
}    // namespace mpfrcpp

Inverse Hyperbolic Tangent

namespace mpfrcpp {
class AtanhClass : public NumericFunction {
public:
    AtanhClass () throw();
    AtanhClass (const Precision&, const RoundMode&) throw();
    AtanhClass (const Precision&) throw();
    AtanhClass (const RoundMode&) throw();

    Real operator() (const Real&) const throw ();
    Real operator() (const Real&, const Precision&, const RoundMode&) const throw ();
    Real operator() (const Real&, const Precision&) const throw ();
    Real operator() (const Real&, const RoundMode&) const throw ();
};
}    // namespace mpfrcpp

6.8. Special Functions [<mpfrcpp/functions/exponential.hpp>]

Error Function

namespace mpfrcpp {
class ErfClass : public NumericFunction {
public:
    ErfClass () throw();
    ErfClass (const Precision&, const RoundMode&) throw();
    ErfClass (const Precision&) throw();
    ErfClass (const RoundMode&) throw();

    Real operator() (const Real&) const throw();
    Real operator() (const Real&, const Precision&, const RoundMode&) const throw();
    Real operator() (const Real&, const Precision&) const throw();
    Real operator() (const Real&, const RoundMode&) const throw();
};
}    // namespace mpfrcpp

Complementary Error Function

namespace mpfrcpp {
class ErfcClass : public NumericFunction {
public:
    ErfcClass () throw();
    ErfcClass (const Precision&, const RoundMode&) throw();
    ErfcClass (const Precision&) throw();
    ErfcClass (const RoundMode&) throw();

    Real operator() (const Real&) const throw();
    Real operator() (const Real&, const Precision&, const RoundMode&) const throw();
    Real operator() (const Real&, const Precision&) const throw();
    Real operator() (const Real&, const RoundMode&) const throw();
};
}    // namespace mpfrcpp

Exponential Integral

namespace mpfrcpp {
class EintClass : public NumericFunction {
public:
    EintClass () throw();
    EintClass (const Precision&, const RoundMode&) throw();
    EintClass (const Precision&) throw();
    EintClass (const RoundMode&) throw();

    Real operator() (const Real&) const throw();
    Real operator() (const Real&, const Precision&, const RoundMode&) const throw();
    Real operator() (const Real&, const Precision&) const throw();
    Real operator() (const Real&, const RoundMode&) const throw();
};
}    // namespace mpfrcpp

Gamma Function

namespace mpfrcpp {
class GammaClass : public NumericFunction {
public:
    GammaClass () throw();
    GammaClass (const Precision&, const RoundMode&) throw();
    GammaClass (const Precision&) throw();
    GammaClass (const RoundMode&) throw();

    Real operator() (const Real&) const throw();
    Real operator() (const Real&, const Precision&, const RoundMode&) const throw();
    Real operator() (const Real&, const Precision&) const throw();
    Real operator() (const Real&, const RoundMode&) const throw();
};
}    // namespace mpfrcpp

Gamma Function Logarithm

namespace mpfrcpp {
class LngammaClass : public NumericFunction {
public:
    LngammaClass () throw();
    LngammaClass (const Precision&, const RoundMode&) throw();
    LngammaClass (const Precision&) throw();
    LngammaClass (const RoundMode&) throw();

    Real operator() (const Real&) const throw();
    Real operator() (const Real&, const Precision&, const RoundMode&) const throw();
    Real operator() (const Real&, const Precision&) const throw();
    Real operator() (const Real&, const RoundMode&) const throw();
};
}    // namespace mpfrcpp

Riemann Zeta Function

namespace mpfrcpp {
class ZetaClass : public NumericFunction {
public:
    ZetaClass () throw();
    ZetaClass (const Precision&, const RoundMode&) throw();
    ZetaClass (const Precision&) throw();
    ZetaClass (const RoundMode&) throw();

    Real operator() (const Real&) const throw();
    Real operator() (const Real&, const Precision&, const RoundMode&) const throw();
    Real operator() (const Real&, const Precision&) const throw();
    Real operator() (const Real&, const RoundMode&) const throw();
};
}    // namespace mpfrcpp
namespace mpfrcpp {
class CeilClass : public NumericFunction {
private:
// hide setRoundMode() and getRoundMode ()
    void setRoundMode (const RoundMode&) throw();
    RoundMode getRoundMode () const throw();

public:
    TruncClass () throw();
    TruncClass (const Precision&) throw();

    Real operator() (const Real&) const throw ();
    Real operator() (const Real&, const Precision&) const throw ();
};

class FloorClass : public NumericFunction {
private:
// hide setRoundMode() and getRoundMode ()
    void setRoundMode (const RoundMode&) throw();
    RoundMode getRoundMode () const throw();

public:
    TruncClass () throw();
    TruncClass (const Precision&) throw();

    Real operator() (const Real&) const throw ();
    Real operator() (const Real&, const Precision&) const throw ();
};

class RoundClass : public NumericFunction {
private:
// hide setRoundMode() and getRoundMode ()
    void setRoundMode (const RoundMode&) throw();
    RoundMode getRoundMode () const throw();

public:
    TruncClass () throw();
    TruncClass (const Precision&) throw();

    Real operator() (const Real&) const throw ();
    Real operator() (const Real&, const Precision&) const throw ();
};

class TruncClass : public NumericFunction {
private:
// hide setRoundMode() and getRoundMode ()
    void setRoundMode (const RoundMode&) throw();
    RoundMode getRoundMode () const throw();

public:
    TruncClass () throw();
    TruncClass (const Precision&) throw();

    Real operator() (const Real&) const throw ();
    Real operator() (const Real&, const Precision&) const throw ();
};

class FracClass : public NumericFunction {
public:
    FracClass () throw();
    FracClass (const Precision&, const RoundMode&) throw();
    FracClass (const Precision&) throw();
    FracClass (const RoundMode&) throw();

    Real operator() (const Real&) const throw ();
    Real operator() (const Real&, const Precision&, const RoundMode&) const throw ();
    Real operator() (const Real&, const Precision&) const throw ();
    Real operator() (const Real&, const RoundMode&) const throw ();
};
}    // namespace mpfrcpp

6.10. Miscellaneous Functions [<mpfrcpp/functions/miscellaneous.hpp>]

Arithmetic-Geometric Mean

namespace mpfrcpp {
class AgmClass : public NumericFunction {
public:
    AgmClass () throw();
    AgmClass (const Precision&, const RoundMode&) throw();
    AgmClass (const Precision&) throw();
    AgmClass (const RoundMode&) throw();

    Real operator() (const Real&, const Real&) const throw();
    Real operator() (const Real&, const Real&, const Precision&, const RoundMode&) const throw();
    Real operator() (const Real&, const Real&, const Precision&) const throw();
    Real operator() (const Real&, const Real&, const RoundMode&) const throw();
};
}    // namespace mpfrcpp

Euclidean Norm

namespace mpfrcpp {
class HypotClass : public NumericFunction {
public:
    HypotClass () throw();
    HypotClass (const Precision&, const RoundMode&) throw();
    HypotClass (const Precision&) throw();
    HypotClass (const RoundMode&) throw();

    Real operator() (const Real&, const Real&) const throw();
    Real operator() (const Real&, const Real&, const Precision&, const RoundMode&) const throw();
    Real operator() (const Real&, const Real&, const Precision&) const throw();
    Real operator() (const Real&, const Real&, const RoundMode&) const throw();
};
}    // namespace mpfrcpp

Factorial

namespace mpfrcpp {
class FactorialClass : public NumericFunction {
public:
    FactorialClass () throw();
    FactorialClass (const Precision&, const RoundMode&) throw();
    FactorialClass (const Precision&) throw();
    FactorialClass (const RoundMode&) throw();

    Real operator() (const unsigned long int&) const throw();
    Real operator() (const unsigned long int&, const Precision&, const RoundMode&) const throw();
    Real operator() (const unsigned long int &, const Precision&) const throw();
    Real operator() (const unsigned long int&, const RoundMode&) const throw();

    Real operator() (const unsigned int&) const throw();
    Real operator() (const unsigned int&, const Precision&, const RoundMode&) const throw();
    Real operator() (const unsigned int&, const Precision&) const throw();
    Real operator() (const unsigned int&, const RoundMode&) const throw();

    Real operator() (const unsigned short int&) const throw();
    Real operator() (const unsigned short int&, const Precision&, const RoundMode&) const throw();
    Real operator() (const unsigned short int&, const Precision&) const throw();
    Real operator() (const unsigned short int&, const RoundMode&) const throw();
};
}    // namespace mpfrcpp

Fast Multiplication-Addition

namespace mpfrcpp {
class FmaClass : public NumericFunction {
public:
    FmaClass () throw();
    FmaClass (const Precision&, const RoundMode&) throw();
    FmaClass (const Precision&) throw();
    FmaClass (const RoundMode&) throw();

    Real operator() (const Real&, const Real&, const Real&) const throw();
    Real operator() (const Real&, const Real&, const Real&, const Precision&, const RoundMode&) const throw();
    Real operator() (const Real&, const Real&, const Real&, const Precision&) const throw();
    Real operator() (const Real&, const Real&, const Real&, const RoundMode&) const throw();
};
}    // namespace mpfrcpp

6.11. Numeric Constants [<mpfrcpp/functions/constants.hpp>]

namespace mpfrcpp {
class ConstantClass : public NumericFunction {
public:

    ConstantClass () throw ();
    ConstantClass (const Precision&, const RoundMode&) throw ();
    ConstantClass (const Precision&) throw ();
    ConstantClass (const RoundMode&) throw ();

    Real log2 () const throw ();
    Real log2 (const Precision&, const RoundMode&) const throw ();
    Real log2 (const Precision&) const throw ();
    Real log2 (const RoundMode&) const throw ();

    Real pi () const throw ();
    Real pi (const Precision&, const RoundMode&) const throw ();
    Real pi (const Precision&) const throw ();
    Real pi (const RoundMode&) const throw ();

    Real Euler () const throw ();
    Real Euler (const Precision&, const RoundMode&) const throw ();
    Real Euler (const Precision&) const throw ();
    Real Euler (const RoundMode&) const throw ();

    Real Catalan () const throw ();
    Real Catalan (const Precision&, const RoundMode&) const throw ();
    Real Catalan (const Precision&) const throw ();
    Real Catalan (const RoundMode&) const throw ();

    void cache (bool) throw ();
    bool isCached () const throw ();
    static void freeCache () throw ();

};
}    // namespace mpfrcpp

6.12. Random Numbers [<mpfrcpp/functions/random.hpp>]

namespace mpfrcpp {
class Random {
public:
    static Real random2 (const mp_size_t&, const Exponent&,
                         const Precision& =
                            Real::getParameters().getDefaultPrecision()) throw();

    static Real urandomb (RandomState,
                          const Precision& =
                            Real::getParameters().getDefaultPrecision()) throw();

    static Real urandomb (const Precision& =
                            Real::getParameters().getDefaultPrecision()) throw();

    static RandomState& getDefaultRandomState () throw();
    static void setDefaultRandomState (const RandomState&) throw();
};
}    // namespace mpfrcpp

7. Library Initialization [<mpfrcpp/initialization/*>]

7.1. NumericFunctions — GlobalParameters Binder [<mpfrcpp/library/numeric_functions_global_parameters_binder.hpp>]

namespace mpfrcpp {
class NumericFunctionsGlobalParametersBinder {
public:
    NumericFunctionsGlobalParametersBinder (NumericFunctions*,
                                            GlobalParameters*) throw();
    void setPrecision (const Precision&) throw();
    void setRoundMode (const RoundMode&) throw();
    void synchronize () throw();
    Precision getPrecision () const throw(); // uses GlobalParameters data
    RoundMode getRoundMode () const throw(); // uses GlobalParameters data
};
}    // namespace mpfrcpp

7.2. Default Parameters [<mpfrcpp/initialization/default_parameters.hpp>]

namespace mpfrcpp {
extern GlobalParameters Parameters;
// Link with class Real parameters field
}    // namespace mpfrcpp

7.3. Initialization [<mpfrcpp/initialization/initialization.hpp>]

namespace mpfrcpp {
extern  ConstantClass   Constant;
extern  AbsClass        Abs;
extern  AcosClass       Acos;
extern  AcoshClass      Acosh;
extern  AddClass        Add;
extern  AgmClass        Agm;
extern  AsinClass       Asin;
extern  AsinhClass      Asinh;
extern  Atan2Class      Atan2;
extern  AtanClass       Atan;
extern  AtanhClass      Atanh;
extern  CbrtClass       Cbrt;
extern  CeilClass       Ceil;
extern  CosClass        Cos;
extern  CoshClass       Cosh;
extern  CotClass        Cot;
extern  CothClass       Coth;
extern  CscClass        Csc;
extern  CschClass       Csch;
extern  DivClass        Div;
extern  EintClass       Eint;
extern  ErfClass        Erf;
extern  ErfcClass       Erfc;
extern  Exp10Class      Exp10;
extern  Exp2Class       Exp2;
extern  ExpClass        Exp;
extern  Expm1Class      Expm1;
extern  FactorialClass  Factorial;
extern  FloorClass      Floor;
extern  FmaClass        Fma;
extern  FracClass       Frac;
extern  GammaClass      Gamma;
extern  HypotClass      Hypot;
extern  LngammaClass    Lngamma;
extern  Log10Class      Log10;
extern  Log1pClass      Log1p;
extern  Log2Class       Log2;
extern  LogClass        Log;
extern  MulClass        Mul;
extern  NegClass        Neg;
extern  PowClass        Pow;
extern  RootClass       Root;
extern  RoundClass      Round;
extern  SecClass        Sec;
extern  SechClass       Sech;
extern  SinClass        Sin;
extern  SinCosClass     SinCos;
extern  SinhClass       Sinh;
extern  SqrClass        Sqr;
extern  SqrtClass       Sqrt;
extern  SubClass        Sub;
extern  TanClass        Tan;
extern  TanhClass       Tanh;
extern  TruncClass      Trunc;
extern  ZetaClass       Zeta;

extern NumericFunctions Functions;

extern Real Infinity;
extern Real NaN;

extern NumericFunctionsGlobalParametersBinder Library;
}    // namespace mpfrcpp