44 MantissaType mantissa_;
82 : mantissa_(other.mantissa_)
103 mantissa_ = other.mantissa_;
119 <Mantissa, Exponent>& left,
122 <Mantissa, Exponent>& right)
124 return left.mantissa() == right.mantissa();
137 <Mantissa, Exponent>& left,
140 <Mantissa, Exponent>& right)
142 return left.mantissa() != right.mantissa();
155 <Mantissa, Exponent>& left,
158 <Mantissa, Exponent>& right)
160 return left.mantissa() < right.mantissa();
173 <Mantissa, Exponent>& left,
176 <Mantissa, Exponent>& right)
178 return left.mantissa() > right.mantissa();
191 <Mantissa, Exponent>& left,
194 <Mantissa, Exponent>& right)
196 return left.mantissa() <= right.mantissa();
209 <Mantissa, Exponent>& left,
212 <Mantissa, Exponent>& right)
214 return left.mantissa() >= right.mantissa();
259 : mantissa_(other.mantissa_)
260 , exponent_(other.exponent_)
273 <OtherMantissa, OtherExponent>& other)
296 mantissa_ = other.mantissa_;
297 exponent_ = other.exponent_;
312 <OtherMantissa, OtherExponent>& other)
315 exponent_ = other.exponent();
346 <Mantissa, Exponent>& right)
348 return (left ==
Decimal(right));
361 <Mantissa, Exponent>& left,
364 return (
Decimal(left) == right);
378 <Mantissa, Exponent>& right)
380 return (left !=
Decimal(right));
393 <Mantissa, Exponent>& left,
396 return (
Decimal(left) != right);
417 return (right < left);
431 <Mantissa, Exponent>& right)
433 return (left <
Decimal(right));
446 <Mantissa, Exponent>& left,
449 return (
Decimal(left) < right);
463 <Mantissa, Exponent>& right)
465 return (left >
Decimal(right));
478 <Mantissa, Exponent>& left,
481 return (
Decimal(left) > right);
538 <Mantissa, Exponent>& number)
#define ONIXS_CMESTREAMLINEDMDH_NAMESPACE_BEGIN
#define ONIXS_CMESTREAMLINEDMDH_NAMESPACE_END
#define ONIXS_CMESTREAMLINEDMDH_LTWT_CLASS
#define ONIXS_CMESTREAMLINEDMDH_EXPORTED
A real number with floating exponent.
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 Decimal &other)
Initializes instance as copy of the other one.
Decimal(const FixedPointDecimal< OtherMantissa, OtherExponent > &other)
Initializes instance from the fixed point decimal.
Decimal()
Default (zero) initialization.
DecimalMantissa Mantissa
Aliases mantissa component type.
Exponent exponent() const
Returns exponent of given decimal.
Represents real number with constant exponent.
IntegralConstant< Int8, -4 > 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.
FixedPointDecimal(const FixedPointDecimal &other)
Initializes instance as copy of the other one.
Int32 DecimalExponent
Aliases exponent component type for the decimal type.
Int64 DecimalMantissa
Aliases mantissa component type for the decimal type.
void decimalToStr(std::string &, Int64, Int32)
Serializes decimal presented by mantissa and exponent into a string.
void toStr(std::string &str, const Decimal &number)
bool fromStr(Decimal &, const char *, size_t)