Guardian Programmer's Guide

Table Of Contents
Using Floating-Point Formats
Guardian Programmer’s Guide 421922-014
28 - 6
Floating-Point Operating Mode Routines
Controlling trap handling
Controlling and accessing exception flags
To optimize programs, the native compiler does the following:
Evaluates constants at compile time
Removes unused expressions
Reorders instructions within a procedure, but not across procedures
Because of these optimization capabilities, you might get unintended behavior if
operating modes such as a special rounding mode are used. For example, setting the
rounding mode does not affect constants evaluated at compile time. Further, different
Routine Description
FP_IEEE_ROUND_GET_ Returns the IEEE floating-point
rounding mode.
FP_IEEE_ROUND_NEAREST is the
default mode.
FP_IEEE_ROUND_SET_ Sets the IEEE floating-point rounding
mode.
FP_IEEE_DENORM_GET_ Returns the handling of denormalized
IEEE flo
ating-point numbers.
FP_IEEE_DENORMALIZATION_
ENABLE is the default mode.
FP_IEEE_DENORM_SET_ Sets the handling of denormalized
IEEE flo
ating-point numbers.
FP_IEEE_ENABLES_GET_ Returns the mask of enabled IEEE
floating-
point traps. By default, traps
are disabled.
FP_IEEE_ENABLES_SET_ Sets the mask of enabled IEEE
floating-
point traps.
FP_IEEE_ENV_CLEAR_ Sets the IEEE floating-point
environm
ent to its default values and
returns its previous state.
FP_IEEE_ENV_RESUME_ Sets the IEEE floating-point
environm
ent to the state returned by
the FP_IEEE_ENV_CLEAR routine.
FP_IEEE_EXCEPTIONS_GET_ Returns the IEEE floating-point sticky
flags (ex
ceptions) mask. By default,
no exceptions are set.
FP_IEEE_EXCEPTIONS_SET_ Sets the IEEE floating-point sticky
flags (ex
ceptions) mask.