HP-UX Floating-Point Guide

146 Chapter 5
Manipulating the Floating-Point Status Register
Run-Time Mode Control: The fenv(5) Suite
NOTE Flush-to-zero mode is supported on all HP 9000 systems except those
with chip levels of PA7000 and PA7100LC. You can look up the chip level
of your system in /opt/langtools/lib/sched.models. See
“Determining Your System’s Architecture Type” on page 26 for more
information.
Use caution in changing the underflow mode when you call math library
routines. Setting flush-to-zero mode may affect non-denormalized results
of math library routine calls.
The C declarations for these functions are as follows:
int fegetflushtozero(void);
void fesetflushtozero(int value);
The fegetflushtozero function returns the current flush-to-zero mode
setting: a result of 1 means that flush-to-zero mode is set, a result of 0
means that the default IEEE-754-compliant underflow mode is set. On
systems that do not support flush-to-zero mode, this function always
returns 0.
On systems that support flush-to-zero mode, the fesetflushtozero
function sets flush-to-zero mode to value, which must be either 1
(flush-to-zero mode) or 0 (IEEE-754-compliant underflow mode). On
systems that do not support flush-to-zero mode, this function has no
effect.
On systems that support flush-to-zero mode, the default setting is
IEEE-754-compliant underflow mode (0).
The following program calls fegetflushtozero and
fesetflushtozero to retrieve and set the underflow mode.