critical impact:

Problem description

The ieee_set_fp_control and ieee_get_fp_control functions exist
on Tru64 UNIX, but not on HP-UX. However, a replacement technology exists in the fenv suite of functions.

The Tru64 UNIX functions are in libc and use the <machine/fpu.h> header file. The HP-UX functions are in libm and use the <fenv.h> header file.

The ieee_set_fp_control function is used either to enable traps for floating-point exceptions or to override the default IEEE gradual underflow capability and instead map denormalized inputs and underflow results to zero.

The ieee_get_fp_control function is also used to detect exceptions by checking status flags that are set whenever floating-point exceptions occur.

Two features in the Tru64 UNIX functions do not have equivalent functions on HP-UX. The support for exceptions for denormal operands and the IEEE_INHERIT option, which makes newly created threads inherit the exception trap and status settings of their creating thread.

See also

Solution description

Use the fenv suite of functions to achieve similar results and modify source code.

Replace the header file <machine/fpu.h> with the header file <fenv.h> and link against
libm.

When using the ieee_set_fp_control function to enable traps for floating-point exceptions, replace it with the fesettrapenable function.

When using the ieee_set_fp_control function to to override the default IEEE gradual underflow, replace it with the fesetflushtozero function. Note that setting flush-to-zero mode on Itanium(R)-based systems only maps underflow results to zero. It does not map denormalized inputs to zero.

When using the ieee_get_fp_control function to detect exceptions by checking status flags that are set whenever floating-point exceptions occur, replace it with the fetestexcept function.