|
AndroMeta
2.0.0
|
Real number data type with arbitrary precision. More...
#include <MReal.h>
Public Member Functions | |
| MReal (const char *s) | |
| MReal (double x) | |
| MReal (int64_t x) | |
| MReal (int x) | |
| MReal (const MReal &r) | |
| MReal (const mrat &r) | |
| MReal & | operator= (const MReal &r) |
| MReal & | operator+= (const MReal &r) |
| template<typename T > | |
| MReal | operator+ (const T &t) const |
| MReal | operator+ (const MReal &x) const |
| MReal | operator++ (int) |
| MReal & | operator++ () |
| MReal & | operator-= (const MReal &r) |
| template<typename T > | |
| MReal | operator- (const T &t) const |
| MReal | operator- (const MReal &x) const |
| MReal | operator-- (int) |
| MReal & | operator-- () |
| MReal | operator- () const |
| MReal & | operator*= (const MReal &r) |
| template<typename T > | |
| MReal | operator* (const T &t) const |
| MReal | operator* (const MReal &x) const |
| MReal & | operator/= (const MReal &r) |
| template<typename T > | |
| MReal | operator/ (const T &t) const |
| MReal | operator/ (const MReal &x) const |
| MReal & | operator%= (const MReal &x) |
| template<typename T > | |
| MReal | operator% (const T &t) const |
| MReal | operator% (const MReal &x) const |
| bool | operator< (const MReal &x) const |
| template<typename T > | |
| bool | operator< (const T &t) const |
| bool | operator> (const MReal &x) const |
| template<typename T > | |
| bool | operator> (const T &t) const |
| bool | operator<= (const MReal &x) const |
| template<typename T > | |
| bool | operator<= (const T &t) const |
| bool | operator>= (const MReal &x) const |
| template<typename T > | |
| bool | operator>= (const T &t) const |
| bool | operator== (const MReal &x) const |
| template<typename T > | |
| bool | operator== (const T &t) const |
| bool | operator!= (const MReal &x) const |
| template<typename T > | |
| bool | operator!= (const T &t) const |
| void | setPrecision (size_t bits) |
| double | toDouble () const |
| int64_t | toLong () const |
| mrat | toRat () const |
| MStr | toStr (bool exp=true, int precision=-1) const |
Static Public Member Functions | |
| static void | setDefaultPrecision (size_t bits) |
| static size_t | defaultPrecision () |
| static MReal | fromStr (const MStr &str) |
| static MReal | cos (const MReal &x) |
| static MReal | sin (const MReal &x) |
| static MReal | tan (const MReal &x) |
| static MReal | acos (const MReal &x) |
| static MReal | asin (const MReal &x) |
| static MReal | atan (const MReal &x) |
| static MReal | atan2 (const MReal &y, const MReal &x) |
| static MReal | cosh (const MReal &x) |
| static MReal | sinh (const MReal &x) |
| static MReal | tanh (const MReal &x) |
| static MReal | exp (const MReal &x) |
| static MReal | log (const MReal &x) |
| static MReal | log10 (const MReal &x) |
| static MReal | pow (const MReal &base, const MReal &exponent) |
| static MReal | sqrt (const MReal &x) |
| static MReal | ceil (const MReal &x) |
| static MReal | floor (const MReal &x) |
| static MReal | abs (const MReal &x) |
| static MReal | pi () |
| static MReal | euler () |
| static MReal | catalan () |
Real number data type with arbitrary precision.
Provides arithemitc operators, standard math functions and conversion between other numeric types. The underlying implementation is provided by the GMP and MPFR libraries.
| Meta::MReal::MReal | ( | const char * | s | ) | [explicit] |
Construct a real number from an extended C double-syntax string, e.g: "3.1415926535897932384626433832795028841971693993751058209749445923078", "-36091205165278380324368187046633e-14"
| static MReal Meta::MReal::abs | ( | const MReal & | x | ) | [static] |
| static MReal Meta::MReal::acos | ( | const MReal & | x | ) | [static] |
| static MReal Meta::MReal::asin | ( | const MReal & | x | ) | [static] |
| static MReal Meta::MReal::atan | ( | const MReal & | x | ) | [static] |
| static MReal Meta::MReal::atan2 | ( | const MReal & | y, |
| const MReal & | x | ||
| ) | [static] |
| static MReal Meta::MReal::catalan | ( | ) | [static] |
| static MReal Meta::MReal::ceil | ( | const MReal & | x | ) | [static] |
| static MReal Meta::MReal::cos | ( | const MReal & | x | ) | [static] |
| static MReal Meta::MReal::cosh | ( | const MReal & | x | ) | [static] |
| static MReal Meta::MReal::euler | ( | ) | [static] |
| static MReal Meta::MReal::exp | ( | const MReal & | x | ) | [static] |
| static MReal Meta::MReal::floor | ( | const MReal & | x | ) | [static] |
| static MReal Meta::MReal::log | ( | const MReal & | x | ) | [static] |
| static MReal Meta::MReal::log10 | ( | const MReal & | x | ) | [static] |
| static MReal Meta::MReal::pi | ( | ) | [static] |
| static MReal Meta::MReal::pow | ( | const MReal & | base, |
| const MReal & | exponent | ||
| ) | [static] |
| static void Meta::MReal::setDefaultPrecision | ( | size_t | bits | ) | [static] |
| void Meta::MReal::setPrecision | ( | size_t | bits | ) |
Set the precision for this MReal.
| static MReal Meta::MReal::sin | ( | const MReal & | x | ) | [static] |
| static MReal Meta::MReal::sinh | ( | const MReal & | x | ) | [static] |
| static MReal Meta::MReal::sqrt | ( | const MReal & | x | ) | [static] |
| static MReal Meta::MReal::tan | ( | const MReal & | x | ) | [static] |
| static MReal Meta::MReal::tanh | ( | const MReal & | x | ) | [static] |
| MStr Meta::MReal::toStr | ( | bool | exp = true, |
| int | precision = -1 |
||
| ) | const |
Convert this MReal to a string in base 10.
| exp | true to use exponent/scientific notation if applicable. |
| precision | The number of base 10 precision digits. -1 to use full precision. |
1.7.6.1