Guardian Programmer's Guide

Table Of Contents
Using Floating-Point Formats
Guardian Programmer’s Guide 421922-014
28 - 5
Conversion Routines
Conversion Routines
IEEE floating-point data format is incompatible with Tandem floating-point format.
Conversion between Tandem and IEEE floating-point data formats requires the use of
the following routines. See the Guardian Procedure Calls Reference Manual for more
information about these routines.
Routines for conversions from TNS to IEEE floating-point formats:
Routines for conversions from IEEE to TNS floating-point formats:
In addition to conversions between Tandem and IEEE floating-point formats, note that
the NonStop operating system uses big-endian data formats for all data. Many other
computers use little-endian data formats. For data interchanges with little-endian
computers that use IEEE floating-point format, the user must reverse the order of bytes
in the data.
Floating-Point Operating Mode Routines
The operating mode routines listed below are most useful for debugging programs and
algorithms. These operating mode routines are used for:
Controlling rounding mode
Controlling denormalized number handling
Routine Description
NSK_FLOAT_TNS64_TO_IEEE64_ Converts a 64-bit TNS floating-point
number to a 64-bit IEEE floating-point
number.
NSK_FLOAT_TNS32_TO_IEEE64_ Converts a 32-bit TNS floating-point
number
to a 64-bit IEEE floating-point
number.
NSK_FLOAT_TNS32_TO_IEEE32_ Converts a 32-bit TNS floating-point
number
to a 32-bit IEEE floating-point
number.
Routine Description
NSK_FLOAT_IEEE64_TO_TNS64_ Converts a 64-bit IEEE floating-point
number to a 64-bit TNS floating-point
number.
NSK_FLOAT_IEEE64_TO_TNS32_ Converts a 64-bit IEEE floating-point
number
to a 32-bit TNS floating-point
number.
NSK_FLOAT_IEEE32_TO_TNS32_ Converts a 32-bit IEEE floating-point
number
to a 32-bit TNS floating-point
number.