Return true if lhs is greater than rhs.

Synopsis

Declared in <bdldfp_decimalimputil.h>

static
bool
greater(
    ValueType32 lhs,
    ValueType32 rhs);

Description

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

If either or both operands are signaling NaN, store the value of the macro EDOM into errno and return false.

Return Value

true if lhs is greater than rhs

Parameters

Name

Description

lhs

left‐hand operand

rhs

right‐hand operand

Created with MrDocs