gxFLOAT Floating Point Type


Conditional Directives
Type Definitions


The gxFLOAT64 class is used to represent 64-bit signed double precision floating point values independently of the operating system or hardware platform used. A double precision floating point number stores binary info within a total of 64 bits. The first bit contains the sign of the mantissa (0 for positive and 1 for negative.) The next 11bits store the exponent, and the remaining 52 bits provide the mantissa, giving an approximate decimal precision of 15 digits.

The gxFLOAT64 class works by separating a 64-bit value into eight separate byte values and reordering the bytes highest-order to lowest-order. A FLOAT64 type has a positive limit of 1.7E+308 and a negative limit of 1.7E-308 with 15-digit precision.

Conditional Directives

__X86__ - This conditional directive is required to maintain the correct byte ordering on PC based Intel x86 systems, which includes Windows 95/98/NT/2000 and UNIX variants such as Linux, SCO, QNX, and x86 Solaris.

__USE_NATIVE_FLOAT_TYPES__ - This conditional directive allows the use of native floating point types in place of platform interoperable floating-point types for debugging purposes only.


The gxFLOAT64 class is designed to function in the same manner as built-in integer types and includes a full complement of arithmetic and comparison operator overloads. Each operator is overloaded for the following data types: gxFLOAT64, __DPFLOAT__, __LWORD__, __ULWORD__, __WORD__, __SWORD__, __ULWORD__, __USWORD__, __SBYTE__, and __UBYTE__.

End Of Document