All Classes Namespaces Functions Variables Groups Pages
Pseudo_QC_Number.dox.h
namespace Qore {
class <number> : public <value> {
public:
number abs();
public:
string format(string fmt);
public:
bool infp();
public:
bool intp();
public:
bool nanp();
public:
int prec();
public:
int sign();
public:
bool strp();
public:
string toString(int fmt);
public:
int typeCode();
public:
bool val();
};
const NF_Default = QORE_NF_DEFAULT;
const NF_Raw = QORE_NF_RAW;
const NF_Scientific = QORE_NF_SCIENTIFIC;
};
<number>::nanp
bool nanp()
Returns True if the number is NaN (not a number)
Qore::NF_Default
const NF_Default
for the default format with a rounding heuristic to try to remove noise in insignificant digits from ...
Definition: Pseudo_QC_Number.dox.h:210
<value>
Methods in this pseudo-class are available to be executed on any value type (even NOTHING); this is t...
Definition: Pseudo_QC_All.dox.h:5
<number>::prec
int prec()
Returns the precision of the current number.
Qore::number
number number(softnumber n)
Converts the argument to a number value.
<number>::strp
bool strp()
Returns True because number values can be converted to strings.
<number>::typeCode
int typeCode()
Returns Qore::NT_NUMBER.
<number>::infp
bool infp()
Returns True if the number is infinity (+ or -)
<number>::intp
bool intp()
Returns True because number values can be converted to integers.
Qore::NF_Raw
const NF_Raw
for the raw format without the noise reduction heuristic in the NF_Default format ...
Definition: Pseudo_QC_Number.dox.h:218
<number>::abs
number abs()
Returns the absolute value of the number.
<number>::sign
int sign()
Returns -1 if the number is negative, 0 if it is zero, or 1 if it is positive.
Qore::NF_Scientific
const NF_Scientific
for the scientific format (exponential notation)
Definition: Pseudo_QC_Number.dox.h:220
<number>
Methods in this pseudo-class can be executed on arbitrary precision number values.
Definition: Pseudo_QC_Number.dox.h:5
<number>::format
string format(string fmt)
Returns a string of a formatted number according to a format string.
<value>::toString
string toString()
Returns the string representation of the value; the default is an empty string.
<number>::val
bool val()
Returns True if the number is non-zero, False if zero.