#include <Value.h>
Inheritance diagram for mcRealValue:
Definition at line 653 of file Value.h.
Public Member Functions | |
mcVALUE_DEFINE_CONSTRUCTORS (mcRealValue, mcMPF) | |
mcRealValue (double f) | |
mcRealValue (const mcRationalValue &m) | |
mcRealValue (const mcIntegerValue &m) | |
mcRealValue | pow (unsigned long n) const |
mcRealValue | pow (int n) const |
mcRealValue | pow (double n) const |
mcRealValue | pow (const mcRealValue &n) const |
mcRealValue | root (const mcRealValue &n) |
mcRealValue | abs () const |
mcRealValue | floor () const |
mcRealValue | ceil () const |
mcRealValue | trunc () const |
bool | isInteger () const |
Returns TRUE if all the approximation functions (floor, ceil, trunc) return the same value. | |
mcRealValue | GetReciprocal () const |
Returns the reciprocal of this number. | |
mcVALUE_DEFINE_ALLOPERATORS (mcRealValue, mcMPF, mpf) | |
mcVALUE_DEFINE_DOUBLEOPERATORS (mcRealValue, mcMPF, mpf) | |
mcVALUE_DEFINE_GETSET (mcRealValue, mpf) | |
mcVALUE_DEFINE_FLAGSCOMPARISON_OPERATORS (mcIntegerValue, mpf_cmp_si, m.GetLong()) | |
wxString | GetStr () const |
See mcValue::GetStr. | |
wxString | GetStr (int digits) const |
virtual wxString | GetExtStr (int digits=mcVALUE_DEFAULTPRECISION) const |
Returns a string in extended form:. | |
virtual wxString | GetSmartStr (int threshold=mcVALUE_SMARTSTR_THRESHOLD, int digits=mcVALUE_DEFAULTPRECISION) const |
Returns a string in exponential form, if the exponent is greater than mcVALUE_SMARTSTR_THRESHOLD; returns a string in extended form if the exponent is less than mcVALUE_SMARTSTR_THRESHOLD. | |
double | GetDouble () const |
void | SetDouble (double n) |
mcRealValue & | operator= (double d) |
operator double () const | |
int | GetNumOfDigits (int digits=mcVALUE_DEFAULTPRECISION) const |
mcRealValue | GetFromDigitRange (int begin, int end=-1, int digits=mcVALUE_DEFAULTPRECISION) const |
mcRealValue | DeleteDigit (int pos, int digits=mcVALUE_DEFAULTPRECISION) const |
mcRealValue | InsertDigit (wxChar digit, int pos, int digits=mcVALUE_DEFAULTPRECISION) const |
mcRealValue | AppendDigit (wxChar digit, int digits=mcVALUE_DEFAULTPRECISION) const |
Static Public Attributes | |
static mcRealValue * | pOne = NULL |
static mcRealValue * | pZero = NULL |
static mcRealValue * | pNAN = NULL |
Not a number. See isValid(). | |
static mcRealValue * | pPosInf = NULL |
Positive infinite. See math_isFinite(). | |
static mcRealValue * | pNegInf = NULL |
Negative infinite. See math_isFinite(). | |
Protected Member Functions | |
wxString | GetBaseStr (int *p, int digits, int *n) const |
Returns a raw string, not elaborated, as GMP returns. | |
Private Member Functions | |
mcVALUE_DEFINE_COW (mcMPF, mpf) |
|
Definition at line 672 of file Value.h. References SetDouble(). Referenced by DeleteDigit(), GetFromDigitRange(), and InsertDigit(). |
|
|
|
|
|
Definition at line 690 of file Value.h. Referenced by mcBisectSolver::math_Bisect(). |
|
Definition at line 754 of file Value.h. References InsertDigit(). |
|
|
|
Definition at line 376 of file Value.cpp. References GetSmartStr(), mcASSERT, and mcRealValue(). |
|
Definition at line 691 of file Value.h. Referenced by mcRationalValue::MakeInteger(). |
|
Returns a raw string, not elaborated, as GMP returns.
Definition at line 258 of file Value.cpp. References GMP2WX. Referenced by GetExtStr(), GetSmartStr(), and GetStr(). |
|
Definition at line 732 of file Value.h. Referenced by mcFunctionHelpers::math_EvaluateBase(), operator double(), and pow(). |
|
Returns a string in extended form:. Snnnnnnnnnnnnnnnnnnnn example: -4318384739357974916 This function uses GetStr() and then "unroll" the trailer exponent adding the required zeroes at the end/begin of the number (for positive/ negative exponents) and the dot.
Definition at line 328 of file Value.cpp. References GetBaseStr(). |
|
Definition at line 339 of file Value.cpp. References GetSmartStr(), and mcRealValue(). |
|
Definition at line 352 of file Value.cpp. References GetSmartStr(). Referenced by mcNumberHelpers::gui_BaseMoveCursor(), mcNumberHelpers::gui_BaseMoveCursorUsingPoint(), mcNumberHelpers::gui_EditBase(), mcNumberHelpers::gui_MergeWith(), and mcNumberHelpers::math_GetBaseLenght(). |
|
Returns the reciprocal of this number.
|
|
Returns a string in exponential form, if the exponent is greater than mcVALUE_SMARTSTR_THRESHOLD; returns a string in extended form if the exponent is less than mcVALUE_SMARTSTR_THRESHOLD.
Definition at line 299 of file Value.cpp. References GetBaseStr(). Referenced by DeleteDigit(), GetFromDigitRange(), GetNumOfDigits(), mcNumberHelpers::gui_GetStr(), InsertDigit(), and mcNumberHelpers::io_GetBaseInlinedExpr(). |
|
Definition at line 275 of file Value.cpp. References GetBaseStr(). |
|
See mcValue::GetStr.
Implements mcValue. Definition at line 710 of file Value.h. References mcVALUE_DEFAULTPRECISION. Referenced by mcRationalValue::GetStr(), mcNumberHelpers::math_DivideBaseOnlyBy(), and mcNumberHelpers::math_RaiseTo(). |
|
Definition at line 359 of file Value.cpp. References GetSmartStr(), and mcRealValue(). Referenced by AppendDigit(). |
|
Returns TRUE if all the approximation functions (floor, ceil, trunc) return the same value.
Implements mcValue. Definition at line 697 of file Value.h. Referenced by mcRationalValue::GetFractionalDigitCount(), mcRationalValue::MakeInteger(), mcNumberHelpers::math_CanBeDivBy(), mcNumberHelpers::math_DivideBaseOnlyBy(), and mcNumberHelpers::math_GetGCD(). |
|
|
|
|
|
|
|
|
|
|
|
|
|
Definition at line 736 of file Value.h. References GetDouble(). |
|
Definition at line 735 of file Value.h. References SetDouble(). |
|
Definition at line 685 of file Value.h. References pow(). |
|
Definition at line 683 of file Value.h. References GetDouble(), pow(), and SetDouble(). |
|
|
|
Definition at line 679 of file Value.h. Referenced by mcNumberHelpers::gui_MergeWith(), mcRationalValue::MakeInteger(), mcExpElementHelpers::math_Evaluate(), mcNumberHelpers::math_RaiseTo(), pow(), and root(). |
|
Definition at line 687 of file Value.h. References pow(). Referenced by mcRadicalHelpers::math_Evaluate(). |
|
Definition at line 733 of file Value.h. Referenced by mcRealValue(), operator=(), and pow(). |
|
|
|
Not a number. See isValid().
|
|
Negative infinite. See math_isFinite().
|
|
|
|
Positive infinite. See math_isFinite().
|
|
|
[ Top ] |