#include <OnixS/CME/DropCopy/Numeric.h>
Definition at line 44 of file Numeric.h.
Initializes instance from compound components.
Definition at line 171 of file Numeric.h.
Converts Double value to decimal.
- Parameters
-
value | double precision floating-point value. |
precision | defines conversion precision. |
Initializes as copy of given value.
Definition at line 177 of file Numeric.h.
Returns exponent part of decimal.
Definition at line 193 of file Numeric.h.
Updates exponent part of decimal.
Definition at line 198 of file Numeric.h.
Fast cast from double floating point number.
- Note
- For the sake of performance no range checks are done. Result may be invalid if decimal cannot be represented as double value. Warning: result may be different (less precise) from Decimal(Double, size_t) result due to performance vs precision trade-off.
Definition at line 306 of file Numeric.h.
Returns mantissa part of decimal.
Definition at line 183 of file Numeric.h.
Updates mantissa part of decimal.
Definition at line 188 of file Numeric.h.
Casts to whole floating point as regular value is casted to a smaller precision.
- Exceptions
-
domain_error | exception on failure. |
Definition at line 259 of file Numeric.h.
Casts to whole integer number as regular floating point value is casted.
- Exceptions
-
domain_error | exception on failure. |
Definition at line 211 of file Numeric.h.
Casts to whole integer number as regular floating point value is casted.
- Exceptions
-
domain_error | exception on failure. |
Definition at line 235 of file Numeric.h.
Casts to whole integer number as regular floating point value is casted.
- Exceptions
-
domain_error | exception on failure. |
Definition at line 223 of file Numeric.h.
Casts to whole integer number as regular floating point value is casted.
- Exceptions
-
domain_error | exception on failure. |
Definition at line 247 of file Numeric.h.
bool operator!= |
( |
const Decimal & |
| ) |
const |
bool operator< |
( |
const Decimal & |
| ) |
const |
Establishes order between two values.
Reinitializes instance from another one.
Definition at line 203 of file Numeric.h.
bool operator== |
( |
const Decimal & |
| ) |
const |
bool operator> |
( |
const Decimal & |
| ) |
const |
Establishes order between two values.
static Decimal parse |
( |
const char * |
buffer, |
|
|
size_t |
bufferSize |
|
) |
| |
|
static |
Parses decimal from string presentation.
- Exceptions
-
std::exception | on failure. |
Double toDoubleUnchecked |
( |
| ) |
const |
|
inline |
Fast cast to double floating point number.
- Note
- For the sake of performance no range checks are done. Result may be invalid if decimal cannot be represented as double value. Warning: result may be different (less precise) from toNumber(Double&) result due to performance vs precision trade-off.
Definition at line 300 of file Numeric.h.
bool toNumber |
( |
Int32 & |
| ) |
const |
Casts to whole integer number as regular floating point value is casted.
- Returns
- false if conversion fails.
bool toNumber |
( |
UInt32 & |
| ) |
const |
Casts to whole integer number as regular floating point value is casted.
- Returns
- false if conversion fails.
bool toNumber |
( |
Int64 & |
| ) |
const |
Casts to whole integer number as regular floating point value is casted.
- Returns
- false if conversion fails.
bool toNumber |
( |
UInt64 & |
| ) |
const |
Casts to whole integer number as regular floating point value is casted.
- Returns
- false if conversion fails.
bool toNumber |
( |
Double & |
| ) |
const |
Casts to double floating point number.
- Returns
- false if conversion fails.
void toString |
( |
std::string & |
| ) |
const |
Appends text presentation to given string.
std::string toString |
( |
| ) |
const |
|
inline |
Returns text presentation of decimal.
Definition at line 271 of file Numeric.h.
static bool tryParse |
( |
const char * |
buffer, |
|
|
size_t |
bufferSize, |
|
|
Decimal & |
|
|
) |
| |
|
static |
Attempts to parse decimal value from its string/text presentation.
- Returns
- false on parsing failure.
The documentation for this class was generated from the following file: