The floating-point environment

Part of the computational model is the environment in which your application executes. The environment contains state information you control. The rounding mode, as defined by the IEEE floating-point standards, determines how mathematical results not exactly representable are coerced to the destination format. Rounding may be to nearest (the default), toward zero, toward , or toward . The floating-point standards also specify a set of five flags associated with the possible exceptions: inexact (result), overflow, underflow, divide-by-zero, invalid (operation).

Once set, these flags remain set until you clear them. The CommonPoint system provides a set of classes for manipulating the environment so you can handle rounding modes and exceptions and so you can write robust functions.


[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