Quick Links:

bal | bbl | bdl | bsl

Classes | Typedefs | Functions

bdldfp Namespace Reference
[Component bdldfp_decimalComponent bdldfp_decimalconvertutilComponent bdldfp_decimalformatconfigComponent bdldfp_decimalimputilComponent bdldfp_decimalstorageComponent bdldfp_decimalutilComponent bdldfp_uint128]

Classes

class  Decimal_Type32
class  Decimal_Type64
class  Decimal_Type128
class  DecimalNumGet
class  DecimalNumPut_WideBufferWrapper< char, WCHAR_8_BIT >
class  DecimalNumPut_WideBufferWrapper< wchar_t, false >
struct  DecimalConvertUtil
class  DecimalFormatConfig
class  DecimalImpUtil
struct  DecimalStorage
struct  DecimalUtil
struct  DecimalUtil_CStringUtil
class  Uint128

Typedefs

typedef Decimal_Type32 Decimal32
typedef Decimal_Type64 Decimal64
typedef Decimal_Type128 Decimal128

Functions

Decimal32 operator+ (Decimal32 value)
Decimal32 operator- (Decimal32 value)
Decimal32 operator++ (Decimal32 &value, int)
Decimal32 operator-- (Decimal32 &value, int)
Decimal32 operator+ (Decimal32 lhs, Decimal32 rhs)
Decimal32 operator+ (Decimal32 lhs, int rhs)
Decimal32 operator+ (Decimal32 lhs, unsigned int rhs)
Decimal32 operator+ (Decimal32 lhs, long rhs)
Decimal32 operator+ (Decimal32 lhs, unsigned long rhs)
Decimal32 operator+ (Decimal32 lhs, long long rhs)
Decimal32 operator+ (Decimal32 lhs, unsigned long long rhs)
Decimal32 operator+ (int lhs, Decimal32 rhs)
Decimal32 operator+ (unsigned int lhs, Decimal32 rhs)
Decimal32 operator+ (long lhs, Decimal32 rhs)
Decimal32 operator+ (unsigned long lhs, Decimal32 rhs)
Decimal32 operator+ (long long lhs, Decimal32 rhs)
Decimal32 operator+ (unsigned long long lhs, Decimal32 rhs)
Decimal32 operator- (Decimal32 lhs, Decimal32 rhs)
Decimal32 operator- (Decimal32 lhs, int rhs)
Decimal32 operator- (Decimal32 lhs, unsigned int rhs)
Decimal32 operator- (Decimal32 lhs, long rhs)
Decimal32 operator- (Decimal32 lhs, unsigned long rhs)
Decimal32 operator- (Decimal32 lhs, long long rhs)
Decimal32 operator- (Decimal32 lhs, unsigned long long rhs)
Decimal32 operator- (int lhs, Decimal32 rhs)
Decimal32 operator- (unsigned int lhs, Decimal32 rhs)
Decimal32 operator- (long lhs, Decimal32 rhs)
Decimal32 operator- (unsigned long lhs, Decimal32 rhs)
Decimal32 operator- (long long lhs, Decimal32 rhs)
Decimal32 operator- (unsigned long long lhs, Decimal32 rhs)
Decimal32 operator* (Decimal32 lhs, Decimal32 rhs)
Decimal32 operator* (Decimal32 lhs, int rhs)
Decimal32 operator* (Decimal32 lhs, unsigned int rhs)
Decimal32 operator* (Decimal32 lhs, long rhs)
Decimal32 operator* (Decimal32 lhs, unsigned long rhs)
Decimal32 operator* (Decimal32 lhs, long long rhs)
Decimal32 operator* (Decimal32 lhs, unsigned long long rhs)
Decimal32 operator* (int lhs, Decimal32 rhs)
Decimal32 operator* (unsigned int lhs, Decimal32 rhs)
Decimal32 operator* (long lhs, Decimal32 rhs)
Decimal32 operator* (unsigned long lhs, Decimal32 rhs)
Decimal32 operator* (long long lhs, Decimal32 rhs)
Decimal32 operator* (unsigned long long lhs, Decimal32 rhs)
Decimal32 operator/ (Decimal32 lhs, Decimal32 rhs)
Decimal32 operator/ (Decimal32 lhs, int rhs)
Decimal32 operator/ (Decimal32 lhs, unsigned int rhs)
Decimal32 operator/ (Decimal32 lhs, long rhs)
Decimal32 operator/ (Decimal32 lhs, unsigned long rhs)
Decimal32 operator/ (Decimal32 lhs, long long rhs)
Decimal32 operator/ (Decimal32 lhs, unsigned long long rhs)
Decimal32 operator/ (int lhs, Decimal32 rhs)
Decimal32 operator/ (unsigned int lhs, Decimal32 rhs)
Decimal32 operator/ (long lhs, Decimal32 rhs)
Decimal32 operator/ (unsigned long lhs, Decimal32 rhs)
Decimal32 operator/ (long long lhs, Decimal32 rhs)
Decimal32 operator/ (unsigned long long lhs, Decimal32 rhs)
bool operator== (Decimal32 lhs, Decimal32 rhs)
bool operator!= (Decimal32 lhs, Decimal32 rhs)
bool operator< (Decimal32 lhs, Decimal32 rhs)
bool operator<= (Decimal32 lhs, Decimal32 rhs)
bool operator> (Decimal32 lhs, Decimal32 rhs)
bool operator>= (Decimal32 lhs, Decimal32 rhs)
template<class CHARTYPE , class TRAITS >
bsl::basic_istream< CHARTYPE,
TRAITS > & 
operator>> (bsl::basic_istream< CHARTYPE, TRAITS > &stream, Decimal32 &object)
template<class CHARTYPE , class TRAITS >
bsl::basic_ostream< CHARTYPE,
TRAITS > & 
operator<< (bsl::basic_ostream< CHARTYPE, TRAITS > &stream, Decimal32 object)
template<class HASHALG >
void hashAppend (HASHALG &hashAlg, const Decimal32 &object)
Decimal64 operator+ (Decimal64 value)
Decimal64 operator- (Decimal64 value)
Decimal64 operator++ (Decimal64 &value, int)
Decimal64 operator-- (Decimal64 &value, int)
Decimal64 operator+ (Decimal64 lhs, Decimal64 rhs)
Decimal64 operator+ (Decimal32 lhs, Decimal64 rhs)
Decimal64 operator+ (Decimal64 lhs, Decimal32 rhs)
Decimal64 operator+ (Decimal64 lhs, int rhs)
Decimal64 operator+ (Decimal64 lhs, unsigned int rhs)
Decimal64 operator+ (Decimal64 lhs, long rhs)
Decimal64 operator+ (Decimal64 lhs, unsigned long rhs)
Decimal64 operator+ (Decimal64 lhs, long long rhs)
Decimal64 operator+ (Decimal64 lhs, unsigned long long rhs)
Decimal64 operator+ (int lhs, Decimal64 rhs)
Decimal64 operator+ (unsigned int lhs, Decimal64 rhs)
Decimal64 operator+ (long lhs, Decimal64 rhs)
Decimal64 operator+ (unsigned long lhs, Decimal64 rhs)
Decimal64 operator+ (long long lhs, Decimal64 rhs)
Decimal64 operator+ (unsigned long long lhs, Decimal64 rhs)
Decimal64 operator- (Decimal64 lhs, Decimal64 rhs)
Decimal64 operator- (Decimal32 lhs, Decimal64 rhs)
Decimal64 operator- (Decimal64 lhs, Decimal32 rhs)
Decimal64 operator- (Decimal64 lhs, int rhs)
Decimal64 operator- (Decimal64 lhs, unsigned int rhs)
Decimal64 operator- (Decimal64 lhs, long rhs)
Decimal64 operator- (Decimal64 lhs, unsigned long rhs)
Decimal64 operator- (Decimal64 lhs, long long rhs)
Decimal64 operator- (Decimal64 lhs, unsigned long long rhs)
Decimal64 operator- (int lhs, Decimal64 rhs)
Decimal64 operator- (unsigned int lhs, Decimal64 rhs)
Decimal64 operator- (long lhs, Decimal64 rhs)
Decimal64 operator- (unsigned long lhs, Decimal64 rhs)
Decimal64 operator- (long long lhs, Decimal64 rhs)
Decimal64 operator- (unsigned long long lhs, Decimal64 rhs)
Decimal64 operator* (Decimal64 lhs, Decimal64 rhs)
Decimal64 operator* (Decimal32 lhs, Decimal64 rhs)
Decimal64 operator* (Decimal64 lhs, Decimal32 rhs)
Decimal64 operator* (Decimal64 lhs, int rhs)
Decimal64 operator* (Decimal64 lhs, unsigned int rhs)
Decimal64 operator* (Decimal64 lhs, long rhs)
Decimal64 operator* (Decimal64 lhs, unsigned long rhs)
Decimal64 operator* (Decimal64 lhs, long long rhs)
Decimal64 operator* (Decimal64 lhs, unsigned long long rhs)
Decimal64 operator* (int lhs, Decimal64 rhs)
Decimal64 operator* (unsigned int lhs, Decimal64 rhs)
Decimal64 operator* (long lhs, Decimal64 rhs)
Decimal64 operator* (unsigned long lhs, Decimal64 rhs)
Decimal64 operator* (long long lhs, Decimal64 rhs)
Decimal64 operator* (unsigned long long lhs, Decimal64 rhs)
Decimal64 operator/ (Decimal64 lhs, Decimal64 rhs)
Decimal64 operator/ (Decimal32 lhs, Decimal64 rhs)
Decimal64 operator/ (Decimal64 lhs, Decimal32 rhs)
Decimal64 operator/ (Decimal64 lhs, int rhs)
Decimal64 operator/ (Decimal64 lhs, unsigned int rhs)
Decimal64 operator/ (Decimal64 lhs, long rhs)
Decimal64 operator/ (Decimal64 lhs, unsigned long rhs)
Decimal64 operator/ (Decimal64 lhs, long long rhs)
Decimal64 operator/ (Decimal64 lhs, unsigned long long rhs)
Decimal64 operator/ (int lhs, Decimal64 rhs)
Decimal64 operator/ (unsigned int lhs, Decimal64 rhs)
Decimal64 operator/ (long lhs, Decimal64 rhs)
Decimal64 operator/ (unsigned long lhs, Decimal64 rhs)
Decimal64 operator/ (long long lhs, Decimal64 rhs)
Decimal64 operator/ (unsigned long long lhs, Decimal64 rhs)
bool operator== (Decimal64 lhs, Decimal64 rhs)
bool operator== (Decimal32 lhs, Decimal64 rhs)
bool operator== (Decimal64 lhs, Decimal32 rhs)
bool operator!= (Decimal64 lhs, Decimal64 rhs)
bool operator!= (Decimal32 lhs, Decimal64 rhs)
bool operator!= (Decimal64 lhs, Decimal32 rhs)
bool operator< (Decimal64 lhs, Decimal64 rhs)
bool operator< (Decimal32 lhs, Decimal64 rhs)
bool operator< (Decimal64 lhs, Decimal32 rhs)
bool operator<= (Decimal64 lhs, Decimal64 rhs)
bool operator<= (Decimal32 lhs, Decimal64 rhs)
bool operator<= (Decimal64 lhs, Decimal32 rhs)
bool operator> (Decimal64 lhs, Decimal64 rhs)
bool operator> (Decimal32 lhs, Decimal64 rhs)
bool operator> (Decimal64 lhs, Decimal32 rhs)
bool operator>= (Decimal64 lhs, Decimal64 rhs)
bool operator>= (Decimal32 lhs, Decimal64 rhs)
bool operator>= (Decimal64 lhs, Decimal32 rhs)
template<class CHARTYPE , class TRAITS >
bsl::basic_istream< CHARTYPE,
TRAITS > & 
operator>> (bsl::basic_istream< CHARTYPE, TRAITS > &stream, Decimal64 &object)
template<class CHARTYPE , class TRAITS >
bsl::basic_ostream< CHARTYPE,
TRAITS > & 
operator<< (bsl::basic_ostream< CHARTYPE, TRAITS > &stream, Decimal64 object)
template<class HASHALG >
void hashAppend (HASHALG &hashAlg, const Decimal64 &object)
Decimal128 operator+ (Decimal128 value)
Decimal128 operator- (Decimal128 value)
Decimal128 operator++ (Decimal128 &value, int)
Decimal128 operator-- (Decimal128 &value, int)
Decimal128 operator+ (Decimal128 lhs, Decimal128 rhs)
Decimal128 operator+ (Decimal32 lhs, Decimal128 rhs)
Decimal128 operator+ (Decimal128 lhs, Decimal32 rhs)
Decimal128 operator+ (Decimal64 lhs, Decimal128 rhs)
Decimal128 operator+ (Decimal128 lhs, Decimal64 rhs)
Decimal128 operator+ (Decimal128 lhs, int rhs)
Decimal128 operator+ (Decimal128 lhs, unsigned int rhs)
Decimal128 operator+ (Decimal128 lhs, long rhs)
Decimal128 operator+ (Decimal128 lhs, unsigned long rhs)
Decimal128 operator+ (Decimal128 lhs, long long rhs)
Decimal128 operator+ (Decimal128 lhs, unsigned long long rhs)
Decimal128 operator+ (int lhs, Decimal128 rhs)
Decimal128 operator+ (unsigned int lhs, Decimal128 rhs)
Decimal128 operator+ (long lhs, Decimal128 rhs)
Decimal128 operator+ (unsigned long lhs, Decimal128 rhs)
Decimal128 operator+ (long long lhs, Decimal128 rhs)
Decimal128 operator+ (unsigned long long lhs, Decimal128 rhs)
Decimal128 operator- (Decimal128 lhs, Decimal128 rhs)
Decimal128 operator- (Decimal32 lhs, Decimal128 rhs)
Decimal128 operator- (Decimal128 lhs, Decimal32 rhs)
Decimal128 operator- (Decimal64 lhs, Decimal128 rhs)
Decimal128 operator- (Decimal128 lhs, Decimal64 rhs)
Decimal128 operator- (Decimal128 lhs, int rhs)
Decimal128 operator- (Decimal128 lhs, unsigned int rhs)
Decimal128 operator- (Decimal128 lhs, long rhs)
Decimal128 operator- (Decimal128 lhs, unsigned long rhs)
Decimal128 operator- (Decimal128 lhs, long long rhs)
Decimal128 operator- (Decimal128 lhs, unsigned long long rhs)
Decimal128 operator- (int lhs, Decimal128 rhs)
Decimal128 operator- (unsigned int lhs, Decimal128 rhs)
Decimal128 operator- (long lhs, Decimal128 rhs)
Decimal128 operator- (unsigned long lhs, Decimal128 rhs)
Decimal128 operator- (long long lhs, Decimal128 rhs)
Decimal128 operator- (unsigned long long lhs, Decimal128 rhs)
Decimal128 operator* (Decimal128 lhs, Decimal128 rhs)
Decimal128 operator* (Decimal32 lhs, Decimal128 rhs)
Decimal128 operator* (Decimal128 lhs, Decimal32 rhs)
Decimal128 operator* (Decimal64 lhs, Decimal128 rhs)
Decimal128 operator* (Decimal128 lhs, Decimal64 rhs)
Decimal128 operator* (Decimal128 lhs, int rhs)
Decimal128 operator* (Decimal128 lhs, unsigned int rhs)
Decimal128 operator* (Decimal128 lhs, long rhs)
Decimal128 operator* (Decimal128 lhs, unsigned long rhs)
Decimal128 operator* (Decimal128 lhs, long long rhs)
Decimal128 operator* (Decimal128 lhs, unsigned long long rhs)
Decimal128 operator* (int lhs, Decimal128 rhs)
Decimal128 operator* (unsigned int lhs, Decimal128 rhs)
Decimal128 operator* (long lhs, Decimal128 rhs)
Decimal128 operator* (unsigned long lhs, Decimal128 rhs)
Decimal128 operator* (long long lhs, Decimal128 rhs)
Decimal128 operator* (unsigned long long lhs, Decimal128 rhs)
Decimal128 operator/ (Decimal128 lhs, Decimal128 rhs)
Decimal128 operator/ (Decimal32 lhs, Decimal128 rhs)
Decimal128 operator/ (Decimal128 lhs, Decimal32 rhs)
Decimal128 operator/ (Decimal64 lhs, Decimal128 rhs)
Decimal128 operator/ (Decimal128 lhs, Decimal64 rhs)
Decimal128 operator/ (Decimal128 lhs, int rhs)
Decimal128 operator/ (Decimal128 lhs, unsigned int rhs)
Decimal128 operator/ (Decimal128 lhs, long rhs)
Decimal128 operator/ (Decimal128 lhs, unsigned long rhs)
Decimal128 operator/ (Decimal128 lhs, long long rhs)
Decimal128 operator/ (Decimal128 lhs, unsigned long long rhs)
Decimal128 operator/ (int lhs, Decimal128 rhs)
Decimal128 operator/ (unsigned int lhs, Decimal128 rhs)
Decimal128 operator/ (long lhs, Decimal128 rhs)
Decimal128 operator/ (unsigned long lhs, Decimal128 rhs)
Decimal128 operator/ (long long lhs, Decimal128 rhs)
Decimal128 operator/ (unsigned long long lhs, Decimal128 rhs)
bool operator== (Decimal128 lhs, Decimal128 rhs)
bool operator== (Decimal32 lhs, Decimal128 rhs)
bool operator== (Decimal128 lhs, Decimal32 rhs)
bool operator== (Decimal64 lhs, Decimal128 rhs)
bool operator== (Decimal128 lhs, Decimal64 rhs)
bool operator!= (Decimal128 lhs, Decimal128 rhs)
bool operator!= (Decimal32 lhs, Decimal128 rhs)
bool operator!= (Decimal128 lhs, Decimal32 rhs)
bool operator!= (Decimal64 lhs, Decimal128 rhs)
bool operator!= (Decimal128 lhs, Decimal64 rhs)
bool operator< (Decimal128 lhs, Decimal128 rhs)
bool operator< (Decimal32 lhs, Decimal128 rhs)
bool operator< (Decimal128 lhs, Decimal32 rhs)
bool operator< (Decimal64 lhs, Decimal128 rhs)
bool operator< (Decimal128 lhs, Decimal64 rhs)
bool operator<= (Decimal128 lhs, Decimal128 rhs)
bool operator<= (Decimal32 lhs, Decimal128 rhs)
bool operator<= (Decimal128 lhs, Decimal32 rhs)
bool operator<= (Decimal64 lhs, Decimal128 rhs)
bool operator<= (Decimal128 lhs, Decimal64 rhs)
bool operator> (Decimal128 lhs, Decimal128 rhs)
bool operator> (Decimal32 lhs, Decimal128 rhs)
bool operator> (Decimal128 lhs, Decimal32 rhs)
bool operator> (Decimal64 lhs, Decimal128 rhs)
bool operator> (Decimal128 lhs, Decimal64 rhs)
bool operator>= (Decimal128 lhs, Decimal128 rhs)
bool operator>= (Decimal32 lhs, Decimal128 rhs)
bool operator>= (Decimal128 lhs, Decimal32 rhs)
bool operator>= (Decimal64 lhs, Decimal128 rhs)
bool operator>= (Decimal128 lhs, Decimal64 rhs)
template<class CHARTYPE , class TRAITS >
bsl::basic_istream< CHARTYPE,
TRAITS > & 
operator>> (bsl::basic_istream< CHARTYPE, TRAITS > &stream, Decimal128 &object)
template<class CHARTYPE , class TRAITS >
bsl::basic_ostream< CHARTYPE,
TRAITS > & 
operator<< (bsl::basic_ostream< CHARTYPE, TRAITS > &stream, Decimal128 object)
template<class HASHALG >
void hashAppend (HASHALG &hashAlg, const Decimal128 &object)
bool operator== (const DecimalFormatConfig &lhs, const DecimalFormatConfig &rhs)
bool operator!= (const DecimalFormatConfig &lhs, const DecimalFormatConfig &rhs)
bool operator== (const Uint128 &lhs, const Uint128 &rhs)
bool operator!= (const Uint128 &lhs, const Uint128 &rhs)
Uint128 operator| (Uint128 lhs, const Uint128 &rhs)
Uint128 operator& (Uint128 lhs, const Uint128 &rhs)
Uint128 operator^ (Uint128 lhs, const Uint128 &rhs)
Uint128 operator<< (Uint128 lhs, int rhs)
Uint128 operator>> (Uint128 lhs, int rhs)
Uint128 operator~ (Uint128 value)

Typedef Documentation


Function Documentation

Decimal32 bdldfp::operator+ ( Decimal32  value  ) 

Return a copy of the specified value if the value is not negative zero, and return positive zero otherwise.

Decimal32 bdldfp::operator- ( Decimal32  value  ) 

Return the result of applying the unary - operator to the specified value as described by IEEE-754, essentially reversing the sign bit. Note that floating-point numbers have signed zero, so this operation is not the same as 0 - value.

Decimal32 bdldfp::operator++ ( Decimal32 &  value,
int   
)

Apply the prefix ++ operator to the specified value and return its original value. Note that this is a floating-point value so this operation may not change the value of this object at all (if the value is large) or it may just set it to 1.0 (if the original value is small).

Decimal32 bdldfp::operator-- ( Decimal32 &  value,
int   
)

Apply the prefix -- operator to the specified value and return its original value. Note that this is a floating-point value so this operation may not change the value of this object at all (if the value is large) or it may just set it to -1.0 (if the original value is small).

Decimal32 bdldfp::operator+ ( Decimal32  lhs,
Decimal32  rhs 
)

Add the value of the specified rhs to the value of the specified lhs as described by IEEE-754 and return the result.

  • If either of lhs or rhs is signaling NaN, then store the value of the macro EDOM into errno and return a NaN.
  • Otherwise if either of lhs or rhs is NaN, return a NaN.
  • Otherwise if lhs and rhs are infinities of differing signs, store the value of the macro EDOM into errno and return a NaN.
  • Otherwise if lhs and rhs are infinities of the same sign then return infinity of that sign.
  • Otherwise if the sum of lhs and rhs has an absolute value that is larger than std::numeric_limits<Decimal32>max() then store the value of the macro ERANGE into errno and set this object to infinity with the same sign as that result.
  • Otherwise return the sum of the number represented by lhs and the number represented by rhs.
Decimal32 bdldfp::operator+ ( Decimal32  lhs,
int  rhs 
)
Decimal32 bdldfp::operator+ ( Decimal32  lhs,
unsigned int  rhs 
)
Decimal32 bdldfp::operator+ ( Decimal32  lhs,
long  rhs 
)
Decimal32 bdldfp::operator+ ( Decimal32  lhs,
unsigned long  rhs 
)
Decimal32 bdldfp::operator+ ( Decimal32  lhs,
long long  rhs 
)
Decimal32 bdldfp::operator+ ( Decimal32  lhs,
unsigned long long  rhs 
)

Add the specified rhs to the value of the specified lhs as described by IEEE-754 and return the result.

  • If lhs is signaling NaN, then store the value of the macro EDOM into errno and return a NaN.
  • Otherwise if lhs object is NaN, then return a NaN.
  • Otherwise if lhs is infinity, then return infinity.
  • Otherwise if the sum of lhs and rhs has an absolute value that is larger than std::numeric_limits<Decimal32>max() then store the value of the macro ERANGE into errno and return infinity with the same sign as that result.
  • Otherwise return the sum of rhs and the number represented by lhs.
Decimal32 bdldfp::operator+ ( int  lhs,
Decimal32  rhs 
)
Decimal32 bdldfp::operator+ ( unsigned int  lhs,
Decimal32  rhs 
)
Decimal32 bdldfp::operator+ ( long  lhs,
Decimal32  rhs 
)
Decimal32 bdldfp::operator+ ( unsigned long  lhs,
Decimal32  rhs 
)
Decimal32 bdldfp::operator+ ( long long  lhs,
Decimal32  rhs 
)
Decimal32 bdldfp::operator+ ( unsigned long long  lhs,
Decimal32  rhs 
)

Add the specified lhs to the value of the specified rhs as described by IEEE-754 and return the result.

  • If rhs is signaling NaN, then store the value of the macro EDOM into errno and return a NaN.
  • Otherwise if rhs object is NaN, then return a NaN.
  • Otherwise if rhs is infinity, then return infinity.
  • Otherwise if the sum of lhs and rhs has an absolute value that is larger than std::numeric_limits<Decimal32>max() then store the value of the macro ERANGE into errno and return infinity with the same sign as that result.
  • Otherwise return the sum of lhs and the number represented by rhs.
Decimal32 bdldfp::operator- ( Decimal32  lhs,
Decimal32  rhs 
)

Subtract the value of the specified rhs from the value of the specified lhs as described by IEEE-754 and return the result.

  • If either of lhs or rhs is signaling NaN, then store the value of the macro EDOM into errno and return a NaN.
  • Otherwise if either of lhs or rhs is NaN, return a NaN.
  • Otherwise if lhs and the rhs have infinity values of the same sign, store the value of the macro EDOM into errno and return a NaN.
  • Otherwise if lhs and the rhs have infinity values of differing signs, then return lhs.
  • Otherwise if the subtracting of lhs and rhs has an absolute value that is larger than std::numeric_limits<Decimal32>max() then store the value of the macro ERANGE into errno and return infinity with the same sign as that result.
  • Otherwise return the result of subtracting the value of rhs from the value of lhs.
Decimal32 bdldfp::operator- ( Decimal32  lhs,
int  rhs 
)
Decimal32 bdldfp::operator- ( Decimal32  lhs,
unsigned int  rhs 
)
Decimal32 bdldfp::operator- ( Decimal32  lhs,
long  rhs 
)
Decimal32 bdldfp::operator- ( Decimal32  lhs,
unsigned long  rhs 
)
Decimal32 bdldfp::operator- ( Decimal32  lhs,
long long  rhs 
)
Decimal32 bdldfp::operator- ( Decimal32  lhs,
unsigned long long  rhs 
)

Subtract the specified rhs from the value of the specified lhs as described by IEEE-754 and return a reference to this object.

  • If lhs is signaling NaN, then store the value of the macro EDOM into errno and return a NaN.
  • Otherwise if lhs is NaN, then return a NaN.
  • Otherwise if lhs is infinity, then return infinity.
  • Otherwise if subtracting rhs from lhs object's value results in an absolute value that is larger than std::numeric_limits<Decimal32>max() then store the value of the macro ERANGE into errno and return infinity with the same sign as that result.
  • Otherwise return the result of subtracting rhs from the value of lhs.
Decimal32 bdldfp::operator- ( int  lhs,
Decimal32  rhs 
)
Decimal32 bdldfp::operator- ( unsigned int  lhs,
Decimal32  rhs 
)
Decimal32 bdldfp::operator- ( long  lhs,
Decimal32  rhs 
)
Decimal32 bdldfp::operator- ( unsigned long  lhs,
Decimal32  rhs 
)
Decimal32 bdldfp::operator- ( long long  lhs,
Decimal32  rhs 
)
Decimal32 bdldfp::operator- ( unsigned long long  lhs,
Decimal32  rhs 
)

Subtract the specified rhs from the value of the specified lhs as described by IEEE-754 and return a reference to this object.

  • If rhs is signaling NaN, then store the value of the macro EDOM into errno and return a NaN.
  • Otherwise if rhs is NaN, then return a NaN.
  • Otherwise if rhs is infinity, then return infinity.
  • Otherwise if subtracting rhs from lhs object's value results in an absolute value that is larger than std::numeric_limits<Decimal32>max() then store the value of the macro ERANGE into errno and return infinity with the same sign as that result.
  • Otherwise return the result of subtracting the value of rhs from the number lhs.
Decimal32 bdldfp::operator* ( Decimal32  lhs,
Decimal32  rhs 
)

Multiply the value of the specified lhs object by the value of the specified rhs as described by IEEE-754 and return the result.

  • If either of lhs or rhs is signaling NaN, then store the value of the macro EDOM into errno and return a NaN.
  • Otherwise if either of lhs or rhs is NaN, return a NaN.
  • Otherwise if one of the operands is infinity (positive or negative) and the other is zero (positive or negative), then store the value of the macro EDOM into errno and return a NaN.
  • Otherwise if both lhs and rhs are infinity (positive or negative), return infinity. The sign of the returned value will be positive if lhs and rhs have the same sign, and negative otherwise.
  • Otherwise, if either lhs or rhs is zero, return zero. The sign of the returned value will be positive if lhs and rhs have the same sign, and negative otherwise.
  • Otherwise if the product of lhs and rhs has an absolute value that is larger than std::numeric_limits<Decimal32>max() then store the value of the macro ERANGE into errno and return infinity with the same sign as that result.
  • Otherwise if the product of lhs and rhs has an absolute value that is smaller than std::numeric_limits<Decimal32>min() then store the value of the macro ERANGE into errno and return zero with the same sign as that result.
  • Otherwise return the product of the value of rhs and the number represented by rhs.
Decimal32 bdldfp::operator* ( Decimal32  lhs,
int  rhs 
)
Decimal32 bdldfp::operator* ( Decimal32  lhs,
unsigned int  rhs 
)
Decimal32 bdldfp::operator* ( Decimal32  lhs,
long  rhs 
)
Decimal32 bdldfp::operator* ( Decimal32  lhs,
unsigned long  rhs 
)
Decimal32 bdldfp::operator* ( Decimal32  lhs,
long long  rhs 
)
Decimal32 bdldfp::operator* ( Decimal32  lhs,
unsigned long long  rhs 
)

Multiply the specified rhs by the value of the specified lhs as described by IEEE-754, and return the result.

  • If lhs is signaling NaN, then store the value of the macro EDOM into errno and return a NaN.
  • Otherwise if lhs is NaN, then return a NaN.
  • Otherwise if lhs is infinity (positive or negative), and rhs is zero, then store the value of the macro EDOM into errno and return a NaN.
  • Otherwise if lhs is infinity (positive or negative), then return lhs.
  • Otherwise if rhs is zero, then return zero with the sign of lhs.
  • Otherwise if the product of rhs and the value of lhs results in an absolute value that is larger than std::numeric_limits<Decimal32>max() then store the value of the macro ERANGE into errno and return infinity with the same sign as that result.
  • Otherwise if the product of rhs and the value of lhs results in an absolute value that is smaller than std::numeric_limits<Decimal32>min() then store the value of the macro ERANGE into errno and return zero with the same sign as that result.
  • Otherwise return the product of the value of lhs and value rhs.
Decimal32 bdldfp::operator* ( int  lhs,
Decimal32  rhs 
)
Decimal32 bdldfp::operator* ( unsigned int  lhs,
Decimal32  rhs 
)
Decimal32 bdldfp::operator* ( long  lhs,
Decimal32  rhs 
)
Decimal32 bdldfp::operator* ( unsigned long  lhs,
Decimal32  rhs 
)
Decimal32 bdldfp::operator* ( long long  lhs,
Decimal32  rhs 
)
Decimal32 bdldfp::operator* ( unsigned long long  lhs,
Decimal32  rhs 
)

Multiply the specified lhs by the value of the specified rhs as described by IEEE-754, and return the result.

  • If rhs is signaling NaN, then store the value of the macro EDOM into errno and return a NaN.
  • Otherwise if rhs is NaN, then return a NaN.
  • Otherwise if rhs is infinity (positive or negative), and lhs is zero, then store the value of the macro EDOM into errno and return a NaN.
  • Otherwise if rhs is infinity (positive or negative), then return rhs.
  • Otherwise if lhs is zero, then return zero with the sign of rhs.
  • Otherwise if the product of lhs and the value of rhs results in an absolute value that is larger than std::numeric_limits<Decimal32>max() then store the value of the macro ERANGE into errno and return infinity with the same sign as that result.
  • Otherwise if the product of lhs and the value of rhs results in an absolute value that is smaller than std::numeric_limits<Decimal32>min() then store the value of the macro ERANGE into errno and return zero with the same sign as that result.
  • Otherwise return the product of the value of lhs and value rhs.
Decimal32 bdldfp::operator/ ( Decimal32  lhs,
Decimal32  rhs 
)

Divide the value of the specified lhs by the value of the specified rhs as described by IEEE-754, and return the result.

  • If either of lhs or rhs is signaling NaN, then store the value of the macro EDOM into errno and return a NaN.
  • Otherwise if either of lhs or rhs is NaN, return a NaN.
  • Otherwise if lhs and rhs are both infinity (positive or negative) or both zero (positive or negative) then store the value of the macro EDOM into errno and return a NaN.
  • Otherwise if lhs has a normal value and rhs has a positive zero value, store the value of the macro ERANGE into errno and return infinity with the sign of lhs.
  • Otherwise if lhs has a normal value and rhs has a negative zero value, store the value of the macro ERANGE into errno and return infinity with the opposite sign as lhs.
  • Otherwise if lhs has infinity value and rhs has a positive zero value, return infinity with the sign of lhs.
  • Otherwise if lhs has infinity value and rhs has a negative zero value, return infinity with the opposite sign as lhs.
  • Otherwise if dividing the value of lhs by the value of rhs results in an absolute value that is larger than std::numeric_limits<Decimal32>max() then store the value of the macro ERANGE into errno and return infinity with the same sign as that result.
  • Otherwise if dividing the value of lhs by the value of rhs results in an absolute value that is smaller than std::numeric_limits<Decimal32>min() then store the value of the macro ERANGE into errno and return zero with the same sign as that result.
  • Otherwise return the result of dividing the value of lhs by the value of rhs.
Decimal32 bdldfp::operator/ ( Decimal32  lhs,
int  rhs 
)
Decimal32 bdldfp::operator/ ( Decimal32  lhs,
unsigned int  rhs 
)
Decimal32 bdldfp::operator/ ( Decimal32  lhs,
long  rhs 
)
Decimal32 bdldfp::operator/ ( Decimal32  lhs,
unsigned long  rhs 
)
Decimal32 bdldfp::operator/ ( Decimal32  lhs,
long long  rhs 
)
Decimal32 bdldfp::operator/ ( Decimal32  lhs,
unsigned long long  rhs 
)

Divide the value of the specified lhs by the specified rhs as described by IEEE-754, and return the result.

  • If lhs is signaling NaN, then store the value of the macro EDOM into errno and return a NaN.
  • Otherwise if lhs is NaN then return a NaN.
  • Otherwise if lhs is infinity (positive or negative) and rhs is positive value then return infinity value with the same sign as its original value.
  • Otherwise if lhs is infinity (positive or negative) and rhs is negative value then return infinity value with the opposite sign as its original value.
  • Otherwise if rhs is zero, store the value of the macro ERANGE into errno and return infinity with the same sign it had prior to this operation.
  • Otherwise if dividing the value of lhs by the value of rhs results in an absolute value that is larger than std::numeric_limits<Decimal32>max() then store the value of the macro ERANGE into errno and return infinity with the same sign as that result.
  • Otherwise if dividing the value of lhs by the value of rhs results in an absolute value that is smaller than std::numeric_limits<Decimal32>min() then store the value of the macro ERANGE into errno and return zero with the same sign as that result.
  • Otherwise return the result of dividing the value of lhs by the value rhs.
Decimal32 bdldfp::operator/ ( int  lhs,
Decimal32  rhs 
)
Decimal32 bdldfp::operator/ ( unsigned int  lhs,
Decimal32  rhs 
)
Decimal32 bdldfp::operator/ ( long  lhs,
Decimal32  rhs 
)
Decimal32 bdldfp::operator/ ( unsigned long  lhs,
Decimal32  rhs 
)
Decimal32 bdldfp::operator/ ( long long  lhs,
Decimal32  rhs 
)
Decimal32 bdldfp::operator/ ( unsigned long long  lhs,
Decimal32  rhs 
)

Divide the specified lhs by the value of the specified rhs as described by IEEE-754, and return the result.

  • If rhs is signaling NaN, then store the value of the macro EDOM into errno and return a NaN.
  • Otherwise if rhs is NaN then return a NaN.
  • Otherwise if rhs is infinity (positive or negative), and lhs is zero, store the value of the macro ERANGE into errno and return a NaN.
  • Otherwise if rhs is zero (positive or negative), store the value of the macro ERANGE into errno and return infinity with the sign of lhs.
  • Otherwise if dividing the value of lhs by the value of rhs results in an absolute value that is larger than std::numeric_limits<Decimal32>max() then store the value of the macro ERANGE into errno and return infinity with the same sign as that result.
  • Otherwise if dividing the value of lhs by the value of rhs results in an absolute value that is smaller than std::numeric_limits<Decimal32>min() then store the value of the macro ERANGE into errno and return zero with the same sign as that result.
  • Otherwise return the result of dividing the value of lhs by the value rhs. Note that this is a floating-point operation, not integer.
bool bdldfp::operator== ( Decimal32  lhs,
Decimal32  rhs 
)

Return true if the specified lhs and rhs have the same value, and false otherwise. Two Decimal32 objects have the same value if the compareQuietEqual operation (IEEE-754 defined, non-total ordering comparison) considers the underlying IEEE representations equal. In other words, two Decimal32 objects have the same value if:

  • both have a zero value (positive or negative), or
  • both have the same infinity value (both positive or negative), or
  • both have the value of a real number that are equal, even if they are represented differently (cohorts have the same value)

This operation stores the value of the macro EDOM into errno if either or both operands are signaling NaN.

Note that a NaN is never equal to anything, including itself:

      Decimal32 aNaN = std::numeric_limits<Decimal32>::quiet_NaN();
      assert(!(aNan == aNan));
bool bdldfp::operator!= ( Decimal32  lhs,
Decimal32  rhs 
)

Return true if the specified lhs and rhs do not have the same value, and false otherwise. Two Decimal32 objects do not have the same value if the compareQuietEqual operation (IEEE-754 defined, non-total ordering comparison) considers the underlying IEEE representations not equal. In other words, two Decimal32 objects do not have the same value if:

  • both are NaN, or
  • one is zero (positive or negative) and the other is not, or
  • one is positive infinity and the other is not, or
  • one is negative infinity and the other is not, or
  • both have the value of a real number that are not equal, regardless of their representation (cohorts are equal)

This operation stores the value of the macro EDOM into errno if either or both operands are signaling NaN.

Note that a NaN is never equal to anything, including itself:

      Decimal32 aNaN = std::numeric_limits<Decimal32>::quiet_NaN();
      assert(aNan != aNan);
bool bdldfp::operator< ( Decimal32  lhs,
Decimal32  rhs 
)

Return true if the specified lhs has a value less than the specified rhs and false otherwise. The value of a Decimal32 object lhs is less than that of an object rhs if the compareQuietLess operation (IEEE-754 defined, non-total ordering comparison) considers the underlying IEEE representation of lhs to be less than of that of rhs. In other words, lhs is less than rhs if:

  • neither lhs nor rhs are NaN, or
  • lhs is zero (positive or negative) and rhs positive, or
  • rhs is zero (positive or negative) and lhs negative, or
  • lhs is not positive infinity, or
  • lhs is negative infinity and rhs is not, or
  • lhs and rhs both represent a real number and the real number of lhs is less than that of rhs

This operation stores the value of the macro EDOM into errno if either or both operands are signaling NaN.

bool bdldfp::operator<= ( Decimal32  lhs,
Decimal32  rhs 
)

Return true if the specified lhs has a value less than or equal the value of the specified rhs and false otherwise. The value of a Decimal32 object lhs is less than or equal to the value of an object rhs if the compareQuietLessEqual operation (IEEE-754 defined, non-total ordering comparison) considers the underlying IEEE representation of lhs to be less or equal to that of rhs. In other words, lhs is less or equal than rhs if:

  • neither lhs nor rhs are NaN, or
  • lhs and rhs are both zero (positive or negative), or
  • both lhs and rhs are positive infinity, or
  • lhs is negative infinity, or
  • lhs and rhs both represent a real number and the real number of lhs is less or equal to that of rhs

This operation stores the value of the macro EDOM into errno if either or both operands are signaling NaN.

bool bdldfp::operator> ( Decimal32  lhs,
Decimal32  rhs 
)

Return true if the specified lhs has a greater value than the specified rhs and false otherwise. The value of a Decimal32 object lhs is greater than that of an object rhs if the compareQuietGreater operation (IEEE-754 defined, non-total ordering comparison) considers the underlying IEEE representation of lhs to be greater than of that of rhs. In other words, lhs is greater than 'rhs'if:

  • neither lhs nor rhs are NaN, or
  • lhs and rhs are not both zero (positive or negative), or
  • lhs is not negative infinity, or
  • lhs is positive infinity and rhs is not, or
  • lhs and rhs both represent a real number and the real number of lhs is greater than that of rhs

This operation stores the value of the macro EDOM into errno if either or both operands are signaling NaN.

bool bdldfp::operator>= ( Decimal32  lhs,
Decimal32  rhs 
)

Return true if the specified lhs has a value greater than or equal to the value of the specified rhs and false otherwise. The value of a Decimal32 object lhs is greater or equal to a Decimal32 object rhs if the compareQuietGreaterEqual operation (IEEE-754 defined, non-total ordering comparison ) considers the underlying IEEE representation of lhs to be greater or equal to that of rhs. In other words, lhs is greater than or equal to rhs if:

  • neither lhs nor rhs are NaN, or
  • lhs and rhs are both zero (positive or negative), or
  • both lhs and rhs are negative infinity, or
  • lhs is positive infinity, or
  • lhs and rhs both represent a real number and the real number of lhs is greater or equal to that of rhs

This operation stores the value of the macro EDOM into errno if either or both operands are signaling NaN.

template<class CHARTYPE , class TRAITS >
bsl::basic_istream<CHARTYPE, TRAITS>& bdldfp::operator>> ( bsl::basic_istream< CHARTYPE, TRAITS > &  stream,
Decimal32 &  object 
)

Read, into the specified object, from the specified input stream an IEEE 32 bit decimal floating-point value as described in the IEEE-754 2008 standard (5.12 Details of conversions between floating point numbers and external character sequences) and return a reference providing modifiable access to stream. If stream contains a NaN value, it is unspecified if object will receive a quiet or signaling Nan. If stream is not valid on entry stream.good() == false, this operation has no effect other than setting stream.fail() to true. If eof (end-of-file) is found before any non-whitespace characters stream.fail() is set to true and object remains unchanged. If eof is detected after some characters have been read (and successfully interpreted as part of the textual representation of a floating-point value as specified by IEEE-754) then stream.eof() is set to true. If the first non-whitespace character sequence is not a valid textual representation of a floating-point value (e.g., 12e or e12 or 1*2) the stream.fail() is set to true and object will remain unchanged. If a real number value is represented by the character sequence but it is a large positive or negative value that cannot be stored into object then store the value of the macro ERANGE into errno and positive or negative infinity is stored into object, respectively. If a real number value is represented by the character sequence but it is a small positive or negative value that cannot be stored into object then store the value of the macro ERANGE into errno and positive or negative zero is stored into object, respectively. If a real number value is represented by the character sequence but it cannot be stored exactly into object, the value is rounded according to the current rounding direction (of the environment) and then stored into object.

NOTE: This method does not yet fully support iostream flags or the decimal floating point exception context.

template<class CHARTYPE , class TRAITS >
bsl::basic_ostream<CHARTYPE, TRAITS>& bdldfp::operator<< ( bsl::basic_ostream< CHARTYPE, TRAITS > &  stream,
Decimal32  object 
)

Write the value of the specified object to the specified output stream in a single line format as described in the IEEE-754 2008 standard (5.12 Details of conversions between floating point numbers and external character sequences), and return a reference providing modifiable access to stream. If stream is not valid on entry, this operation has no effect.

NOTE: This method does not yet fully support iostream flags or the decimal floating point exception context.

template<class HASHALG >
void bdldfp::hashAppend ( HASHALG &  hashAlg,
const Decimal32 &  object 
)

Pass the specified object to the specified hashAlg. This function integrates with the bslh modular hashing system and effectively provides a bsl::hash specialization for Decimal32. Note that two objects which have the same value but different representations will hash to the same value.

Decimal64 bdldfp::operator+ ( Decimal64  value  ) 

Return a copy of the specified value.

Decimal64 bdldfp::operator- ( Decimal64  value  ) 

Return the result of applying the unary - operator to the specified value as described by IEEE-754. Note that floating-point numbers have signed zero, therefore this operation is not the same as 0-value.

Decimal64 bdldfp::operator++ ( Decimal64 &  value,
int   
)

Apply the prefix ++ operator to the specified value and return its original value. Note that this is a floating-point value so this operations may not change the value of this object at all (if the value is large) or it may just set it to 1.0 (if the original value is small).

Decimal64 bdldfp::operator-- ( Decimal64 &  value,
int   
)

Apply the prefix -- operator to the specified value and return its original value. Note that this is a floating-point value so this operations may not change the value of this object at all (if the value is large) or it may just set it to -1.0 (if the original value is small).

Decimal64 bdldfp::operator+ ( Decimal64  lhs,
Decimal64  rhs 
)
Decimal64 bdldfp::operator+ ( Decimal32  lhs,
Decimal64  rhs 
)
Decimal64 bdldfp::operator+ ( Decimal64  lhs,
Decimal32  rhs 
)

Add the value of the specified rhs to the value of the specified lhs as described by IEEE-754 and return the result.

  • If either of lhs or rhs is signaling NaN, then store the value of the macro EDOM into errno and return a NaN.
  • Otherwise if either of lhs or rhs is NaN, return a NaN.
  • Otherwise if lhs and rhs are infinities of differing signs, store the value of the macro EDOM into errno and return a NaN.
  • Otherwise if lhs and rhs are infinities of the same sign then return infinity of that sign.
  • Otherwise if rhs is zero (positive or negative), return lhs.
  • Otherwise if the sum of lhs and rhs has an absolute value that is larger than std::numeric_limits<Decimal64>max() then store the value of the macro ERANGE into errno and set this object to infinity with the same sign as that result.
  • Otherwise return the sum of the number represented by lhs and the number represented by rhs.
Decimal64 bdldfp::operator+ ( Decimal64  lhs,
int  rhs 
)
Decimal64 bdldfp::operator+ ( Decimal64  lhs,
unsigned int  rhs 
)
Decimal64 bdldfp::operator+ ( Decimal64  lhs,
long  rhs 
)
Decimal64 bdldfp::operator+ ( Decimal64  lhs,
unsigned long  rhs 
)
Decimal64 bdldfp::operator+ ( Decimal64  lhs,
long long  rhs 
)
Decimal64 bdldfp::operator+ ( Decimal64  lhs,
unsigned long long  rhs 
)

Add the specified rhs to the value of the specified lhs as described by IEEE-754 and return the result.

  • If lhs is signaling NaN, then store the value of the macro EDOM into errno and return a NaN.
  • Otherwise if lhs object is NaN, then return a NaN.
  • Otherwise if lhs is infinity, then return infinity.
  • Otherwise if the sum of lhs and rhs has an absolute value that is larger than std::numeric_limits<Decimal64>max() then store the value of the macro ERANGE into errno and return infinity with the same sign as that result.
  • Otherwise return the sum of rhs and the number represented by lhs.
Decimal64 bdldfp::operator+ ( int  lhs,
Decimal64  rhs 
)
Decimal64 bdldfp::operator+ ( unsigned int  lhs,
Decimal64  rhs 
)
Decimal64 bdldfp::operator+ ( long  lhs,
Decimal64  rhs 
)
Decimal64 bdldfp::operator+ ( unsigned long  lhs,
Decimal64  rhs 
)
Decimal64 bdldfp::operator+ ( long long  lhs,
Decimal64  rhs 
)
Decimal64 bdldfp::operator+ ( unsigned long long  lhs,
Decimal64  rhs 
)

Add the specified lhs to the value of the specified rhs as described by IEEE-754 and return the result.

  • If rhs is signaling NaN, then store the value of the macro EDOM into errno and return a NaN.
  • Otherwise if rhs object is NaN, then return a NaN.
  • Otherwise if rhs is infinity, then return infinity.
  • Otherwise if the sum of lhs and rhs has an absolute value that is larger than std::numeric_limits<Decimal64>max() then store the value of the macro ERANGE into errno and return infinity with the same sign as that result.
  • Otherwise return the sum of lhs and the number represented by rhs.
Decimal64 bdldfp::operator- ( Decimal64  lhs,
Decimal64  rhs 
)
Decimal64 bdldfp::operator- ( Decimal32  lhs,
Decimal64  rhs 
)
Decimal64 bdldfp::operator- ( Decimal64  lhs,
Decimal32  rhs 
)

Subtract the value of the specified rhs from the value of the specified lhs as described by IEEE-754 and return the result.

  • If either of lhs or rhs is signaling NaN, then store the value of the macro EDOM into errno and return a NaN.
  • Otherwise if either of lhs or rhs is NaN, return a NaN.
  • Otherwise if lhs and the rhs have infinity values of the same sign, store the value of the macro EDOM into errno and return a NaN.
  • Otherwise if lhs and the rhs have infinity values of differing signs, then return lhs.
  • Otherwise if the subtracting of lhs and rhs has an absolute value that is larger than std::numeric_limits<Decimal64>max() then store the value of the macro ERANGE into errno and return infinity with the same sign as that result.
  • Otherwise return the result of subtracting the value of 'rhs'from the value of lhs.
Decimal64 bdldfp::operator- ( Decimal64  lhs,
int  rhs 
)
Decimal64 bdldfp::operator- ( Decimal64  lhs,
unsigned int  rhs 
)
Decimal64 bdldfp::operator- ( Decimal64  lhs,
long  rhs 
)
Decimal64 bdldfp::operator- ( Decimal64  lhs,
unsigned long  rhs 
)
Decimal64 bdldfp::operator- ( Decimal64  lhs,
long long  rhs 
)
Decimal64 bdldfp::operator- ( Decimal64  lhs,
unsigned long long  rhs 
)

Subtract the specified rhs from the value of the specified lhs as described by IEEE-754 and return a reference to this object.

  • If lhs is signaling NaN, then store the value of the macro EDOM into errno and return a NaN.
  • Otherwise if lhs is NaN, then return a NaN.
  • Otherwise if lhs is infinity, then return infinity.
  • Otherwise if subtracting rhs from lhs object's value results in an absolute value that is larger than std::numeric_limits<Decimal32>max() then store the value of the macro ERANGE into errno and return infinity with the same sign as that result.
  • Otherwise return the result of subtracting rhs from the value of lhs.
Decimal64 bdldfp::operator- ( int  lhs,
Decimal64  rhs 
)
Decimal64 bdldfp::operator- ( unsigned int  lhs,
Decimal64  rhs 
)
Decimal64 bdldfp::operator- ( long  lhs,
Decimal64  rhs 
)
Decimal64 bdldfp::operator- ( unsigned long  lhs,
Decimal64  rhs 
)
Decimal64 bdldfp::operator- ( long long  lhs,
Decimal64  rhs 
)
Decimal64 bdldfp::operator- ( unsigned long long  lhs,
Decimal64  rhs 
)

Subtract the specified rhs from the value of the specified lhs as described by IEEE-754 and return a reference to this object.

  • If rhs is signaling NaN, then store the value of the macro EDOM into errno and return a NaN.
  • Otherwise if rhs is NaN, then return a NaN.
  • Otherwise if rhs is infinity, then return infinity.
  • Otherwise if subtracting rhs from lhs object's value results in an absolute value that is larger than std::numeric_limits<Decimal64>max() then store the value of the macro ERANGE into errno and return infinity with the same sign as that result.
  • Otherwise return the result of subtracting the value of rhs from the number lhs.
Decimal64 bdldfp::operator* ( Decimal64  lhs,
Decimal64  rhs 
)
Decimal64 bdldfp::operator* ( Decimal32  lhs,
Decimal64  rhs 
)
Decimal64 bdldfp::operator* ( Decimal64  lhs,
Decimal32  rhs 
)

Multiply the value of the specified lhs object by the value of the specified rhs as described by IEEE-754 and return the result.

  • If either of lhs or rhs is signaling NaN, then store the value of the macro EDOM into errno and return a NaN.
  • Otherwise if either of lhs or rhs is NaN, return a NaN.
  • Otherwise if one of the operands is infinity (positive or negative) and the other is zero (positive or negative), then store the value of the macro EDOM into errno and return a NaN.
  • Otherwise if both lhs and rhs are infinity (positive or negative), return infinity. The sign of the returned value will be positive if lhs and rhs have the same sign, and negative otherwise.
  • Otherwise, if either lhs or rhs is zero, return zero. The sign of the returned value will be positive if lhs and rhs have the same sign, and negative otherwise.
  • Otherwise if the product of lhs and rhs has an absolute value that is larger than std::numeric_limits<Decimal64>max() then store the value of the macro ERANGE into errno and return an infinity with the same sign as that result.
  • Otherwise if the product of lhs and rhs has an absolute value that is smaller than std::numeric_limits<Decimal64>min() then store the value of the macro ERANGE into errno and return zero with the same sign as that result.
  • Otherwise return the product of the value of rhs and the number represented by rhs.
Decimal64 bdldfp::operator* ( Decimal64  lhs,
int  rhs 
)
Decimal64 bdldfp::operator* ( Decimal64  lhs,
unsigned int  rhs 
)
Decimal64 bdldfp::operator* ( Decimal64  lhs,
long  rhs 
)
Decimal64 bdldfp::operator* ( Decimal64  lhs,
unsigned long  rhs 
)
Decimal64 bdldfp::operator* ( Decimal64  lhs,
long long  rhs 
)
Decimal64 bdldfp::operator* ( Decimal64  lhs,
unsigned long long  rhs 
)

Multiply the specified rhs by the value of the specified lhs as described by IEEE-754, and return the result.

  • If lhs is signaling NaN, then store the value of the macro EDOM into errno and return a NaN.
  • Otherwise if lhs is NaN, then return a NaN.
  • Otherwise if lhs is infinity (positive or negative), and rhs is zero, then store the value of the macro EDOM into'errno' and return a NaN.
  • Otherwise if lhs is infinity (positive or negative), then return lhs.
  • Otherwise if rhs is zero, then return zero with the sign of lhs.
  • Otherwise if the product of rhs and the value of lhs results in an absolute value that is larger than std::numeric_limits<Decimal64>max() then store the value of the macro ERANGE into errno and return infinity with the same sign as that result.
  • Otherwise if the product of rhs and the value of lhs results in an absolute value that is smaller than std::numeric_limits<Decimal64>min() then store the value of the macro ERANGE into errno and return zero with the same sign as that result.
  • Otherwise return the product of the value of lhs and value rhs.
Decimal64 bdldfp::operator* ( int  lhs,
Decimal64  rhs 
)
Decimal64 bdldfp::operator* ( unsigned int  lhs,
Decimal64  rhs 
)
Decimal64 bdldfp::operator* ( long  lhs,
Decimal64  rhs 
)
Decimal64 bdldfp::operator* ( unsigned long  lhs,
Decimal64  rhs 
)
Decimal64 bdldfp::operator* ( long long  lhs,
Decimal64  rhs 
)
Decimal64 bdldfp::operator* ( unsigned long long  lhs,
Decimal64  rhs 
)

Multiply the specified lhs by the value of the specified rhs as described by IEEE-754, and return the result.

  • If rhs is signaling NaN, then store the value of the macro EDOM into errno and return a NaN.
  • Otherwise if rhs is NaN, then return a NaN.
  • Otherwise if rhs is infinity (positive or negative), and lhs is zero, then store the value of the macro EDOM into'errno' and return a NaN.
  • Otherwise if rhs is infinity (positive or negative), then return rhs.
  • Otherwise if lhs is zero, then return zero with the sign of rhs.
  • Otherwise if the product of lhs and the value of rhs results in an absolute value that is larger than std::numeric_limits<Decimal64>max() then store the value of the macro ERANGE into errno and return infinity with the same sign as that result.
  • Otherwise if the product of lhs and the value of rhs results in an absolute value that is smaller than std::numeric_limits<Decimal64>min() then store the value of the macro ERANGE into errno and return zero with the same sign as that result.
  • Otherwise return the product of the value of lhs and value rhs.
Decimal64 bdldfp::operator/ ( Decimal64  lhs,
Decimal64  rhs 
)
Decimal64 bdldfp::operator/ ( Decimal32  lhs,
Decimal64  rhs 
)
Decimal64 bdldfp::operator/ ( Decimal64  lhs,
Decimal32  rhs 
)

Divide the value of the specified lhs by the value of the specified rhs as described by IEEE-754, and return the result.

  • If either of lhs or rhs is signaling NaN, then store the value of the macro EDOM into errno and return a NaN.
  • Otherwise if either of lhs or rhs is NaN, return a NaN.
  • Otherwise if lhs and rhs are both infinity (positive or negative) or both zero (positive or negative) then store the value of the macro EDOM into errno and return a NaN.
  • Otherwise if lhs has a normal value and rhs has a positive zero value, store the value of the macro ERANGE into errno and return infinity with the sign of lhs.
  • Otherwise if lhs has a normal value and rhs has a negative zero value, store the value of the macro ERANGE into errno and return infinity with the opposite sign as lhs.
  • Otherwise if lhs has infinity value and rhs has a positive zero value, return infinity with the sign of lhs.
  • Otherwise if lhs has infinity value and rhs has a negative zero value, return infinity with the opposite sign as lhs.
  • Otherwise if dividing the value of lhs by the value of rhs results in an absolute value that is larger than std::numeric_limits<Decimal64>max() then store the value of the macro ERANGE into errno and return infinity with the same sign as that result.
  • Otherwise if dividing the value of lhs by the value of rhs results in an absolute value that is smaller than std::numeric_limits<Decimal64>min() then store the value of the macro ERANGE into errno and return zero with the same sign as that result.
  • Otherwise return the result of dividing the value of lhs by the value of rhs.
Decimal64 bdldfp::operator/ ( Decimal64  lhs,
int  rhs 
)
Decimal64 bdldfp::operator/ ( Decimal64  lhs,
unsigned int  rhs 
)
Decimal64 bdldfp::operator/ ( Decimal64  lhs,
long  rhs 
)
Decimal64 bdldfp::operator/ ( Decimal64  lhs,
unsigned long  rhs 
)
Decimal64 bdldfp::operator/ ( Decimal64  lhs,
long long  rhs 
)
Decimal64 bdldfp::operator/ ( Decimal64  lhs,
unsigned long long  rhs 
)

Divide the value of the specified lhs by the specified rhs as described by IEEE-754, and return the result.

  • If lhs is signaling NaN, then store the value of the macro EDOM into errno and return a NaN.
  • Otherwise if lhs is NaN then return a NaN.
  • Otherwise if lhs is infinity (positive or negative) and rhs is positive value then return infinity value with the same sign as its original value.
  • Otherwise if lhs is infinity (positive or negative) and rhs is negative value then return infinity value with the opposite sign as its original value.
  • Otherwise if rhs is zero, store the value of the macro ERANGE into errno and return infinity with the same sign it had prior to this operation.
  • Otherwise if dividing the value of lhs by the value of rhs results in an absolute value that is larger than std::numeric_limits<Decimal64>max() then store the value of the macro ERANGE into errno and return infinity with the same sign as that result.
  • Otherwise if dividing the value of lhs by the value of rhs results in an absolute value that is smaller than std::numeric_limits<Decimal64>min() then store the value of the macro ERANGE into errno and return zero with the same sign as that result.
  • Otherwise return the result of dividing the value of lhs by the value rhs.
Decimal64 bdldfp::operator/ ( int  lhs,
Decimal64  rhs 
)
Decimal64 bdldfp::operator/ ( unsigned int  lhs,
Decimal64  rhs 
)
Decimal64 bdldfp::operator/ ( long  lhs,
Decimal64  rhs 
)
Decimal64 bdldfp::operator/ ( unsigned long  lhs,
Decimal64  rhs 
)
Decimal64 bdldfp::operator/ ( long long  lhs,
Decimal64  rhs 
)
Decimal64 bdldfp::operator/ ( unsigned long long  lhs,
Decimal64  rhs 
)

Divide the specified lhs by the value of the specified rhs as described by IEEE-754, and return the result.

  • If rhs is signaling NaN, then store the value of the macro EDOM into errno and return a NaN.
  • Otherwise if rhs is NaN then return a NaN.
  • Otherwise if rhs is infinity (positive or negative), and lhs is zero, store the value of the macro ERANGE into errno and return a NaN.
  • Otherwise if rhs is zero (positive or negative), store the value of the macro ERANGE into errno and return infinity with the sign of lhs.
  • Otherwise if dividing the value of lhs by the value of rhs results in an absolute value that is larger than std::numeric_limits<Decimal64>max() then store the value of the macro ERANGE into errno and return infinity with the same sign as that result.
  • Otherwise if dividing the value of lhs by the value of rhs results in an absolute value that is smaller than std::numeric_limits<Decimal64>min() then store the value of the macro ERANGE into errno and return zero with the same sign as that result.
  • Otherwise return the result of dividing the value of lhs by the value of rhs. Note that this is a floating-point operation, not integer.
bool bdldfp::operator== ( Decimal64  lhs,
Decimal64  rhs 
)

Return true if the specified lhs and rhs have the same value, and false otherwise. Two Decimal64 objects have the same value if the compareQuietEqual operation (IEEE-754 defined, non-total ordering comparison) considers the underlying IEEE representations equal. In other words, two Decimal64 objects have the same value if:

  • both have a zero value (positive or negative), or
  • both have the same infinity value (both positive or negative), or
  • both have the value of a real number that are equal, even if they are represented differently (cohorts have the same value)

This operation stores the value of the macro EDOM into errno if either or both operands are signaling NaN.

Note that a NaN is never equal to anything, including itself:

      Decimal64 aNaN = std::numeric_limits<Decimal64>::quiet_NaN();
      assert(!(aNan == aNan));
bool bdldfp::operator== ( Decimal32  lhs,
Decimal64  rhs 
)
bool bdldfp::operator== ( Decimal64  lhs,
Decimal32  rhs 
)

Return true if the specified lhs and rhs have the same value, and false otherwise. Two decimal objects have the same value if the compareQuietEqual operation (IEEE-754 defined, non-total ordering comparison) considers the underlying IEEE representations equal. In other words, two decimal objects have the same value if:

  • both have a zero value (positive or negative), or
  • both have the same infinity value (both positive or negative), or
  • both have the value of a real number that are equal, even if they are represented differently (cohorts have the same value)

This operation stores the value of the macro EDOM into errno if either or both operands are signaling NaN.

bool bdldfp::operator!= ( Decimal64  lhs,
Decimal64  rhs 
)

Return true if the specified lhs and rhs do not have the same value, and false otherwise. Two Decimal64 objects do not have the same value if the compareQuietEqual operation (IEEE-754 defined, non-total ordering comparison) considers the underlying IEEE representations not equal. In other words, two Decimal64 objects do not have the same value if:

  • both are a NaN, or
  • one has zero value (positive or negative) and the other does not, or
  • one has the value of positive infinity and the other does not, or
  • one has the value of negative infinity and the other does not, or
  • both have the value of a real number that are not equal, regardless of their representation (cohorts are equal)

This operation stores the value of the macro EDOM into errno if either or both operands are signaling NaN.

Note that a NaN is never equal to anything, including itself:

      Decimal64 aNaN = std::numeric_limits<Decimal64>::quiet_NaN();
      assert(aNan != aNan);
bool bdldfp::operator!= ( Decimal32  lhs,
Decimal64  rhs 
)
bool bdldfp::operator!= ( Decimal64  lhs,
Decimal32  rhs 
)

Return true if the specified lhs and rhs do not have the same value, and false otherwise. Two decimal objects do not have the same value if the compareQuietEqual operation (IEEE-754 defined, non-total ordering comparison) considers the underlying IEEE representations not equal. In other words, two decimal objects do not have the same value if:

  • both are NaN, or
  • one has zero value (positive or negative) and the other does not, or
  • one has the value of positive infinity and the other does not, or
  • one has the value of negative infinity and the other does not, or
  • both have the value of a real number that are not equal, regardless of their representation (cohorts are equal)

This operation stores the value of the macro EDOM into errno if either or both operands are signaling NaN.

bool bdldfp::operator< ( Decimal64  lhs,
Decimal64  rhs 
)

Return true if the specified lhs has a value less than the specified rhs and false otherwise. The value of a Decimal64 object lhs is less than that of an object rhs if the compareQuietLess operation (IEEE-754 defined, non-total ordering comparison) considers the underlying IEEE representation of lhs to be less than of that of rhs. In other words, lhs is less than rhs if:

  • neither lhs nor rhs are NaN, or
  • lhs is zero (positive or negative) and rhs is positive, or
  • rhs is zero (positive or negative) and lhs negative, or
  • lhs is not positive infinity, or
  • lhs is negative infinity and rhs is not, or
  • lhs and rhs both represent a real number and the real number of lhs is less than that of rhs

This operation stores the value of the macro EDOM into errno if either or both operands are signaling NaN.

bool bdldfp::operator< ( Decimal32  lhs,
Decimal64  rhs 
)
bool bdldfp::operator< ( Decimal64  lhs,
Decimal32  rhs 
)

Return true if the specified lhs has a value less than the specified rhs and false otherwise. The value of a decimal object lhs is less than that of an object rhs if the compareQuietLess operation (IEEE-754 defined, non-total ordering comparison) considers the underlying IEEE representation of lhs to be less than of that of rhs. In other words, lhs is less than rhs if:

  • neither lhs nor rhs are NaN, or
  • lhs is zero (positive or negative) and rhs is positive, or
  • rhs is zero (positive or negative) and lhs negative, or
  • lhs is not positive infinity, or
  • lhs is negative infinity and rhs is not, or
  • lhs and rhs both represent a real number and the real number of lhs is less than that of rhs

This operation stores the value of the macro EDOM into errno if either or both operands are signaling NaN.

bool bdldfp::operator<= ( Decimal64  lhs,
Decimal64  rhs 
)

Return true if the specified lhs has a value less than or equal the value of the specified rhs and false otherwise. The value of a Decimal64 object lhs is less than or equal to the value of an object rhs if the compareQuietLessEqual operation (IEEE-754 defined, non-total ordering comparison) considers the underlying IEEE representation of lhs to be less or equal to that of rhs. In other words, lhs is less or equal than rhs if:

  • neither lhs nor rhs are NaN, or
  • lhs and rhs are both zero (positive or negative), or
  • both lhs and rhs are positive infinity, or
  • lhs is negative infinity, or
  • lhs and rhs both represent a real number and the real number of lhs is less or equal to that of rhs

This operation stores the value of the macro EDOM into errno if either or both operands are signaling NaN.

bool bdldfp::operator<= ( Decimal32  lhs,
Decimal64  rhs 
)
bool bdldfp::operator<= ( Decimal64  lhs,
Decimal32  rhs 
)

Return true if the specified lhs has a value less than or equal the value of the specified rhs and false otherwise. The value of a decimal object lhs is less than or equal to the value of an object rhs if the compareQuietLessEqual operation (IEEE-754 defined, non-total ordering comparison) considers the underlying IEEE representation of lhs to be less or equal to that of rhs. In other words, lhs is less or equal than rhs if:

  • neither lhs nor rhs are NaN, or
  • lhs and rhs are both zero (positive or negative), or
  • both lhs and rhs are positive infinity, or
  • lhs is negative infinity, or
  • lhs and rhs both represent a real number and the real number of lhs is less or equal to that of rhs

This operation stores the value of the macro EDOM into errno if either or both operands are signaling NaN.

bool bdldfp::operator> ( Decimal64  lhs,
Decimal64  rhs 
)

Return true if the specified lhs has a greater value than the specified rhs and false otherwise. The value of a Decimal64 object lhs is greater than that of an object rhs if the compareQuietGreater operation (IEEE-754 defined, non-total ordering comparison) considers the underlying IEEE representation of lhs to be greater than of that of rhs. In other words, lhs is greater than rhs if:

  • neither lhs nor rhs are NaN, or
  • rhs is zero (positive or negative) and lhs positive, or
  • lhs is zero (positive or negative) and rhs negative, or
  • lhs is not negative infinity, or
  • lhs is positive infinity and rhs is not, or
  • lhs and rhs both represent a real number and the real number of lhs is greater than that of rhs

This operation stores the value of the macro EDOM into errno if either or both operands are signaling NaN.

bool bdldfp::operator> ( Decimal32  lhs,
Decimal64  rhs 
)
bool bdldfp::operator> ( Decimal64  lhs,
Decimal32  rhs 
)

Return true if the specified lhs has a greater value than the specified rhs and false otherwise. The value of a decimal object lhs is greater than that of an object rhs if the compareQuietGreater operation (IEEE-754 defined, non-total ordering comparison) considers the underlying IEEE representation of lhs to be greater than of that of rhs. In other words, lhs is greater than rhs if:

  • neither lhs nor rhs are NaN, or
  • rhs is zero (positive or negative) and lhs positive, or
  • lhs is zero (positive or negative) and rhs negative, or
  • lhs is not negative infinity, or
  • lhs is positive infinity and rhs is not, or
  • lhs and rhs both represent a real number and the real number of lhs is greater than that of rhs

This operation stores the value of the macro EDOM into errno if either or both operands are signaling NaN.

bool bdldfp::operator>= ( Decimal64  lhs,
Decimal64  rhs 
)

Return true if the specified lhs has a value greater than or equal to the value of the specified rhs and false otherwise. The value of a Decimal64 object lhs is greater or equal to a Decimal64 object rhs if the compareQuietGreaterEqual operation (IEEE-754 defined, non-total ordering comparison ) considers the underlying IEEE representation of lhs to be greater or equal to that of rhs. In other words, lhs is greater than or equal to rhs if:

  • neither lhs nor rhs are NaN, or
  • lhs and rhs are both zero (positive or negative), or
  • both lhs and rhs are negative infinity, or
  • lhs is positive infinity, or
  • lhs and rhs both represent a real number and the real number of lhs is greater or equal to that of rhs

This operation stores the value of the macro EDOM into errno if either or both operands are signaling NaN.

bool bdldfp::operator>= ( Decimal32  lhs,
Decimal64  rhs 
)
bool bdldfp::operator>= ( Decimal64  lhs,
Decimal32  rhs 
)

Return true if the specified lhs has a value greater than or equal to the value of the specified rhs and false otherwise. The value of a decimal object lhs is greater or equal to a decimal object rhs if the compareQuietGreaterEqual operation (IEEE-754 defined, non-total ordering comparison ) considers the underlying IEEE representation of lhs to be greater or equal to that of rhs. In other words, lhs is greater than or equal to rhs if:

  • neither lhs nor rhs are NaN, or
  • lhs and rhs are both zero (positive or negative), or
  • both lhs and rhs are negative infinity, or
  • lhs is positive infinity, or
  • lhs and rhs both represent a real number and the real number of lhs is greater or equal to that of rhs

This operation stores the value of the macro EDOM into errno if either or both operands are signaling NaN.

template<class CHARTYPE , class TRAITS >
bsl::basic_istream<CHARTYPE, TRAITS>& bdldfp::operator>> ( bsl::basic_istream< CHARTYPE, TRAITS > &  stream,
Decimal64 &  object 
)

Read, into the specified object, from the specified input stream an IEEE 64 bit decimal floating-point value as described in the IEEE-754 2008 standard (5.12 Details of conversions between floating point numbers and external character sequences) and return a reference providing modifiable access to stream. If stream contains a Nan value, it is unspecified if object will receive a quiet or signaling Nan. If stream is not valid on entry stream.good() == false, this operation has no effect other than setting stream.fail() to true. If eof (end-of-file) is found before any non-whitespace characters stream.fail() is set to true and object remains unchanged. If eof is detected after some characters have been read (and successfully interpreted as part of the textual representation of a floating-point value as specified by IEEE-754) then stream.eof() is set to true. If the first non-whitespace character sequence is not a valid textual representation of a floating-point value (e.g., 12e or e12 or 1*2) the stream.fail() is set to true and object will remain unchanged. If a real number value is represented by the character sequence but it is a large positive or negative value that cannot be stored into object then store the value of the macro ERANGE into errno and positive or negative infinity is stored into object, respectively. If a real number value is represented by the character sequence but it is a small positive or negative value that cannot be stored into object then store the value of the macro ERANGE into errno and positive or negative zero is stored into object, respectively. If a real number value is represented by the character sequence but it cannot be stored exactly into object, the value is rounded according to the current rounding direction (of the environment) and then stored into object.

NOTE: This method does not yet fully support iostream flags or the decimal floating point exception context.

template<class CHARTYPE , class TRAITS >
bsl::basic_ostream<CHARTYPE, TRAITS>& bdldfp::operator<< ( bsl::basic_ostream< CHARTYPE, TRAITS > &  stream,
Decimal64  object 
)

Write the value of the specified object to the specified output stream in a single line format as described in the IEEE-754 2008 standard (5.12 Details of conversions between floating point numbers and external character sequences), and return a reference providing modifiable access to stream. If stream is not valid on entry, this operation has no effect.

NOTE: This method does not yet fully support iostream flags or the decimal floating point exception context.

template<class HASHALG >
void bdldfp::hashAppend ( HASHALG &  hashAlg,
const Decimal64 &  object 
)

Pass the specified object to the specified hashAlg. This function integrates with the bslh modular hashing system and effectively provides a bsl::hash specialization for Decimal64. Note that two objects which have the same value but different representations will hash to the same value.

Decimal128 bdldfp::operator+ ( Decimal128  value  ) 

Return a copy of the specified value if the value is not negative zero, and return positive zero otherwise.

Decimal128 bdldfp::operator- ( Decimal128  value  ) 

Return the result of applying the unary - operator to the specified value as described by IEEE-754. Note that floating-point numbers have signed zero, therefore this operation is not the same as 0-value.

Decimal128 bdldfp::operator++ ( Decimal128 &  value,
int   
)

Apply the prefix ++ operator to the specified value and return its original value. Note that this is a floating-point value so this operations may not change the value of this object at all (if the value is large) or it may just set it to 1.0 (if the original value is small).

Decimal128 bdldfp::operator-- ( Decimal128 &  value,
int   
)

Apply the prefix -- operator to the specified value and return its original value. Note that this is a floating-point value so this operations may not change the value of this object at all (if the value is large) or it may just set it to -1.0 (if the original value is small).

Decimal128 bdldfp::operator+ ( Decimal128  lhs,
Decimal128  rhs 
)
Decimal128 bdldfp::operator+ ( Decimal32  lhs,
Decimal128  rhs 
)
Decimal128 bdldfp::operator+ ( Decimal128  lhs,
Decimal32  rhs 
)
Decimal128 bdldfp::operator+ ( Decimal64  lhs,
Decimal128  rhs 
)
Decimal128 bdldfp::operator+ ( Decimal128  lhs,
Decimal64  rhs 
)

Add the value of the specified rhs to the value of the specified lhs as described by IEEE-754 and return the result.

  • If either of lhs or rhs is signaling NaN, then store the value of the macro EDOM into errno and return a NaN.
  • Otherwise if either of lhs or rhs is NaN, return a NaN.
  • Otherwise if lhs and rhs are infinities of differing signs, store the value of the macro EDOM into errno and return a NaN.
  • Otherwise if lhs and rhs are infinities of the same sign then return infinity of that sign.
  • Otherwise if rhs is zero (positive or negative), return lhs.
  • Otherwise if the sum of lhs and rhs has an absolute value that is larger than std::numeric_limits<Decimal128>max() then store the value of the macro ERANGE into errno and set this object to infinity with the same sign as that result.
  • Otherwise return the sum of the number represented by lhs and the number represented by rhs.
Decimal128 bdldfp::operator+ ( Decimal128  lhs,
int  rhs 
)
Decimal128 bdldfp::operator+ ( Decimal128  lhs,
unsigned int  rhs 
)
Decimal128 bdldfp::operator+ ( Decimal128  lhs,
long  rhs 
)
Decimal128 bdldfp::operator+ ( Decimal128  lhs,
unsigned long  rhs 
)
Decimal128 bdldfp::operator+ ( Decimal128  lhs,
long long  rhs 
)
Decimal128 bdldfp::operator+ ( Decimal128  lhs,
unsigned long long  rhs 
)

Add the specified rhs to the value of the specified lhs as described by IEEE-754 and return the result.

  • If lhs is signaling NaN, then store the value of the macro EDOM into errno and return a NaN.
  • Otherwise if lhs object is NaN, then return a NaN.
  • Otherwise if lhs is infinity, then return infinity.
  • Otherwise if the sum of lhs and rhs has an absolute value that is larger than std::numeric_limits<Decimal128>max() then store the value of the macro ERANGE into errno and return infinity with the same sign as that result.
  • Otherwise return the sum of rhs and the number represented by lhs.
Decimal128 bdldfp::operator+ ( int  lhs,
Decimal128  rhs 
)
Decimal128 bdldfp::operator+ ( unsigned int  lhs,
Decimal128  rhs 
)
Decimal128 bdldfp::operator+ ( long  lhs,
Decimal128  rhs 
)
Decimal128 bdldfp::operator+ ( unsigned long  lhs,
Decimal128  rhs 
)
Decimal128 bdldfp::operator+ ( long long  lhs,
Decimal128  rhs 
)
Decimal128 bdldfp::operator+ ( unsigned long long  lhs,
Decimal128  rhs 
)

Add the specified lhs to the value of the specified rhs as described by IEEE-754 and return the result.

  • If rhs is signaling NaN, then store the value of the macro EDOM into errno and return a NaN.
  • Otherwise if rhs object is NaN, then return a NaN.
  • Otherwise if rhs is infinity, then return infinity.
  • Otherwise if the sum of lhs and rhs has an absolute value that is larger than std::numeric_limits<Decimal128>max() then store the value of the macro ERANGE into errno and return infinity with the same sign as that result.
  • Otherwise return the sum of lhs and the number represented by rhs.
Decimal128 bdldfp::operator- ( Decimal128  lhs,
Decimal128  rhs 
)
Decimal128 bdldfp::operator- ( Decimal32  lhs,
Decimal128  rhs 
)
Decimal128 bdldfp::operator- ( Decimal128  lhs,
Decimal32  rhs 
)
Decimal128 bdldfp::operator- ( Decimal64  lhs,
Decimal128  rhs 
)
Decimal128 bdldfp::operator- ( Decimal128  lhs,
Decimal64  rhs 
)

Subtract the value of the specified rhs from the value of the specified lhs as described by IEEE-754 and return the result.

  • If either of lhs or rhs is signaling NaN, then store the value of the macro EDOM into errno and return a NaN.
  • Otherwise if either of lhs or rhs is NaN, return a NaN.
  • Otherwise if lhs and the rhs have infinity values of the same sign, store the value of the macro EDOM into errno and return a NaN.
  • Otherwise if lhs and the rhs have infinity values of differing signs, then return lhs.
  • Otherwise if the subtracting of lhs and rhs has an absolute value that is larger than std::numeric_limits<Decimal128>max() then store the value of the macro ERANGE into errno and return infinity with the same sign as that result.
  • Otherwise return the result of subtracting the value of 'rhs'from the value of lhs.
Decimal128 bdldfp::operator- ( Decimal128  lhs,
int  rhs 
)
Decimal128 bdldfp::operator- ( Decimal128  lhs,
unsigned int  rhs 
)
Decimal128 bdldfp::operator- ( Decimal128  lhs,
long  rhs 
)
Decimal128 bdldfp::operator- ( Decimal128  lhs,
unsigned long  rhs 
)
Decimal128 bdldfp::operator- ( Decimal128  lhs,
long long  rhs 
)
Decimal128 bdldfp::operator- ( Decimal128  lhs,
unsigned long long  rhs 
)

Subtract the specified rhs from the value of the specified lhs as described by IEEE-754 and return a reference to this object.

  • If lhs is signaling NaN, then store the value of the macro EDOM into errno and return a NaN.
  • Otherwise if lhs is NaN, then return a NaN.
  • Otherwise if lhs is infinity, then return infinity.
  • Otherwise if subtracting rhs from lhs object's value results in an absolute value that is larger than std::numeric_limits<Decimal128>max() then store the value of the macro ERANGE into errno and return infinity with the same sign as that result.
  • Otherwise return the result of subtracting rhs from the value of lhs.
Decimal128 bdldfp::operator- ( int  lhs,
Decimal128  rhs 
)
Decimal128 bdldfp::operator- ( unsigned int  lhs,
Decimal128  rhs 
)
Decimal128 bdldfp::operator- ( long  lhs,
Decimal128  rhs 
)
Decimal128 bdldfp::operator- ( unsigned long  lhs,
Decimal128  rhs 
)
Decimal128 bdldfp::operator- ( long long  lhs,
Decimal128  rhs 
)
Decimal128 bdldfp::operator- ( unsigned long long  lhs,
Decimal128  rhs 
)

Subtract the specified rhs from the value of the specified lhs as described by IEEE-754 and return a reference to this object.

  • If rhs is signaling NaN, then store the value of the macro EDOM into errno and return a NaN.
  • Otherwise if rhs is NaN, then return a NaN.
  • Otherwise if rhs is infinity, then return infinity.
  • Otherwise if subtracting rhs from lhs object's value results in an absolute value that is larger than std::numeric_limits<Decimal128>max() then store the value of the macro ERANGE into errno and return infinity with the same sign as that result.
  • Otherwise return the result of subtracting the value of rhs from the number lhs.
Decimal128 bdldfp::operator* ( Decimal128  lhs,
Decimal128  rhs 
)
Decimal128 bdldfp::operator* ( Decimal32  lhs,
Decimal128  rhs 
)
Decimal128 bdldfp::operator* ( Decimal128  lhs,
Decimal32  rhs 
)
Decimal128 bdldfp::operator* ( Decimal64  lhs,
Decimal128  rhs 
)
Decimal128 bdldfp::operator* ( Decimal128  lhs,
Decimal64  rhs 
)

Multiply the value of the specified lhs object by the value of the specified rhs as described by IEEE-754 and return the result.

  • If either of lhs or rhs is signaling NaN, then store the value of the macro EDOM into errno and return a NaN.
  • Otherwise if either of lhs or rhs is NaN, return a NaN.
  • Otherwise if one of the operands is infinity (positive or negative) and the other is zero (positive or negative), then store the value of the macro EDOM into errno and return a NaN.
  • Otherwise if both lhs and rhs are infinity (positive or negative), return infinity. The sign of the returned value will be positive if lhs and rhs have the same sign, and negative otherwise.
  • Otherwise, if either lhs or rhs is zero, return zero. The sign of the returned value will be positive if lhs and rhs have the same sign, and negative otherwise.
  • Otherwise if the product of lhs and rhs has an absolute value that is larger than std::numeric_limits<Decimal128>max() then store the value of the macro ERANGE into errno and return an infinity with the same sign as that result.
  • Otherwise if the product of lhs and rhs has an absolute value that is smaller than std::numeric_limits<Decimal128>min() then store the value of the macro ERANGE into errno and return zero with the same sign as that result.
  • Otherwise return the product of the value of rhs and the number represented by rhs.
Decimal128 bdldfp::operator* ( Decimal128  lhs,
int  rhs 
)
Decimal128 bdldfp::operator* ( Decimal128  lhs,
unsigned int  rhs 
)
Decimal128 bdldfp::operator* ( Decimal128  lhs,
long  rhs 
)
Decimal128 bdldfp::operator* ( Decimal128  lhs,
unsigned long  rhs 
)
Decimal128 bdldfp::operator* ( Decimal128  lhs,
long long  rhs 
)
Decimal128 bdldfp::operator* ( Decimal128  lhs,
unsigned long long  rhs 
)

Multiply the specified rhs by the value of the specified lhs as described by IEEE-754, and return the result.

  • If lhs is signaling NaN, then store the value of the macro EDOM into errno and return a NaN.
  • Otherwise if lhs is NaN, then return a NaN.
  • Otherwise if lhs is infinity (positive or negative), and rhs is zero, then store the value of the macro EDOM into'errno' and return a NaN.
  • Otherwise if lhs is infinity (positive or negative), then return lhs.
  • Otherwise if rhs is zero, then return zero with the sign of lhs.
  • Otherwise if the product of rhs and the value of lhs results in an absolute value that is larger than std::numeric_limits<Decimal128>max() then store the value of the macro ERANGE into errno and return infinity with the same sign as that result.
  • Otherwise if the product of rhs and the value of lhs results in an absolute value that is smaller than std::numeric_limits<Decimal128>min() then store the value of the macro ERANGE into errno and return zero with the same sign as that result.
  • Otherwise return the product of the value of lhs and value rhs.
Decimal128 bdldfp::operator* ( int  lhs,
Decimal128  rhs 
)
Decimal128 bdldfp::operator* ( unsigned int  lhs,
Decimal128  rhs 
)
Decimal128 bdldfp::operator* ( long  lhs,
Decimal128  rhs 
)
Decimal128 bdldfp::operator* ( unsigned long  lhs,
Decimal128  rhs 
)
Decimal128 bdldfp::operator* ( long long  lhs,
Decimal128  rhs 
)
Decimal128 bdldfp::operator* ( unsigned long long  lhs,
Decimal128  rhs 
)

Multiply the specified lhs by the value of the specified rhs as described by IEEE-754, and return the result.

  • If rhs is signaling NaN, then store the value of the macro EDOM into errno and return a NaN.
  • Otherwise if rhs is NaN, then return a NaN.
  • Otherwise if rhs is infinity (positive or negative), and lhs is zero, then store the value of the macro EDOM into'errno' and return a NaN.
  • Otherwise if rhs is infinity (positive or negative), then return rhs.
  • Otherwise if lhs is zero, then return zero with the sign of rhs.
  • Otherwise if the product of lhs and the value of rhs results in an absolute value that is larger than std::numeric_limits<Decimal128>max() then store the value of the macro ERANGE into errno and return infinity with the same sign as that result.
  • Otherwise if the product of lhs and the value of rhs results in an absolute value that is smaller than std::numeric_limits<Decimal128>min() then store the value of the macro ERANGE into errno and return zero with the same sign as that result.
  • Otherwise return the product of the value of lhs and value rhs.
Decimal128 bdldfp::operator/ ( Decimal128  lhs,
Decimal128  rhs 
)
Decimal128 bdldfp::operator/ ( Decimal32  lhs,
Decimal128  rhs 
)
Decimal128 bdldfp::operator/ ( Decimal128  lhs,
Decimal32  rhs 
)
Decimal128 bdldfp::operator/ ( Decimal64  lhs,
Decimal128  rhs 
)
Decimal128 bdldfp::operator/ ( Decimal128  lhs,
Decimal64  rhs 
)

Divide the value of the specified lhs by the value of the specified rhs as described by IEEE-754, and return the result.

  • If either of lhs or rhs is signaling NaN, then store the value of the macro EDOM into errno and return a NaN.
  • Otherwise if either of lhs or rhs is NaN, return a NaN.
  • Otherwise if lhs and rhs are both infinity (positive or negative) or both zero (positive or negative) then store the value of the macro EDOM into errno and return a NaN.
  • Otherwise if lhs has a normal value and rhs has a positive zero value, store the value of the macro ERANGE into errno and return infinity with the sign of lhs.
  • Otherwise if lhs has a normal value and rhs has a negative zero value, store the value of the macro ERANGE into errno and return infinity with the opposite sign as lhs.
  • Otherwise if lhs has infinity value and rhs has a positive zero value, return infinity with the sign of lhs.
  • Otherwise if lhs has infinity value and rhs has a negative zero value, return infinity with the opposite sign as lhs.
  • Otherwise if dividing the value of lhs by the value of rhs results in an absolute value that is larger than std::numeric_limits<Decimal128>max() then store the value of the macro ERANGE into errno and return infinity with the same sign as that result.
  • Otherwise if dividing the value of lhs by the value of rhs results in an absolute value that is smaller than std::numeric_limits<Decimal128>min() then store the value of the macro ERANGE into errno and return zero with the same sign as that result.
  • Otherwise return the result of dividing the value of lhs by the value of rhs.
Decimal128 bdldfp::operator/ ( Decimal128  lhs,
int  rhs 
)
Decimal128 bdldfp::operator/ ( Decimal128  lhs,
unsigned int  rhs 
)
Decimal128 bdldfp::operator/ ( Decimal128  lhs,
long  rhs 
)
Decimal128 bdldfp::operator/ ( Decimal128  lhs,
unsigned long  rhs 
)
Decimal128 bdldfp::operator/ ( Decimal128  lhs,
long long  rhs 
)
Decimal128 bdldfp::operator/ ( Decimal128  lhs,
unsigned long long  rhs 
)

Divide the value of the specified lhs by the specified rhs as described by IEEE-754, and return the result.

  • If lhs is signaling NaN, then store the value of the macro EDOM into errno and return a NaN.
  • Otherwise if lhs is NaN then return a NaN.
  • Otherwise if lhs is infinity (positive or negative) and rhs is positive value then return infinity value with the same sign as its original value.
  • Otherwise if lhs is infinity (positive or negative) and rhs is negative value then return infinity value with the opposite sign as its original value.
  • Otherwise if rhs is zero, store the value of the macro ERANGE into errno and return infinity with the same sign it had prior to this operation.
  • Otherwise if dividing the value of lhs by the value of rhs results in an absolute value that is larger than std::numeric_limits<Decimal128>max() then store the value of the macro ERANGE into errno and return infinity with the same sign as that result.
  • Otherwise if dividing the value of lhs by the value of rhs results in an absolute value that is smaller than std::numeric_limits<Decimal128>min() then store the value of the macro ERANGE into errno and return zero with the same sign as that result.
  • Otherwise return the result of dividing the value of lhs by the value of rhs.
Decimal128 bdldfp::operator/ ( int  lhs,
Decimal128  rhs 
)
Decimal128 bdldfp::operator/ ( unsigned int  lhs,
Decimal128  rhs 
)
Decimal128 bdldfp::operator/ ( long  lhs,
Decimal128  rhs 
)
Decimal128 bdldfp::operator/ ( unsigned long  lhs,
Decimal128  rhs 
)
Decimal128 bdldfp::operator/ ( long long  lhs,
Decimal128  rhs 
)
Decimal128 bdldfp::operator/ ( unsigned long long  lhs,
Decimal128  rhs 
)

Divide the specified lhs by the value of the specified rhs as described by IEEE-754, and return the result.

  • If rhs is signaling NaN, then store the value of the macro EDOM into errno and return a NaN.
  • Otherwise if rhs is NaN then return a NaN.
  • Otherwise if rhs is infinity (positive or negative), and lhs is zero, store the value of the macro ERANGE into errno and return a NaN.
  • Otherwise if rhs is zero (positive or negative), store the value of the macro ERANGE into errno and return infinity with the sign of lhs.
  • Otherwise if dividing the value of lhs by the value of rhs results in an absolute value that is larger than std::numeric_limits<Decimal128>max() then store the value of the macro ERANGE into errno and return infinity with the same sign as that result.
  • Otherwise if dividing the value of lhs by the value of rhs results in an absolute value that is smaller than std::numeric_limits<Decimal128>min() then store the value of the macro ERANGE into errno and return zero with the same sign as that result.
  • Otherwise return the result of dividing the value of lhs by the value of rhs. Note that this is a floating-point operation, not integer.
bool bdldfp::operator== ( Decimal128  lhs,
Decimal128  rhs 
)

Return true if the specified lhs and rhs have the same value, and false otherwise. Two Decimal128 objects have the same value if the compareQuietEqual operation (IEEE-754 defined, non-total ordering comparison) considers the underlying IEEE representations equal. In other words, two Decimal128 objects have the same value if:

  • both have a zero value (positive or negative), or
  • both have the same infinity value (both positive or negative), or
  • both have the value of a real number that are equal, even if they are represented differently (cohorts have the same value)

This operation stores the value of the macro EDOM into errno if either or both operands are signaling NaN.

Note that a NaN is never equal to anything, including itself:

      Decimal128 aNaN = std::numeric_limits<Decimal128>::quiet_NaN();
      assert(!(aNan == aNan));
bool bdldfp::operator== ( Decimal32  lhs,
Decimal128  rhs 
)
bool bdldfp::operator== ( Decimal128  lhs,
Decimal32  rhs 
)
bool bdldfp::operator== ( Decimal64  lhs,
Decimal128  rhs 
)
bool bdldfp::operator== ( Decimal128  lhs,
Decimal64  rhs 
)

Return true if the specified lhs and rhs have the same value, and false otherwise. Two decimal objects have the same value if the compareQuietEqual operation (IEEE-754 defined, non-total ordering comparison) considers the underlying IEEE representations equal. In other words, two decimal objects have the same value if:

  • both have a zero value (positive or negative), or
  • both have the same infinity value (both positive or negative), or
  • both have the value of a real number that are equal, even if they are represented differently (cohorts have the same value)

This operation stores the value of the macro EDOM into errno if either or both operands are signaling NaN.

bool bdldfp::operator!= ( Decimal128  lhs,
Decimal128  rhs 
)

Return true if the specified lhs and rhs do not have the same value, and false otherwise. Two Decimal128 objects do not have the same value if the compareQuietEqual operation (IEEE-754 defined, non-total ordering comparison) considers the underlying IEEE representations not equal. In other words, two Decimal128 objects do not have the same value if:

  • both are a NaN, or
  • one has zero value (positive or negative) and the other does not, or
  • one has the value of positive infinity and the other does not, or
  • one has the value of negative infinity and the other does not, or
  • both have the value of a real number that are not equal, regardless of their representation (cohorts are equal)

This operation stores the value of the macro EDOM into errno if either or both operands are signaling NaN.

Note that a NaN is never equal to anything, including itself:

      Decimal128 aNaN = std::numeric_limits<Decimal128>::quiet_NaN();
      assert(aNan != aNan);
bool bdldfp::operator!= ( Decimal32  lhs,
Decimal128  rhs 
)
bool bdldfp::operator!= ( Decimal128  lhs,
Decimal32  rhs 
)
bool bdldfp::operator!= ( Decimal64  lhs,
Decimal128  rhs 
)
bool bdldfp::operator!= ( Decimal128  lhs,
Decimal64  rhs 
)

Return true if the specified lhs and rhs do not have the same value, and false otherwise. Two decimal objects do not have the same value if the compareQuietEqual operation (IEEE-754 defined, non-total ordering comparison) considers the underlying IEEE representations not equal. In other words, two decimal objects do not have the same value if:

  • both are NaN, or
  • one has zero value (positive or negative) and the other does not, or
  • one has the value of positive infinity and the other does not, or
  • one has the value of negative infinity and the other does not, or
  • both have the value of a real number that are not equal, regardless of their representation (cohorts are equal)

This operation stores the value of the macro EDOM into errno if either or both operands are signaling NaN.

bool bdldfp::operator< ( Decimal128  lhs,
Decimal128  rhs 
)

Return true if the specified lhs has a value less than the specified rhs and false otherwise. The value of a Decimal128 object lhs is less than that of an object rhs if the compareQuietLess operation (IEEE-754 defined, non-total ordering comparison) considers the underlying IEEE representation of lhs to be less than of that of rhs. In other words, lhs is less than rhs if:

  • neither lhs nor rhs are NaN, or
  • lhs is zero (positive or negative) and rhs is positive, or
  • rhs is zero (positive or negative) and lhs negative, or
  • lhs is not positive infinity, or
  • lhs is negative infinity and rhs is not, or
  • lhs and rhs both represent a real number and the real number of lhs is less than that of rhs

This operation stores the value of the macro EDOM into errno if either or both operands are signaling NaN.

bool bdldfp::operator< ( Decimal32  lhs,
Decimal128  rhs 
)
bool bdldfp::operator< ( Decimal128  lhs,
Decimal32  rhs 
)
bool bdldfp::operator< ( Decimal64  lhs,
Decimal128  rhs 
)
bool bdldfp::operator< ( Decimal128  lhs,
Decimal64  rhs 
)

Return true if the specified lhs has a value less than the specified rhs and false otherwise. The value of a decimal object lhs is less than that of an object rhs if the compareQuietLess operation (IEEE-754 defined, non-total ordering comparison) considers the underlying IEEE representation of lhs to be less than of that of rhs. In other words, lhs is less than rhs if:

  • neither lhs nor rhs are NaN, or
  • lhs is zero (positive or negative) and rhs is positive, or
  • rhs is zero (positive or negative) and lhs negative, or
  • lhs is not positive infinity, or
  • lhs is negative infinity and rhs is not, or
  • lhs and rhs both represent a real number and the real number of lhs'is less than that of 'rhs

This operation stores the value of the macro EDOM into errno if either or both operands are signaling NaN.

bool bdldfp::operator<= ( Decimal128  lhs,
Decimal128  rhs 
)

Return true if the specified lhs has a value less than or equal the value of the specified rhs and false otherwise. The value of a Decimal128 object lhs is less than or equal to the value of an object rhs if the compareQuietLessEqual operation (IEEE-754 defined, non-total ordering comparison) considers the underlying IEEE representation of lhs to be less or equal to that of rhs. In other words, lhs is less or equal than rhs if:

  • neither lhs nor rhs are NaN, or
  • lhs and rhs are both zero (positive or negative), or
  • both lhs and rhs are positive infinity, or
  • lhs is negative infinity, or
  • lhs and rhs both represent a real number and the real number of lhs is less or equal to that of rhs

This operation stores the value of the macro EDOM into errno if either or both operands are signaling NaN.

bool bdldfp::operator<= ( Decimal32  lhs,
Decimal128  rhs 
)
bool bdldfp::operator<= ( Decimal128  lhs,
Decimal32  rhs 
)
bool bdldfp::operator<= ( Decimal64  lhs,
Decimal128  rhs 
)
bool bdldfp::operator<= ( Decimal128  lhs,
Decimal64  rhs 
)

Return true if the specified lhs has a value less than or equal the value of the specified rhs and false otherwise. The value of a decimal object lhs is less than or equal to the value of an object rhs if the compareQuietLessEqual operation (IEEE-754 defined, non-total ordering comparison) considers the underlying IEEE representation of lhs to be less or equal to that of rhs. In other words, lhs is less or equal than rhs if:

  • neither lhs nor rhs are NaN, or
  • lhs and rhs are both zero (positive or negative), or
  • both lhs and rhs are positive infinity, or
  • lhs is negative infinity, or
  • lhs and rhs both represent a real number and the real number of lhs is less or equal to that of rhs

This operation stores the value of the macro EDOM into errno if either or both operands are signaling NaN.

bool bdldfp::operator> ( Decimal128  lhs,
Decimal128  rhs 
)

Return true if the specified lhs has a greater value than the specified rhs and false otherwise. The value of a Decimal128 object lhs is greater than that of an object rhs if the compareQuietGreater operation (IEEE-754 defined, non-total ordering comparison) considers the underlying IEEE representation of lhs to be greater than of that of rhs. In other words, lhs is greater than rhs if:

  • neither lhs nor rhs are NaN, or
  • rhs is zero (positive or negative) and lhs positive, or
  • lhs is zero (positive or negative) and rhs negative, or
  • lhs is not negative infinity, or
  • lhs is positive infinity and rhs is not, or
  • lhs and rhs both represent a real number and the real number of lhs is greater than that of rhs

This operation stores the value of the macro EDOM into errno if either or both operands are signaling NaN.

bool bdldfp::operator> ( Decimal32  lhs,
Decimal128  rhs 
)
bool bdldfp::operator> ( Decimal128  lhs,
Decimal32  rhs 
)
bool bdldfp::operator> ( Decimal64  lhs,
Decimal128  rhs 
)
bool bdldfp::operator> ( Decimal128  lhs,
Decimal64  rhs 
)

Return true if the specified lhs has a greater value than the specified rhs and false otherwise. The value of a decimal object lhs is greater than that of an object rhs if the compareQuietGreater operation (IEEE-754 defined, non-total ordering comparison) considers the underlying IEEE representation of lhs to be greater than of that of rhs. In other words, lhs is greater than rhs if:

  • neither lhs nor rhs are NaN, or
  • rhs is zero (positive or negative) and lhs positive, or
  • lhs is zero (positive or negative) and rhs negative, or
  • lhs is not negative infinity, or
  • lhs is positive infinity and rhs is not, or
  • lhs and rhs both represent a real number and the real number of lhs is greater than that of rhs

This operation stores the value of the macro EDOM into errno if either or both operands are signaling NaN.

bool bdldfp::operator>= ( Decimal128  lhs,
Decimal128  rhs 
)

Return true if the specified lhs has a value greater than or equal to the value of the specified rhs and false otherwise. The value of a Decimal128 object lhs is greater or equal to a Decimal128 object rhs if the compareQuietGreaterEqual operation (IEEE-754 defined, non-total ordering comparison ) considers the underlying IEEE representation of lhs to be greater or equal to that of rhs. In other words, lhs is greater than or equal to rhs if:

  • neither lhs nor rhs are NaN, or
  • lhs and rhs are both zero (positive or negative), or
  • both lhs and rhs are negative infinity, or
  • lhs is positive infinity, or
  • lhs and rhs both represent a real number and the real number of lhs is greater or equal to that of rhs

This operation stores the value of the macro EDOM into errno if either or both operands are signaling NaN.

bool bdldfp::operator>= ( Decimal32  lhs,
Decimal128  rhs 
)
bool bdldfp::operator>= ( Decimal128  lhs,
Decimal32  rhs 
)
bool bdldfp::operator>= ( Decimal64  lhs,
Decimal128  rhs 
)
bool bdldfp::operator>= ( Decimal128  lhs,
Decimal64  rhs 
)

Return true if the specified lhs has a value greater than or equal to the value of the specified rhs and false otherwise. The value of a decimal object lhs is greater or equal to a decimal object rhs if the compareQuietGreaterEqual operation (IEEE-754 defined, non-total ordering comparison ) considers the underlying IEEE representation of lhs to be greater or equal to that of rhs. In other words, lhs is greater than or equal to rhs if:

  • neither lhs nor rhs are NaN, or
  • lhs and rhs are both zero (positive or negative), or
  • both lhs and rhs are negative infinity, or
  • lhs is positive infinity, or
  • lhs and rhs both represent a real number and the real number of lhs is greater or equal to that of rhs

This operation stores the value of the macro EDOM into errno if either or both operands are signaling NaN.

template<class CHARTYPE , class TRAITS >
bsl::basic_istream<CHARTYPE, TRAITS>& bdldfp::operator>> ( bsl::basic_istream< CHARTYPE, TRAITS > &  stream,
Decimal128 &  object 
)

Read, into the specified object, from the specified input stream an IEEE 128 bit decimal floating-point value as described in the IEEE-754 2008 standard (5.12 Details of conversions between floating point numbers and external character sequences) and return a reference providing modifiable access to stream. If stream contains a Nan value, it is unspecified if object will receive a quiet or signaling Nan. If stream is not valid on entry stream.good() == false, this operation has no effect other than setting stream.fail() to true. If eof (end-of-file) is found before any non-whitespace characters stream.fail() is set to true and object remains unchanged. If eof is detected after some characters have been read (and successfully interpreted as part of the textual representation of a floating-point value as specified by IEEE-754) then stream.eof() is set to true. If the first non-whitespace character sequence is not a valid textual representation of a floating-point value (e.g., 12e or e12 or 1*2) the stream.fail() is set to true and object will remain unchanged. If a real number value is represented by the character sequence but it is a large positive or negative value that cannot be stored into object then store the value of the macro ERANGE into errno and positive or negative infinity is stored into object, respectively. If a real number value is represented by the character sequence but it is a small positive or negative value that cannot be stored into object then store the value of the macro ERANGE into errno and positive or negative zero is stored into object, respectively. If a real number value is represented by the character sequence but it cannot be stored exactly into object, the value is rounded according to the current rounding direction (of the environment) and then stored into object.

NOTE: This method does not yet fully support iostream flags or the decimal floating point exception context.

template<class CHARTYPE , class TRAITS >
bsl::basic_ostream<CHARTYPE, TRAITS>& bdldfp::operator<< ( bsl::basic_ostream< CHARTYPE, TRAITS > &  stream,
Decimal128  object 
)

Write the value of the specified object to the specified output stream in a single line format as described in the IEEE-754 2008 standard (5.12 Details of conversions between floating point numbers and external character sequences), and return a reference providing modifiable access to stream. If stream is not valid on entry, this operation has no effect.

NOTE: This method does not yet fully support iostream flags or the decimal floating point exception context.

template<class HASHALG >
void bdldfp::hashAppend ( HASHALG &  hashAlg,
const Decimal128 &  object 
)

Pass the specified object to the specified hashAlg. This function integrates with the bslh modular hashing system and effectively provides a bsl::hash specialization for Decimal128. Note that two objects which have the same value but different representations will hash to the same value.

bool bdldfp::operator== ( const DecimalFormatConfig &  lhs,
const DecimalFormatConfig &  rhs 
)

Return true if the specified lhs and rhs objects have the same value, and false otherwise. Two DecimalFormatConfig objects have the same value if each of their attributes (respectively) have the same value. Note that comparison of two string type attributes are done via 'bslstrcmp() function.

bool bdldfp::operator!= ( const DecimalFormatConfig &  lhs,
const DecimalFormatConfig &  rhs 
)

Return true if the specified lhs and rhs objects do not have the same value, and false otherwise. Two DecimalFormatConfig objects do not have the same value if any of their attributes (respectively) do not have the same value. Note that comparison of two string type attributes are done via 'bslstrcmp() function.

bool bdldfp::operator== ( const Uint128 &  lhs,
const Uint128 &  rhs 
)

Return true if the specified lhs and the specified rhs objects have the same value, and false otherwise. Two Uint128 objects have the same value if both of their low and high attributes are the same.

bool bdldfp::operator!= ( const Uint128 &  lhs,
const Uint128 &  rhs 
)

Return true if the specified lhs and the specified rhs objects do not have the same value, and false otherwise. Two Uint128 objects do not have the same value if either of their low and high attributes are not the same.

Uint128 bdldfp::operator| ( Uint128  lhs,
const Uint128 &  rhs 
)

Return an Uint128 object having the value of a the bitwise or between the specified lhs and the specified rhs value.

Uint128 bdldfp::operator& ( Uint128  lhs,
const Uint128 &  rhs 
)

Return an Uint128 object having the value of a the bitwise and between the specified lhs and the specified rhs value.

Uint128 bdldfp::operator^ ( Uint128  lhs,
const Uint128 &  rhs 
)

Return an Uint128 object having the value of a the bitwise xor between the specified lhs and the specified rhs value.

Uint128 bdldfp::operator<< ( Uint128  lhs,
int  rhs 
)

Return an Uint128 value equal to the value of a bitwise left shift of the specified lhs 128-bit integer shifted by the specified rhs value. The behavior is undefined unless 0 <= rhs < 128.

Uint128 bdldfp::operator>> ( Uint128  lhs,
int  rhs 
)

Return an Uint128 value equal to the value of a bitwise right shift of the specified lhs 128-bit integer shifted by the specified rhs value. The behavior is undefined unless 0 <= rhs < 128.

Uint128 bdldfp::operator~ ( Uint128  value  ) 

Return an Uint128 value equal to the bitwise ones compliment of the specified value.