HP-UX Floating-Point Guide

Appendix A 203
The C Math Library
C Math Library Tables
Floating-Point Classification Macros and Function (cont.)
int isnormal(floating-type x); Returns a nonzero integer if x is a
normalized value. Otherwise returns zero.
int signbit(floating-type x); Returns a nonzero integer if the sign of x
is negative. Otherwise returns zero.
Floating-Point Comparison Macros
int isgreater(floating-expr x,
floating-expr y);
Returns the value of (x > y).
int isgreaterequal(floating-expr x,
floating-expr y);
Returns the value of (x >= y).
int isless(floating-expr x,
floating-expr y);
Returns the value of (x < y).
int islessequal(floating-expr x,
floating-expr y);
Returns the value of (x <= y).
int islessgreater(floating-expr x,
floating-expr y);
Returns the value of (x < y) || (x >
y).
int isunordered(floating-expr x,
floating-expr y);
Returns 1 if its arguments are unordered
(that is, if either argument is a NaN) and
0 otherwise.
fenv Suite
void feclearexcept(int excepts); Clears the exception flags represented by
excepts.
void fegetenv(fenv_t *envp); Stores the current floating-point
environment in the object pointed to by
envp.
void fegetexceptflag
(fexcept_t *flagp, int excepts);
Stores the exception flags indicated by the
argument excepts in the object pointed to
by the argument flagp.
int fegetflushtozero(void); Retrieves the value representing the
current underflow mode.
Function What It Does