HP-UX Floating-Point Guide
Chapter 4 119
HP-UX Math Libraries on HP 9000 Systems
Contents of the HP-UX Math Libraries
rint(x) Rounds x to integer-valued
double-precision number, in the
direction of the current rounding
mode
scalb(x, y) Returns x*(2**y)
To use these functions, compile your program in any mode except strict
ANSI mode (-Aa). Use either extended ANSI mode (-Ae, the default),
non-ANSI mode (-Ac), or -Aa -D_HPUX_SOURCE.
The fenv(5) Suite
The fenv(5) suite is a collection of functions in the C math library that
allow an application to manipulate various modifiable control modes and
status flags in the floating-point status register. The ISO/ANSI C
committee has included most of the functions in the fenv(5) suite in the
C9X draft standard.
For details on how to use these functions, see Chapter 5 and the online
man pages. The tables in Appendix A also list all of the functions.
C9X Functions and Macros
The C math library at Release 11.0 supports a number of additional
functions and macros that the ISO/ANSI C committee has included in
the C9X draft standard. These are:
exp2(x) Returns 2**x
fdim(x, y) Returns the positive difference
between x and y
fmax(x, y) Returns the maximum numeric value
of x and y
fmin(x, y) Returns the minimum numeric value
of x and y
isgreater(x, y) (Macro) Returns the value of (x)>(y)
isgreaterequal(x, y) (Macro) Returns the value of
(x)>=(y)
isless(x, y) (Macro) Returns the value of (x) < (y)
islessequal(x, y) (Macro) Returns the value of
(x)<=(y)