The environment model

The floating-point environment--the context in which all computation occurs--has its roots in the IEEE floating-point standards. Because they must apply to all levels of programming languages, the standards present the environment in terms of its typical implementation, namely, a set of bits in the control registers of a hardware floating-point unit. Two bits determine the rounding mode and five bits hold the exception flags. The diagram to the left presents the mechanical view of a floating-point engine.

The mechanical analogy is a fair one, because on any high-speed platform the mode and state information of the environment is kept in dedicated registers of the floating-point hardware. FPCE provides a set of functions to manipulate the environment regardless of its hardware organization. The CommonPoint system uses C++ classes to provide an abstraction of the environment in software.

With or without an abstraction, the environment information on most platforms has global scope--the state of the environment applies to all floating-point operations regardless of the structure of the application. Although it leads to simplified hardware, global scope for the environment can be clumsy for applications, where most uses of the environment are local to a computational block. The CommonPoint environment classes and FPCE functions support access to the environment on a local basis.


[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