|
|
This section describes the implementation-defined characteristics of floating point numbers. It corresponds to section ``F.3.6 Floating Point'' in the ANSI document.
The representations and sets of values of the various types
of floating-point numbers in the
compiler are:
An integral value is truncated to the nearest floating-point representation if it cannot be converted exactly.
When a floating-point number is converted to a narrower floating-point number, the direction of truncation or rounding is towards the nearest floating-point number.
An overflow causes a run-time exception to occur. For example:
double d; float f;If an underflow occurs, the value is rounded towards 0.main() { d = 1.2345e300; f = d; /* dumps core */ }