Copyright 1989 AT&T. Copyright (c) 2004, Sun Microsystems, Inc. All Rights Reserved.
The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
#include <ieeefp.h> int isnand(double dsrc);
int isnanf(float fsrc);
int finite(double dsrc);
fpclass_t fpclass(double dsrc);
int unordered(double dsrc1, double dsrc2);
The isnand() and isnanf() functions return TRUE (1) if the argument dsrc or fsrc is a NaN; otherwise they return FALSE (0).
The fpclass() function returns one of the following classes to which dsrc belongs: FP_SNAN
signaling NaN
quiet NaN
negative infinity
positive infinity
negative denormalized non-zero
positive denormalized non-zero
negative zero
positive zero
negative normalized non-zero
positive normalized non-zero
The finite() function returns TRUE (1) if the argument dsrc is neither infinity nor NaN; otherwise it returns FALSE (0).
The unordered() function returns TRUE (1) if one of its two arguments is unordered with respect to the other argument. This is equivalent to reporting whether either argument is NaN. If neither argument is NaN, FALSE (0) is returned.
None of these functions generates an exception, even for signaling NaNs.
See DESCRIPTION.
See attributes(5) for descriptions of the following attributes:
ATTRIBUTE TYPE ATTRIBUTE VALUE |
MT-Level MT-Safe |
fpgetround(3C), isnan(3M), attributes(5)