|
BDE 4.39.x Production Release
|
Provide traits to describe floating point type structure.
Provide traits to describe floating point type structure.
This component provides a traits class type that describes the structure of the IEEE-754 based float, and double types for code that intends to interpret or manipulate the representation directly.
This code has been lifted from the open source Microsoft STL, from the file type_traits and modified to remove "support" for long double. (The MSFT code does not really support long double, it assumes that it is the same type as double, which is not true on most compilers.)
The extended precision long double type is not fully portable, because Microsoft made it only double precision (same as the double type). This traits class also provides an unsigned integer equivalent of a given floating point type. Unfortunately for an extended precision long double that would be a more-than-64-bits type, and there is no such standard type. Since in our own code we do not support long double (with the formatting and parsing that this traits may be used for) we've foregone the trouble of trying to find a portable solution and simply decided not to support the long double type.