Precision control

The standards require that implementations provide programmers a way to compute entirely in float, double, or a combination of the two. The idea is to accommodate software written with the expectation of no extra range or precision.

For some architectures, the requirements are easily met. For example, both PA-RISC and PowerPC platforms have a full set of arithmetic operations for both float and double types. Any results of functions delivering higher precision than required could be narrowed. On such platforms, precision control is a matter of making the correct request of the compiler.

Architectures like the X86 evaluate all results to long double. For such platforms, the standards suggest a mode in the environment to indicate that results--even those stored in the wide format--be rounded to the precision of float or double. The X86 platforms contain such control bits in hardware registers.

Like trapping, precision control has not found wide use since the standards appeared. Access to X86 precision control bits and specific compiler directives to narrow wide intermediate results are not supported by the CommonPoint system.


[Contents] [Previous] [Next]
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.

Generated with WebMaker