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

Synopsis

Declared in <bdldfp_decimal.h>

bdldfp::Decimal128
operator‐(
    int lhs,
    Decimal128 rhs);

Description

* 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.

Return Value

reference to this object

Parameters

Name

Description

lhs

left‐hand operand

rhs

right‐hand operand

Created with MrDocs