isunordered() — Determine if either X or Y is unordered

Standards

Standards / Extensions C or C++ Dependencies
C99
Single UNIX Specification, Version 3
C/C++ DFP
C++ TR1 C99
both
z/OS® V1R8

Format

#define _ISOC99_SOURCE
#include <math.h>

int isunordered(real-floating x, real-floating y);

#define __STDC_WANT_DEC_FP__
#include <math.h>

int isunordered(real-floating x, real-floating y);  /* C only */
int isunordered(decimal-floating x, decimal-floating y);  /* C only */
bool isunordered(real-floating x, real-floating y);  /* C++ only */
bool isunordered(decimal-floating x, decimal-floating y);  /* C++ only */

#define _TR1_C99
#include <math.h>

bool isunordered(real-floating x, real-floating y);  /* C++ only */

General description

The isunordered() macro or function template determines if either x or y is unordered, that is if x or y is a NaN.

Function Hex IEEE
isunordered X X
Notes:
  1. To use IEEE decimal floating-point, the hardware must have the Decimal Floating-Point Facility installed.
  2. This function works in IEEE decimal floating-point format. See "IEEE Decimal Floating-Point" for more information.

Returned value

The isunordered() macro returns 1 if either x or y is unordered, else returns 0. The C++ function template returns true if either x or y is unordered, else returns false.

Special behavior in hex: The isunordered() macro always returns 0. The C++ function template always returns false.

Related information