36template <
class MantissaType,
class ExponentType>
84 MantissaType mantissa_;
88template <
class Mantissa,
class Exponent>
95template <
class Mantissa,
class Exponent>
102template <
class Mantissa,
class Exponent>
109template <
class Mantissa,
class Exponent>
116template <
class Mantissa,
class Exponent>
123template <
class Mantissa,
class Exponent>
161 : mantissa_(other.mantissa_)
162 , exponent_(other.exponent_)
168 template <
class AMantissa,
class AExponent>
190 mantissa_ = other.mantissa_;
191 exponent_ = other.exponent_;
198 template <
class AMantissa,
class AExponent>
229template <
class Mantissa,
class Exponent>
232 return (left ==
Decimal(right));
236template <
class Mantissa,
class Exponent>
239 return (
Decimal(left) == right);
243template <
class Mantissa,
class Exponent>
246 return (left !=
Decimal(right));
250template <
class Mantissa,
class Exponent>
253 return (
Decimal(left) != right);
269 return (right < left);
275 return !(right < left);
281 return !(right > left);
285template <
class Mantissa,
class Exponent>
288 return (left <
Decimal(right));
292template <
class Mantissa,
class Exponent>
295 return (
Decimal(left) < right);
299template <
class Mantissa,
class Exponent>
302 return (left >
Decimal(right));
306template <
class Mantissa,
class Exponent>
309 return (
Decimal(left) > right);
339template <
class Mantissa,
class Exponent>
346template <
class Mantissa,
class Exponent>
#define ONIXS_CMEMDH_NAMESPACE_BEGIN
#define ONIXS_CMEMDH_LTWT
#define ONIXS_CMEMDH_NAMESPACE_END
#define ONIXS_CMEMDH_EXPORTED
A real number with floating exponent.
Decimal & operator=(const Decimal &other)
Re-initializes instance as copy of the other one.
Decimal & operator=(const FixedPointDecimal< AMantissa, AExponent > &other)
DecimalExponent Exponent
Aliases exponent component type.
Mantissa mantissa() const
Returns mantissa of given decimal.
Decimal(Mantissa mantissa, Exponent exponent)
Explicitly initializes instance from its mantissa value.
Decimal(const FixedPointDecimal< AMantissa, AExponent > &other)
Decimal(const Decimal &other)
Initializes instance as copy of the other one.
Decimal()
Default (zero) initialization.
DecimalMantissa Mantissa
Aliases mantissa component type.
Exponent exponent() const
Returns exponent of given decimal.
IntegralConstant< Int8, -9 > Exponent
Mantissa mantissa() const
FixedPointDecimal(Mantissa mantissa)
Explicitly initializes instance from its mantissa value.
FixedPointDecimal()
Default (zero) initialization.
Exponent exponent() const
Returns exponent of given decimal.
bool operator>(const FixedPointDecimal< Mantissa, Exponent > &left, const FixedPointDecimal< Mantissa, Exponent > &right)
Compares two fixed-point decimals.
Int32 DecimalExponent
Aliases exponent component type for the decimal type.
Int64 DecimalMantissa
Aliases mantissa component type for the decimal type.
bool decimalLess(const Decimal &left, const Decimal &right)
Compares two decimals.
bool operator!=(const FixedPointDecimal< Mantissa, Exponent > &left, const FixedPointDecimal< Mantissa, Exponent > &right)
Compares two fixed-point decimals.
bool fromStr(Decimal &, const Char *, size_t)
bool operator<=(const FixedPointDecimal< Mantissa, Exponent > &left, const FixedPointDecimal< Mantissa, Exponent > &right)
Compares two fixed-point decimals.
char Char
Character type alias.
bool operator==(const FixedPointDecimal< Mantissa, Exponent > &left, const FixedPointDecimal< Mantissa, Exponent > &right)
Compares two fixed-point decimals.
void toStr(std::string &, BookState::Enum)
Serializes book state value into a string.
bool decimalEqual(const Decimal &left, const Decimal &right)
Checks two decimals for equality.
void decimalToStr(std::string &, Int64, Int32)
bool operator>=(const FixedPointDecimal< Mantissa, Exponent > &left, const FixedPointDecimal< Mantissa, Exponent > &right)
Compares two fixed-point decimals.
bool operator<(const FixedPointDecimal< Mantissa, Exponent > &left, const FixedPointDecimal< Mantissa, Exponent > &right)
Compares two fixed-point decimals.