Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

fp_class(3)  —  RISC

Name

fp_class − classes of IEEE floating-point values

Syntax

#include <fp_class.h>

int fp_class_d(double x);
int fp_class_f(float x);

Description

These routines are used to determine the class of IEEE floating-point values.  They return one of the constants in the file <fp_class.h> and never cause an exception, even for signaling NaNs. These routines are to implement the recommended function class(x) in the appendix of the IEEE 754-1985 standard for binary floating-point arithmetic. The constants in <fp_class.h> refer to the following classes of values: ConstantClass FP_SNANSignaling NaN (Not-a-Number)
FP_QNANQuiet NaN (Not-a-Number)
FP_POS_INF+∞ (positive infinity)
FP_NEG_INF-∞ (negative infinity)
FP_POS_NORMpositive normalized nonzero
FP_NEG_NORMnegative normalized nonzero
FP_POS_DENORMpositive denormalized
FP_NEG_DENORMnegative denormalized
FP_POS_ZERO+0.0 (positive zero)
FP_NEG_ZERO-0.0 (negative zero)

Also See

ANSI/IEEE Std 754-1985, IEEE Standard for Binary Floating-Point Arithmetic

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026