Guardian Programmer's Guide

Table Of Contents
Using Floating-Point Formats
Guardian Programmer’s Guide 421922-014
28 - 4
Run-Time Consistency Checking
Execute the noft utility listattribute command to display the floating-point state.
Use the header, all, listattribute or filehdr commands for displaying the
float_lib_overrule bit.
Run-Time Consistency Checking
If you attempt to use a CPU that does not support IEEE floating-point format, process
create error code 64, “IEEE floating-point support not available on this processor,”
occurs. The operating system does not allow the creation of a process that requires
IEEE floating-point format on a CPU that does not support it. Programs can call the
PROCESSOR_GETINFOLIST_ procedure to determine whether a CPU can run IEEE
floating-point instructions. (See the Guardian Procedure Calls Reference Manual for
more information about this procedure.)
The operating system also checks, at run-time, to ensure that the user program and user library
have compatible floating-point types. This check can be overruled by the
float_lib_overrule bit of the program’s object file. If the float_lib_overrule bit
is set to OFF in the program file and the user library and program have incompatible floating-
point types, the operating system generates an error code; instead of running the program.
(TACL converts the error code to an error message.) If the float_lib_overrule bit is set
to ON in the program file, the operating system allows the floating-point type incompatibility
between the user library and the program. See the C/C++ Programmer’s Guide for more
information about the link-time and run-time consistency checking.
Run-Time Support
One set of C and C++ run-time libraries supports both Tandem and IEEE floating-point
formats. The following functions also are added to support IEEE floating-point format.
For more information about these functions see the Open System Services Library
Calls Reference Manual or the TNS/R Native C Library Calls Reference Manual.
In math.h: copysign(), isnan(), logb(), nextafter(), and scalb()
In ieeefp.h: finite(), unordered(), and fpclass()
In limits.h (C++): infinity(), quiet_NaN(), signaling_NaN(), and
denorm_min()
Debugging Options
You can use the Debug, Visual Inspect, and Native Inspect (TNS/E systems only)
debuggers for debugging programs that use IEEE floating-point format. Note that
Visual Inspect supports only the default rounding mode. Debug and Visual Inspect can
be used to display and modify IEEE floating-point values and registers. Inspect can be
used only for operations that do not involve IEEE floating-point values and registers.