74 lines
2.1 KiB
Plaintext
74 lines
2.1 KiB
Plaintext
'\"macro stdmacro
|
|
.\" Copyright (c) 1988 Silicon Graphics, Inc. All rights reserved.
|
|
.\"
|
|
.nr X
|
|
.if \nX=0 .ds x} fp_class 3C "C Development Set" "\&"
|
|
.if \nX=1 .ds x} fp_class 3C "C Development Set"
|
|
.if \nX=2 .ds x} fp_class 3C "" "\&"
|
|
.if \nX=3 .ds x} fp_class "" "" "\&"
|
|
.TH \*(x}
|
|
.SH NAME
|
|
\f4fp_class\fP, \f4fp_class_d\fP, \f4fp_class_f\fP \- classes of IEEE floating-point values
|
|
.PP
|
|
\f4fp_class_l\fP \- classes of long double floating-point values
|
|
.SH SYNOPSIS
|
|
\f4#include <fp_class.h>\fP
|
|
.PP
|
|
\f4int fp_class_d(double x);\fP
|
|
.PP
|
|
\f4int fp_class_f(float x);\fP
|
|
.PP
|
|
\f4int fp_class_l(long double x);\fP
|
|
.SH DESCRIPTION
|
|
(Note that the long double routines are only valid for the MIPSpro
|
|
compilers.)
|
|
Long double function fp_class_l has been renamed to be compliant with
|
|
the ANSI-C standard, however to be backward compatible, it
|
|
may still be called with the name fp_class_q.
|
|
.PP
|
|
These routines are used to determine the class of IEEE
|
|
or long double
|
|
floating-point values. They return one of the constants in
|
|
the file
|
|
\f4<fp_class.h>\fP
|
|
and never cause an exception even for signaling NaN's.
|
|
These routines are to implement the recommended function
|
|
.RI class( x )
|
|
in the appendix of the IEEE 754-1985 standard for binary
|
|
floating-point arithmetic.
|
|
.PP
|
|
The constants in
|
|
\f4<fp_class.h>\fP
|
|
refer to the following classes of values:
|
|
.PP
|
|
.nf
|
|
.ta \w'FP_NEG_DENORM\ \ 'u
|
|
Constant Class
|
|
FP_SNAN Signaling NaN (Not-a-Number)
|
|
FP_QNAN Quiet NaN (Not-a-Number)
|
|
FP_POS_INF +\(if (positive infinity)
|
|
FP_NEG_INF \-\(if (negative infinity)
|
|
FP_POS_NORM positive normalized non-zero
|
|
FP_NEG_NORM negative normalized non-zero
|
|
FP_POS_DENORM positive denormalized
|
|
FP_NEG_DENORM negative denormalized
|
|
FP_POS_ZERO +0.0 (positive zero)
|
|
FP_NEG_ZERO \-0.0 (negative zero)
|
|
.fi
|
|
.PP
|
|
Note that these functions are distinct from the SVR4 function
|
|
\f4fpclass\fP
|
|
(see
|
|
\f4isnan\fP(3C)).
|
|
.SH "SEE ALSO"
|
|
\f4isnan\fP(3C).
|
|
.br
|
|
ANSI/IEEE Std 754-1985, IEEE Standard for Binary Floating-
|
|
Point Arithmetic
|
|
.PP
|
|
In the case of long doubles, non-zero numbers less than
|
|
2**-916 in absolute value are classified as denormalized,
|
|
since one of the numbers used in their representation
|
|
may be a denormal double.
|
|
'\".so /pubs/tools/origin.mips
|