samequantumd32, samequantumd64, or samequantumd128 Subroutine

Purpose

Determines if the representation exponents of both the parameters are the same.

Syntax

#include <math.h>

_Bool samequantumd32 (x, y)
_Decimal32 x;
_Decimal32 y;

_Bool samequantumd64 (x, y)
_Decimal64 x;
_Decimal64 y;

_Bool samequantumd128 (x, y)
_Decimal128 x;
_Decimal128 y;

Description

The samequantumd32, samequantumd64, and samequantumd128 subroutines determine if the representation exponents of the x and y parameters are the same. If the values of both the x and y parameters are NaN, or infinities, they have the same representation exponents; if exactly one operand is infinite, or exactly one operand is NaN, they do not have the same representation exponents. These subroutines raise no exceptions.

Parameters

Item Description
x Specifies the value to be computed.
y Specifies the value to be computed.

Return Values

The samequantumd32, samequantumd64, and samequantumd128 subroutines return true when x and y parameters have the same representation exponents; otherwise false is returned.