|
| MpReal () |
|
| MpReal (double d, RoundingMode rnd=getDefaultRndMode(), PrecisionType prec=getDefaultPrecision()) |
|
| MpReal (long double d, RoundingMode rnd=getDefaultRndMode(), PrecisionType prec=getDefaultPrecision()) |
|
| MpReal (int i, RoundingMode rnd=getDefaultRndMode(), PrecisionType prec=getDefaultPrecision()) |
|
| MpReal (unsigned int i, RoundingMode rnd=getDefaultRndMode(), PrecisionType prec=getDefaultPrecision()) |
|
| MpReal (long int i, RoundingMode rnd=getDefaultRndMode(), PrecisionType prec=getDefaultPrecision()) |
|
| MpReal (unsigned long int i, RoundingMode rnd=getDefaultRndMode(), PrecisionType prec=getDefaultPrecision()) |
|
| MpReal (std::string s, RoundingMode rnd=getDefaultRndMode(), PrecisionType prec=getDefaultPrecision()) |
|
| MpReal (const char *str, RoundingMode rnd=getDefaultRndMode(), PrecisionType prec=getDefaultPrecision()) |
|
| MpReal (mpz_srcptr z, RoundingMode rnd=getDefaultRndMode(), PrecisionType prec=getDefaultPrecision()) |
|
| MpReal (mpq_srcptr q, RoundingMode rnd=getDefaultRndMode(), PrecisionType prec=getDefaultPrecision()) |
|
| MpReal (mpfr_t r, RoundingMode rnd=getDefaultRndMode(), PrecisionType prec=getDefaultPrecision()) |
|
| MpReal (const MpReal &r) |
|
| ~MpReal () |
|
MpReal & | operator= (const MpReal &r) |
| Assignment operator. More...
|
|
void | setPrecision (PrecisionType newprec) |
| Sets precision for given MpReal object. More...
|
|
PrecisionType | getPrecision () const |
| returns precision of a given object More...
|
|
MpReal & | operator+= (const MpReal &r) |
| adds r using default rounding mode More...
|
|
MpReal & | operator-= (const MpReal &r) |
| substract r using default rounding mode More...
|
|
MpReal | operator- () const |
|
MpReal & | operator*= (const MpReal &r) |
| multiply r using default rounding mode More...
|
|
MpReal & | operator/= (const MpReal &r) |
| divides by r using default rounding mode More...
|
|
std::ostream & | put (std::ostream &o, RoundingMode rnd=getDefaultRndMode(), PrecisionType prec=getDefaultPrecision(), int base=10, int nb_digits=0) const |
| writes to stream given number in the base with given number of digits and rounding mode More...
|
|
void | get (const std::string &str, RoundingMode rnd=getDefaultRndMode(), PrecisionType prec=getDefaultPrecision(), int base=10) |
|
MpReal | pow (const unsigned long int e, RoundingMode rnd=MpReal::getDefaultRndMode()) const |
|
MpReal | pow (const long int e, RoundingMode rnd=MpReal::getDefaultRndMode()) const |
|
MpReal | pow (const MpReal &e, RoundingMode rnd=MpReal::getDefaultRndMode()) const |
|
void | random (PrecisionType prec=getDefaultPrecision()) |
|
MpReal | leftBound () |
|
MpReal | rightBound () |
|
bool | contains (const MpReal &X) |
|
bool | containsInInterior (const MpReal &) |
|
|
static void | setDefaultPrecision (PrecisionType newprec) |
| sets default precision for all operations More...
|
|
static PrecisionType | getDefaultPrecision () |
| returns default precision of all operations More...
|
|
static void | setDefaultRndMode (RoundingMode newrndmode) |
| sets default rounding mode for all operations More...
|
|
static RoundingMode | getDefaultRndMode () |
| return default rounding mode More...
|
|
static void | roundUp () |
| sets rounding up mode More...
|
|
static void | roundDown () |
| sets rounding down mode More...
|
|
static void | roundNearest () |
| sets rounding to nearest mode More...
|
|
static void | roundToZero () |
| sets rounding to zero mode More...
|
|
static void | roundCut () |
|
static MpReal | pi (RoundingMode rnd=getDefaultRndMode(), PrecisionType prec=getDefaultPrecision()) |
| pi constant (3.1415...) with given precision and rounding direction More...
|
|
static MpReal | log2 (RoundingMode rnd=getDefaultRndMode(), PrecisionType prec=getDefaultPrecision()) |
| ln(2) - natural logarithm of 2 constant with given precision and rounding direction More...
|
|
static MpReal | euler (RoundingMode rnd=getDefaultRndMode(), PrecisionType prec=getDefaultPrecision()) |
| euler constant (2.7...) with given precision and rounding direction More...
|
|
static MpReal | positiveInfinity (PrecisionType prec=getDefaultPrecision()) |
| Positive infinity constant. More...
|
|
static MpReal | negativeInfinity (PrecisionType prec=getDefaultPrecision()) |
| Negative infinity constant. More...
|
|
static void | add (MpReal &res, const MpReal &r1, const MpReal &r2, RoundingMode rnd=getDefaultRndMode()) |
| adds r1 and r2 using precision of the res and given rounding mode More...
|
|
static void | sub (MpReal &res, const MpReal &r1, const MpReal &r2, RoundingMode rnd=getDefaultRndMode()) |
| substract r1 and r2 using precision of the res and given rounding mode More...
|
|
static void | neg (MpReal &res, const MpReal &r, RoundingMode rnd=getDefaultRndMode()) |
|
static void | mul (MpReal &res, const MpReal &r1, const MpReal &r2, RoundingMode rnd=getDefaultRndMode()) |
| multiply r1 and r2 using precision of the res and given rounding mode More...
|
|
static void | div (MpReal &res, const MpReal &r1, const MpReal &r2, RoundingMode rnd=getDefaultRndMode()) |
| divides r1 by r2 using precision of the res and given rounding mode More...
|
|
static void | fma (MpReal &res, const MpReal &r1, const MpReal &r2, const MpReal &r3, RoundingMode rnd=getDefaultRndMode()) |
| fast multiplication and addition res = r1*r2 + r3 More...
|
|
|
bool | isinf (const MpReal &r) |
|
bool | isnan (const MpReal &r) |
|
MpReal | copysign (const MpReal &x, const MpReal &y) |
| Produce a value with the magnitude of x and sign bit of y: (-1)^signbit(y) * abs(x) More...
|
|
int | signbit (const MpReal &x) |
|
bool | isZero (const MpReal &r) |
|
bool | isInf (const MpReal &r) |
|
bool | isNaN (const MpReal &r) |
|
bool | isNumber (const MpReal &r) |
|
bool | isSingular (const MpReal &r) |
|
int | sign (const MpReal &r) |
|
int | compare (const MpReal &r1, const MpReal &r2) |
| compare two MpReals returns 0 if r1==r2, negative value if r1<r2 and positive value if r1>r2 More...
|
|
int | compare (const MpReal &r1, const double r2) |
|
int | compare (const MpReal &r1, const int r2) |
|
int | compare (const MpReal &r1, const unsigned int r2) |
|
int | compare (const MpReal &r1, const long int r2) |
|
int | compare (const MpReal &r1, const unsigned long int r2) |
|
MpReal | operator+ (const MpReal &r1, const MpReal &r2) |
| adds r1 and r2 using default precision and rounding mode More...
|
|
MpReal | operator- (const MpReal &r1, const MpReal &r2) |
| substract r1 and r2 using default precision and rounding mode More...
|
|
MpReal | operator* (const MpReal &r1, const MpReal &r2) |
| multiply r1 and r2 using default precision and rounding mode More...
|
|
MpReal | operator/ (const MpReal &r1, const MpReal &r2) |
| divides r1 by r2 using default precision and rounding mode More...
|
|
std::istream & | operator>> (std::istream &i, MpReal &r) |
| reads number from a stream More...
|
|
std::ostream & | operator<< (std::ostream &o, const MpReal &r) |
| writes number to a stream More...
|
|
MpReal | round (const MpReal &r) |
|
MpReal | floor (const MpReal &r) |
|
MpReal | trunc (const MpReal &r) |
|
MpReal | ceil (const MpReal &r) |
|
MpReal | frac (const MpReal &r) |
|
MpReal represents multiple precision real number with controlled rounding.
It is a C++ wrapper for a C library mpfr