MPFRCPP Interface Specification

Note


Contents


1. Headers

<mpfrcpp/mpfrcpp.hpp>
MPFRCPP with pre-defined global objects
<mpfrcpp/mpfrcpp_uninitialized.hpp>
MPFRCPP without pre-defined global objects

2. Macro

#define MPFRCPP_VERSION_MAJOR 1
#define MPFRCPP_VERSION_MINOR 4
#define MPFRCPP_VERSION_PATCHLEVEL 2

Do not use MPFRCPP_VERSION_ definitions unless you really need preprocessing. Use Version class.


3. Library Classes

3.1. Exceptions

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

namespace mpfr {

    class ComparisonWithNaNError : public std::exception {
        public:
            ComparisonWithNaNError ();
            const char* what () const throw();
    };

    class ConversionDoesNotFitsError : public std::exception {
        public:
            ConversionDoesNotFitsError ();
            const char* what () const throw();
    };

    class InvalidNumberStringError : public std::exception {
        public:
            InvalidNumberStringError ();
            const char* what () const throw();
    };

    class StringOutputError : public std::exception {
        public:
            StringOutputError ();
            const char* what () const throw();
    };

    class UnknownRoundModeError : public std::exception {
        public:
            UnknownRoundModeError ();
            const char* what () const throw();
    };

} // namespace mpfr

3.2. Flags

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

namespace mpfr {

    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 mpfr

3.3. Global Parameters

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 mpfr {

    class GlobalParameters {
        public:

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

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

            Precision getDefaultPrecision () const throw();
            void setDefaultPrecision (const Precision&) throw();
            RoundMode getDefaultRoundMode () const throw();
            void setDefaultRoundMode (const RoundMode&) 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() {
                return mpfr_set_emin(e.getMpExpT());
            }
            static Exponent getExponentMin () throw();
            static int setExponentMax (const Exponent&) throw();
            static Exponent getExponentMax () throw();

            static inline Exponent getExponentMinMin() throw();
            static inline Exponent getExponentMinMax() throw();
            static inline Exponent getExponentMaxMin() throw();
            static inline Exponent getExponentMaxMax() throw();
    };

} // namespace mpfr

3.4. NumericFunctions — GlobalParameters Binder

namespace mpfr {

    class NumericFunctionsGlobalParametersBinder {
        public:
            NumericFunctionsGlobalParametersBinder (NumericFunctions&, GlobalParameters&) throw();

            void setPrecision (const Precision&) throw();
            void setRoundMode (const RoundMode&) throw();

            void synchronize() throw();

            Precision getPrecision () const throw();
            RoundMode getRoundMode () const throw();
    };

} // namespace mpfr

4. Core Classes

4.1. Primitive Wrapper

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 mpfr {

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

    template <typename T, class BounderT = Bounder<T> > class PrimitiveWrapper {
        public:
            PrimitiveWrapper (const T&) throw();
            PrimitiveWrapper (const PrimitiveWrapper<T>&) throw();

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

            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 mpfr

4.2. Number Base

namespace mpfr {

    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) throw();

            unsigned short int getInt () const throw();
            void setInt (unsigned short int) throw();
    };

} // namespace mpfr

4.3. Number Exponent

namespace mpfr {

    class ExponentBounder : public Bounder<mp_exp_t> {
        public:
            ExponentBounder () throw();
            mp_exp_t operator() (const mp_exp_t&) const throw();
    };

    class Exponent : public PrimitiveWrapper<mp_exp_t, ExponentBounder> {
        public:
            Exponent (mp_exp_t x) throw();

            mp_exp_t getMpExpT () const throw();
            void setMpExpT (mp_exp_t) throw();
    };

} // namespace mpfr

4.4. Number Precision

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

namespace mpfr {

    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) throw();

            mpfr_prec_t getMpfrPrecT () const throw();
            void setMpfrPrecT (mpfr_prec_t) throw();
    };

} // namespace mpfr

4.5. Round Mode

namespace mpfr {

    class RoundMode {
    public:

        RoundMode (const std::float_round_style&) throw();

        bool operator== (const RoundMode&) const throw();
        bool operator!= (const RoundMode&) const throw();

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

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

        const char* toString() const throw (UnknownRoundModeError);
        operator std::string() const throw (UnknownRoundModeError);

    };

} // namespace mpfr

Avoid constructing RoundMode. Use pre-defined objects:

namespace mpfr {
    extern RoundMode roundTowardZero;
    extern RoundMode roundToNearest;
    extern RoundMode roundTowardInfinity;
    extern RoundMode roundTowardNegInfinity;
} // namespace mpfr

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 mpfr::roundTowardZero
To nearest GMP_RNDN std::round_to_nearest mpfr::roundToNearest
Toward infinity GMP_RNDU std::round_toward_infinity mpfr::roundTowardInfinity
Toward negative infinity GMP_RNDD std::round_toward_neg_infinity mpfr::roundTowardNegInfinity

4.6. Product (Library) Version

namespace mpfr {

    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 ();

        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 mpfr

4.7. Numeric Functions

NumericFunction is the base for every MPFRCPP numeric function.

namespace mpfr {
    class NumericFunction {
        public:

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

        Precision getPrecision () const throw();
        RoundMode getRoundMode () const throw();

        void setPrecision (const Precision&) throw();
        void setRoundMode (const RoundMode&) throw();
    };
} // namespace mpfr

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

namespace mpfr {

    class NumericFunctions {
        public :
            NumericFunctions () throw();

            void erase (NumericFunction*) throw();
            void erase (NumericFunction&) throw();

            // NOTE: insertion keeps precision and round mode
            void insert (NumericFunction&) throw();

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

} // namespace mpfr

4.8. Random State

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

namespace mpfr {

    class RandomState {
    public:
        // Mersenne Twister algorithm
        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();

        RandomState (const RandomState&) throw();
        RandomState (const gmp_randstate_t&) throw();

        RandomState& operator= (const RandomState&) 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 mpfr

5. Class Real

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

namespace mpfr {

    class Real {
        public:

            /**
             * Constructors
             */

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

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

            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& base, const Precision& = getParameters().getDefaultPrecision(),
                  const RoundMode& = getParameters().getDefaultRoundMode()) throw (InvalidNumberStringError);
            Real (const std::string&, const Base& base, const RoundMode&) throw (InvalidNumberStringError);
            Real (const std::string&, const Precision& = getParameters().getDefaultPrecision()) throw (InvalidNumberStringError);
            Real (const std::string&, const RoundMode&) throw (InvalidNumberStringError);

            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();

            ~Real() throw();

            /**
             * Static methods
             */

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

            /**
             * Non-static methods
             */

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

            int checkRange () throw();

            Exponent getExponent () 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();
            void setExponent (const Exponent&) throw();
            void setPrecision(const Precision&) throw();
            void setPrecision(mpfr_prec_t pr) 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();
            Real& operator= (const mpz_class&) throw();
            Real& operator= (const mpq_class&) throw();
            Real& operator= (const mpf_class&) throw();

            Real& operator= (const std::string&) throw();
            Real& operator= (bool y) 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);
            operator mpz_class () const throw();
            operator mpf_class () const throw();

            operator std::string() const throw (StringOutputError);
            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 mpz_class&) const throw();
            Real operator+ (const mpq_class&) 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 mpz_class&) const throw();
            Real operator- (const mpq_class&) 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 mpz_class&) const throw();
            Real operator* (const mpq_class&) 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 mpz_class&) const throw();
            Real operator/ (const mpq_class&) 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 mpz_class&) const throw();

            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 mpfr

5.1. Arithmetic Operators

(In-class operator overloads are listed above.)

namespace mpfr {

/**
 * Arithmetic operators
 */

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();

/**
 * Subtraction
 */

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();

/**
 * Multiplication
 */

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();

Real operator* (const mpz_class&, const Real&) throw();
Real operator* (const mpq_class&, const Real&) throw();

/**
 * Division
 */

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();

/**
 * Power
 */

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();

/**
 * Operations with assignment
 */

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 mpfr

5.2. Stream I/O

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

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

6. Functions

This section describes function objects in MPFRCPP. For simple functions see Extra Modules.

6.1. Basic Arithmetic Functions

namespace mpfr {

/**
 * @class AddClass
 * Addition
 */

    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 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 Real&) 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 long int&) 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 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 long int&) 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 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 mpz_t&) 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();
            Real operator() (const Real&, const mpz_class&) 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 Real&, const mpq_t&) 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();
            Real operator() (const Real&, const mpq_class&) 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();

            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();

            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();

            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();

    };    // AddClass


/**
 * @class SubClass
 * Subtraction
 */

    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 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 Real&) 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 long int&) 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 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 long int&) 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 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 mpz_t&) 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();
            Real operator() (const Real&, const mpz_class&) 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 Real&, const mpq_t&) 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();
            Real operator() (const Real&, const mpq_class&) 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 long int&, const Real&) 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 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 long int&, const Real&) 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();
    };    // SubClass


/**
 * @class MulClass
 * Multiplication
 */

    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 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 Real&) 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 long int&) 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 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 long int&) 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 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 mpz_t&) 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();
            Real operator() (const Real&, const mpz_class&) 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 Real&, const mpq_t&) 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();
            Real operator() (const Real&, const mpq_class&) 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();

            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();

            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();

            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();

    };    // MulClass


/**
 * @class DivClass
 * Division
 */

    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 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 Real&) 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 long int&) 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 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 long int&) 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 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 mpz_t&) 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();
            Real operator() (const Real&, const mpz_class&) 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 Real&, const mpq_t&) 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();
            Real operator() (const Real&, const mpq_class&) 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 long int&, const Real&) 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 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 long int&, const Real&) 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();
    };    // DivClass


/**
 * @class NegClass
 * Unary negative sign
 */

    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 Precision&, const RoundMode&) const throw();
            Real operator() (const Real&, const Precision&) const throw();
            Real operator() (const Real&, const RoundMode&) const throw();
            Real operator() (const Real&) const throw();
    };


/**
 * @class AbsClass
 * Absolute value
 */

    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 Precision&, const RoundMode&) const throw();
            Real operator() (const Real&, const Precision&) const throw();
            Real operator() (const Real&, const RoundMode&) const throw();
            Real operator() (const Real&) const throw();
    };


/**
 * @class SqrtClass
 * Square root
 */

    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 Precision&, const RoundMode&) const throw();
            Real operator() (const Real&, const Precision&) const throw();
            Real operator() (const Real&, const RoundMode&) const throw();
            Real operator() (const Real&) const throw();
    };


/**
 * @class CbrtClass
 * Cubic root
 */

    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 Precision&, const RoundMode&) const throw();
            Real operator() (const Real&, const Precision&) const throw();
            Real operator() (const Real&, const RoundMode&) const throw();
            Real operator() (const Real&) const throw();
    };


/**
 * @class RootClass
 * k-th root
 */

    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 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 long int k) 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();
    };


/**
 * @class SqrClass
 * Square
 */

    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 Precision&, const RoundMode&) const throw();
            Real operator() (const Real&, const Precision&) const throw();
            Real operator() (const Real&, const RoundMode&) const throw();
            Real operator() (const Real&) const throw();
    };


/**
 * @class PowClass
 * Power
 */

    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 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 Real&) 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 long int&) 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 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 long int&, const Real&) 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 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 long int&) 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 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 mpz_t&) 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();
            Real operator() (const Real&, const mpz_class&) 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();
            Real operator() (const unsigned long int&, const unsigned long int&) const throw();
    };

} // namespace mpfr

6.2. Exponential Functions

namespace mpfr {

/**
 * @class ExpClass
 * Exponential
 */

    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 Precision&, const RoundMode&) const throw ();
            Real operator() (const Real&, const Precision&) const throw ();
            Real operator() (const Real&, const RoundMode&) const throw ();
            Real operator() (const Real&) const throw ();
    };


/**
 * @class Exp10Class
 * 10^x
 */

    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 Precision&, const RoundMode&) const throw ();
            Real operator() (const Real&, const Precision&) const throw ();
            Real operator() (const Real&, const RoundMode&) const throw ();
            Real operator() (const Real&) const throw ();
    };


/**
 * @class Exp2Class
 * 2^x
 */

    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 Precision&, const RoundMode&) const throw ();
            Real operator() (const Real&, const Precision&) const throw ();
            Real operator() (const Real&, const RoundMode&) const throw ();
            Real operator() (const Real&) const throw ();
    };


/**
 * @class Expm1Class
 * Exponential of x-1
 */

    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 Precision&, const RoundMode&) const throw ();
            Real operator() (const Real&, const Precision&) const throw ();
            Real operator() (const Real&, const RoundMode&) const throw ();
            Real operator() (const Real&) const throw ();
    };


} // namespace mpfr

6.3. Logarithmic Functions

namespace mpfr {

/**
 * @class LogClass
 * Natural Logarithm
 */

    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 Precision&, const RoundMode&) const throw ();
            Real operator() (const Real&, const Precision&) const throw ();
            Real operator() (const Real&, const RoundMode&) const throw ();
            Real operator() (const Real&) const throw ();
    };


/**
 * @class Log10Class
 * Decimal Logarithm
 */

    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 Precision&, const RoundMode&) const throw ();
            Real operator() (const Real&, const Precision&) const throw ();
            Real operator() (const Real&, const RoundMode&) const throw ();
            Real operator() (const Real&) const throw ();
    };


/**
 * @class Log1pClass
 * Natural Logarithm of x+1
 */

    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 Precision&, const RoundMode&) const throw ();
            Real operator() (const Real&, const Precision&) const throw ();
            Real operator() (const Real&, const RoundMode&) const throw ();
            Real operator() (const Real&) const throw ();
    };


/**
 * @class Log2Class
 * Binary Logarithm
 */

    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 Precision&, const RoundMode&) const throw ();
            Real operator() (const Real&, const Precision&) const throw ();
            Real operator() (const Real&, const RoundMode&) const throw ();
            Real operator() (const Real&) const throw ();
    };

} // namespace mpfr

6.4. Trigonometric Functions

namespace mpfr {

/**
 * @class AcosClass
 * Arc-cosine
 */

    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 Precision&, const RoundMode&) const throw ();
            Real operator() (const Real&, const Precision&) const throw ();
            Real operator() (const Real&, const RoundMode&) const throw ();
            Real operator() (const Real&) const throw ();
    };


/**
 * @class AsinClass
 * Arc-sine
 */

    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 Precision&, const RoundMode&) const throw ();
            Real operator() (const Real&, const Precision&) const throw ();
            Real operator() (const Real&, const RoundMode&) const throw ();
            Real operator() (const Real&) const throw ();
    };


/**
 * @class AtanClass
 * Arc-tangent
 */

    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 Precision&, const RoundMode&) const throw ();
            Real operator() (const Real&, const Precision&) const throw ();
            Real operator() (const Real&, const RoundMode&) const throw ();
            Real operator() (const Real&) const throw ();
    };


/**
 * @class Atan2Class
 * Arc-tangent 2:
 * atan2(x,y) = atan(x/y) for x > 0,
 * atan2(x,y) = sign(y) (pi - atan |x/y|) for x < 0
 */

    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 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 Real&) const throw ();
    };

} // namespace mpfr

6.5. Inverse Trigonometric Functions

namespace mpfr {

/**
 * @class AcosClass
 * Arc-cosine
 */

    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 Precision&, const RoundMode&) const throw ();
            Real operator() (const Real&, const Precision&) const throw ();
            Real operator() (const Real&, const RoundMode&) const throw ();
            Real operator() (const Real&) const throw ();
    };


/**
 * @class AsinClass
 * Arc-sine
 */

    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 Precision&, const RoundMode&) const throw ();
            Real operator() (const Real&, const Precision&) const throw ();
            Real operator() (const Real&, const RoundMode&) const throw ();
            Real operator() (const Real&) const throw ();
    };


/**
 * @class AtanClass
 * Arc-tangent
 */

    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 Precision&, const RoundMode&) const throw ();
            Real operator() (const Real&, const Precision&) const throw ();
            Real operator() (const Real&, const RoundMode&) const throw ();
            Real operator() (const Real&) const throw ();
    };


/**
 * @class Atan2Class
 * Arc-tangent 2:
 * atan2(x,y) = atan(x/y) for x > 0,
 * atan2(x,y) = sign(y) (pi - atan |x/y|) for x < 0
 */

    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 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 Real&) const throw ();
    };

} // namespace mpfr

6.6. Hyperbolic Functions

namespace mpfr {

/**
 * @class CoshClass
 * Hyperbolic cosine
 */

    class CoshClass : public NumericFunction {
        public:
            CoshClass () throw() : NumericFunction () {}
            CoshClass (const Precision&, const RoundMode&) throw();
            CoshClass (const Precision&) throw();
            CoshClass (const RoundMode&) 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 ();
            Real operator() (const Real&) const throw ();
    };


/**
 * @class CothClass
 * Hyperbolic cotangent
 */

    class CothClass : public NumericFunction {
        public:
            CothClass () throw() : NumericFunction () {}
            CothClass (const Precision&, const RoundMode&) throw();
            CothClass (const Precision&) throw();
            CothClass (const RoundMode&) 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 ();
            Real operator() (const Real&) const throw ();
    };


/**
 * @class CschClass
 * Hyperbolic cosecant
 */

    class CschClass : public NumericFunction {
        public:
            CschClass () throw() : NumericFunction () {}
            CschClass (const Precision&, const RoundMode&) throw();
            CschClass (const Precision&) throw();
            CschClass (const RoundMode&) 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 ();
            Real operator() (const Real&) const throw ();
    };


/**
 * @class SechClass
 * Hyperbolic secant
 */

    class SechClass : public NumericFunction {
        public:
            SechClass () throw() : NumericFunction () {}
            SechClass (const Precision&, const RoundMode&) throw();
            SechClass (const Precision&) throw();
            SechClass (const RoundMode&) 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 ();
            Real operator() (const Real&) const throw ();
    };


/**
 * @class SinhClass
 * Hyperbolic sine
 */

    class SinhClass : public NumericFunction {
        public:
            SinhClass () throw() : NumericFunction () {}
            SinhClass (const Precision&, const RoundMode&) throw();
            SinhClass (const Precision&) throw();
            SinhClass (const RoundMode&) 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 ();
            Real operator() (const Real&) const throw ();
    };


/**
 * @class TanhClass
 * Hyperbolic tangent
 */

    class TanhClass : public NumericFunction {
        public:
            TanhClass () throw() : NumericFunction () {}
            TanhClass (const Precision&, const RoundMode&) throw();
            TanhClass (const Precision&) throw();
            TanhClass (const RoundMode&) 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 ();
            Real operator() (const Real&) const throw ();
    };

} // namespace mpfr

6.7. Inverse Hyperbolic Functions

namespace mpfr {

/**
 * @class AcoshClass
 * Inverse hyperbolic cosine
 */

    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 Precision&, const RoundMode&) const throw ();
            Real operator() (const Real&, const Precision&) const throw ();
            Real operator() (const Real&, const RoundMode&) const throw ();
            Real operator() (const Real&) const throw ();
    };


/**
 * @class AsinhClass
 * Inverse hyperbolic sine
 */

    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 Precision&, const RoundMode&) const throw ();
            Real operator() (const Real&, const Precision&) const throw ();
            Real operator() (const Real&, const RoundMode&) const throw ();
            Real operator() (const Real&) const throw ();
    };


/**
 * @class AtanhClass
 * Inverse hyperbolic tangent
 */

    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 Precision&, const RoundMode&) const throw ();
            Real operator() (const Real&, const Precision&) const throw ();
            Real operator() (const Real&, const RoundMode&) const throw ();
            Real operator() (const Real&) const throw ();
    };

} // namespace mpfr

6.8. Special Functions

namespace mpfr {

/**
 * @class BesselJ0Class
 * First order Bessel function of order 0
 */

    class BesselJ0Class : public NumericFunction {
        public:
            BesselJ0Class () throw();
            BesselJ0Class (const Precision&, const RoundMode&);
            BesselJ0Class (const Precision&) throw();
            BesselJ0Class (const RoundMode&) 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 ();
            Real operator() (const Real&) const throw ();
    };


/**
 * @class BesselJ1Class
 * First order Bessel function of order 1
 */

    class BesselJ1Class : public NumericFunction {
        public:
            BesselJ1Class () throw();
            BesselJ1Class (const Precision&, const RoundMode&);
            BesselJ1Class (const Precision&) throw();
            BesselJ1Class (const RoundMode&) 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 ();
            Real operator() (const Real&) const throw ();
    };


/**
 * @class BesselJnClass
 * First order Bessel function of order n
 */

    class BesselJnClass : public NumericFunction {
        public:
            BesselJnClass () throw();
            BesselJnClass (const Precision&, const RoundMode&);
            BesselJnClass (const Precision&) throw();
            BesselJnClass (const RoundMode&) 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 ();
            Real operator() (const Real&) const throw ();
    };


/**
 * @class BesselY0Class
 * Second order Bessel function of order 0
 */

    class BesselY0Class : public NumericFunction {
        public:
            BesselY0Class () throw();
            BesselY0Class (const Precision&, const RoundMode&);
            BesselY0Class (const Precision&) throw();
            BesselY0Class (const RoundMode&) 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 ();
            Real operator() (const Real&) const throw ();
    };


/**
 * @class BesselY1Class
 * Second order Bessel function of order 1
 */

    class BesselY1Class : public NumericFunction {
        public:
            BesselY1Class () throw();
            BesselY1Class (const Precision&, const RoundMode&);
            BesselY1Class (const Precision&) throw();
            BesselY1Class (const RoundMode&) 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 ();
            Real operator() (const Real&) const throw ();
    };


/**
 * @class BesselYnClass
 * Second order Bessel function of order n
 */

    class BesselYnClass : public NumericFunction {
        public:
            BesselYnClass () throw();
            BesselYnClass (const Precision&, const RoundMode&);
            BesselYnClass (const Precision&) throw();
            BesselYnClass (const RoundMode&) 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 ();
            Real operator() (const Real&) const throw ();
    };


/**
 * @class EintClass
 * Exponential Integral
 */

    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 Precision&, const RoundMode&) const throw ();
            Real operator() (const Real&, const Precision&) const throw ();
            Real operator() (const Real&, const RoundMode&) const throw ();
            Real operator() (const Real&) const throw ();
    };


/**
 * @class ErfClass
 * Error Function
 */

    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 Precision&, const RoundMode&) const throw ();
            Real operator() (const Real&, const Precision&) const throw ();
            Real operator() (const Real&, const RoundMode&) const throw ();
            Real operator() (const Real&) const throw ();
    };


/**
 * @class ErfcClass
 * Complementary Error Function
 */

    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 Precision&, const RoundMode&) const throw ();
            Real operator() (const Real&, const Precision&) const throw ();
            Real operator() (const Real&, const RoundMode&) const throw ();
            Real operator() (const Real&) const throw ();
    };


/**
 * @class GammaClass
 * Gamma Function
 */

    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 Precision&, const RoundMode&) const throw ();
            Real operator() (const Real&, const Precision&) const throw ();
            Real operator() (const Real&, const RoundMode&) const throw ();
            Real operator() (const Real&) const throw ();
    };


/**
 * @class LngammaClass
 * Gamma Function Logarithm
 */

    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 Precision&, const RoundMode&) const throw ();
            Real operator() (const Real&, const Precision&) const throw ();
            Real operator() (const Real&, const RoundMode&) const throw ();
            Real operator() (const Real&) const throw ();
    };


/**
 * @class ZetaClass
 * Riemann Zeta Function
 */

    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 Precision&, const RoundMode&) const throw ();
            Real operator() (const Real&, const Precision&) const throw ();
            Real operator() (const Real&, const RoundMode&) const throw ();
            Real operator() (const Real&) const throw ();
    };

} // namespace mpfr
namespace mpfr {

/**
 * @class CeilClass
 *
 */

    class CeilClass : public NumericFunction {
        private:  // hide round mode related items
            void setRoundMode (const RoundMode&) throw();
            RoundMode getRoundMode () const throw();
            CeilClass (const Precision&, const RoundMode&) throw();
            CeilClass (const RoundMode&) throw();
        public:
            CeilClass () throw();
            CeilClass (const Precision&) throw();

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


/**
 * @class FloorClass
 *
 */

    class FloorClass : public NumericFunction {
        private:  // hide round mode related items
            void setRoundMode (const RoundMode&) throw();
            RoundMode getRoundMode () const throw();
            FloorClass (const Precision&, const RoundMode&) throw();
            FloorClass (const RoundMode&) throw();
        public:
            FloorClass () throw();
            FloorClass (const Precision&) throw();

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


/**
 * @class FracClass
 *
 */

    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 Precision&, const RoundMode&) const throw ();
            Real operator() (const Real&, const Precision&) const throw ();
            Real operator() (const Real&, const RoundMode&) const throw ();
            Real operator() (const Real&) const throw ();
    };

/**
 * @class RemainderClass
 * Division remainder
 */

    class RemainderClass : public NumericFunction {
        public:
            RemainderClass () throw();
            RemainderClass (const Precision&, const RoundMode&) throw();
            RemainderClass (const Precision&) throw();
            RemainderClass (const RoundMode&) 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 ();
            Real operator() (const Real&) const throw ();
    };


/**
 * @class RoundClass
 *
 */

    class RoundClass : public NumericFunction {
        private:  // hide round mode related items
            void setRoundMode (const RoundMode&) throw();
            RoundMode getRoundMode () const throw();
            RoundClass (const Precision&, const RoundMode&) throw();
            RoundClass (const RoundMode&) throw();
        public:
            RoundClass () throw();
            RoundClass (const Precision&) throw();

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


/**
 * @class TruncClass
 *
 */

    class TruncClass : public NumericFunction {
        private:  // hide round mode related items
            void setRoundMode (const RoundMode&) throw();
            RoundMode getRoundMode () const throw();
            TruncClass (const Precision&, const RoundMode&) throw();
            TruncClass (const RoundMode&) throw();
        public:
            TruncClass () throw();
            TruncClass (const Precision&) throw();

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


} // namespace mpfr

6.10. Miscellaneous Functions

namespace mpfr {

/**
 * @class AgmClass
 * Arithmetic-geometric mean
 */

    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 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 Real&) const throw ();
    };


/**
 * @class FactorialClass
 * Factorial
 */

    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 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 long int&) 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();
    };


/**
 * @class FmaClass
 * op1 * op2 + op3
 */

    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 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 ();
            Real operator() (const Real&, const Real&, const Real&) const throw ();
            };

/**
 * @class FmsClass
 * op1 * op2 - op3
 */

    class FmsClass : public NumericFunction {
        public:
            FmsClass () throw();
            FmsClass (const Precision&, const RoundMode&) throw();
            FmsClass (const Precision&) throw();
            FmsClass (const RoundMode&) 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 ();
            Real operator() (const Real&, const Real&, const Real&) const throw ();
    };


/**
 * @class HypotClass
 * Euclidean norm
 */

    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 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 Real&) const throw ();
    };


} // namespace mpfr

6.11. Numeric Constants

namespace mpfr {

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

            static void freeCache () throw ();

/**
 * log 2, 0,693...
 */

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

/**
 * pi, 3.1415926...
 */

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

/**
 * The Euler-Mascheroni constant, 0.577...
 */

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

/**
 * The Catalan constant, 0.915...
 */

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

}    // namespace mpfr

6.12. Random Numbers

namespace mpfr {

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

    Real urandomb (RandomState s, const Precision&) throw();

    Real urandomb (const Precision&) throw();

    RandomState& getDefaultRandomState () const throw();
    void setDefaultRandomState (const RandomState&) throw();
};

} // namespace mpfr

7. Library Initialization

Replace #include <mpfrcpp/mpfrcpp.hpp> by #include <mpfrcpp/mpfrcpp_uninitialized.hpp> to exclude these definitions.

namespace mpfr {

    extern const Version MPFRCPPVersion;
    extern const Version MPFRVersion;

    extern NegClass Neg;
    extern AddClass Add;
    extern SubClass Sub;
    extern MulClass Mul;
    extern DivClass Div;
    extern AbsClass Abs;
    extern SqrtClass Sqrt;
    extern CbrtClass Cbrt;
    extern RootClass Root;
    extern SqrClass Sqr;
    extern PowClass Pow;

    extern ExpClass Exp;
    extern Expm1Class Expm1;
    extern Exp10Class Exp10;
    extern Exp2Class Exp2;

    extern SinhClass Sinh;
    extern CoshClass Cosh;
    extern SechClass Sech;
    extern CschClass Csch;
    extern TanhClass Tanh;
    extern CothClass Coth;

    extern CeilClass Ceil;
    extern FloorClass Floor;
    extern RoundClass Round;
    extern TruncClass Trunc;
    extern FracClass Frac;

    extern AsinhClass Asinh;
    extern AcoshClass Acosh;
    extern AtanhClass Atanh;

    extern AsinClass Asin;
    extern AcosClass Acos;
    extern AtanClass Atan;
    extern Atan2Class Atan2;

    extern FmaClass Fma;
    extern AgmClass Agm;
    extern HypotClass Hypot;
    extern FactorialClass Factorial;

    extern ErfClass Erf;
    extern ErfcClass Erfc;
    extern EintClass Eint;
    extern GammaClass Gamma;
    extern LngammaClass Lngamma;
    extern ZetaClass Zeta;

    extern SinClass Sin;
    extern SinCosClass SinCos;
    extern CosClass Cos;
    extern SecClass Sec;
    extern CscClass Csc;
    extern TanClass Tan;
    extern CotClass Cot;

    extern LogClass Log;
    extern Log10Class Log10;
    extern Log2Class Log2;
    extern Log1pClass Log1p;

    extern ConstantClass Constant;

    class DefaultNumericFunctions : public NumericFunctions {
        public:
            DefaultNumericFunctions () throw();
    };

    extern NumericFunctions Functions;
    extern GlobalParameters Parameters;
    extern NumericFunctionsGlobalParametersBinder Library;

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

    extern Real Infinity;
    extern Real NaN;

} // namespace mpfr