BloombergLP::bdldfp::operator!=

Return true if the specified lhs and rhs do not have the same value, and false otherwise.

Synopsis

Declared in <bdldfp_decimal.h>

bool
operator!=(
    Decimal32 lhs,
    Decimal128 rhs);

Description

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.

Return Value

true if the specified lhs and rhs do not have the same value, and false otherwise

Parameters

NameDescription
lhsleft-hand operand
rhsright-hand operand