44 MantissaType mantissa_;
62 Size =
sizeof(Mantissa)
102 <Mantissa, Exponent>& left,
105 <Mantissa, Exponent>& right)
124 <Mantissa, Exponent>& left,
127 <Mantissa, Exponent>& right)
146 <Mantissa, Exponent>& left,
149 <Mantissa, Exponent>& right)
168 <Mantissa, Exponent>& left,
171 <Mantissa, Exponent>& right)
190 <Mantissa, Exponent>& left,
193 <Mantissa, Exponent>& right)
212 <Mantissa, Exponent>& left,
215 <Mantissa, Exponent>& right)
258 : mantissa_(mantissa)
259 , exponent_(exponent)
266 : mantissa_(other.mantissa_)
267 , exponent_(other.exponent_)
281 <AMantissa, AExponent>& other)
306 mantissa_ = other.mantissa_;
307 exponent_ = other.exponent_;
323 <AMantissa, AExponent>& other)
326 exponent_ = other.exponent();
333 ONIXS_CONFLATEDUDP_EXPORTED
401 <Mantissa, Exponent>& right)
403 return (left ==
Decimal(right));
417 <Mantissa, Exponent>& left,
420 return (
Decimal(left) == right);
435 <Mantissa, Exponent>& right)
437 return (left !=
Decimal(right));
451 <Mantissa, Exponent>& left,
454 return (
Decimal(left) != right);
458 ONIXS_CONFLATEDUDP_EXPORTED
496 return (right < left);
506 return !(right < left);
516 return !(right > left);
531 <Mantissa, Exponent>& right)
533 return (left <
Decimal(right));
547 <Mantissa, Exponent>& left,
550 return (
Decimal(left) < right);
565 <Mantissa, Exponent>& right)
567 return (left >
Decimal(right));
581 <Mantissa, Exponent>& left,
584 return (
Decimal(left) > right);
589 ONIXS_CONFLATEDUDP_EXPORTED
598 ONIXS_CONFLATEDUDP_EXPORTED
645 <Mantissa, Exponent>& number)
bool operator>(const FixedPointDecimal< Mantissa, Exponent > &left, const Decimal &right)
Compares two decimals.
Decimal(const FixedPointDecimal< AMantissa, AExponent > &other)
A real number with floating exponent.
FixedPointDecimal(Mantissa mantissa)
Explicitly initializes instance from its mantissa value.
Decimal()
Default (zero) initialization.
std::string toStr(const FixedPointDecimal< Mantissa, Exponent > &number)
Serializes fixed-point decimal into a string.
Mantissa mantissa() const
Returns mantissa of given decimal.
ONIXS_CONFLATEDUDP_EXPORTED void decimalToStr(std::string &, Int64, Int32)
Mantissa mantissa() const
Returns mantissa of given decimal.
Decimal(Mantissa mantissa, Exponent exponent)
Explicitly initializes instance from its mantissa value.
Decimal(const Decimal &other)
Initializes instance as copy of the other one.
ONIXS_CONFLATEDUDP_EXPORTED bool decimalLess(const Decimal &left, const Decimal &right)
Compares two decimals.
char Char
Character type alias.
bool operator<=(const Decimal &left, const Decimal &right)
Compares two decimals.
bool operator!=(const FixedPointDecimal< Mantissa, Exponent > &left, const Decimal &right)
Checks two decimals for inequality.
MantissaType Mantissa
Aliases mantissa component type.
DecimalExponent Exponent
Aliases exponent component type.
bool operator<(const FixedPointDecimal< Mantissa, Exponent > &left, const Decimal &right)
Compares two decimals.
Exponent exponent() const
Returns exponent of given decimal.
ONIXS_CONFLATEDUDP_EXPORTED bool fromStr(Decimal &, const Char *, size_t)
#define ONIXS_CONFLATEDUDP_NAMESPACE_END
bool operator==(const FixedPointDecimal< Mantissa, Exponent > &left, const Decimal &right)
Checks two decimals for equality.
Exponent exponent() const
Returns exponent of given decimal.
DecimalMantissa Mantissa
Aliases mantissa component type.
Int64 DecimalMantissa
Aliases mantissa component type for the decimal type.
FixedPointDecimal()
Default (zero) initialization.
ExponentType Exponent
Aliases exponent component type.
#define ONIXS_CONFLATEDUDP_LTWT_CLASS
Int32 DecimalExponent
Aliases exponent component type for the decimal type.
ONIXS_CONFLATEDUDP_EXPORTED bool decimalEqual(const Decimal &left, const Decimal &right)
Checks two decimals for equality.
bool operator>=(const Decimal &left, const Decimal &right)
Compares two decimals.
#define ONIXS_CONFLATEDUDP_NAMESPACE_BEGIN