1. Introduction to the C Compiler
2. C-Compiler Implementation-Specific Information
2.3 Thread Local Storage Specifier
2.6.1 Printing long long Data Types
2.6.2 Usual Arithmetic Conversions
2.7 Case Ranges in Switch Statements
2.11.3 does_not_read_global_data
2.11.5 does_not_write_global_data
2.11.26 warn_missing_parameter_info
2.13 Preserving The Value of errno
2.14.3 __inline and __inline__
2.14.5 __FUNCTION__ and __PRETTY_FUNCTION__
2.16 How to Specify Include Files
2.16.1 Using the -I- Option to Change the Search Algorithm
2.17 Compiling in Free-Standing Environments
7. Converting Applications for a 64-Bit Environment
8. cscope: Interactively Examining a C Program
A. Compiler Options Grouped by Functionality
B. C Compiler Options Reference
C. Implementation-Defined ISO/IEC C99 Behavior
E. Implementation-Defined ISO/IEC C90 Behavior
H. The Differences Between K&R Solaris Studio C and Solaris Studio ISO C
IEEE 754 floating-point default arithmetic is “nonstop.” Underflows are “gradual.” The following is a summary, see the Numerical Computation Guide for details.
Nonstop means that execution does not halt on occurrences like division by zero, floating-point overflow, or invalid operation exceptions. For example, consider the following, where x is zero and y is positive:
z = y / x;
By default, z is set to the value +Inf, and execution continues. With the -fnonstd option, however, this code causes an exit, such as a core dump.
Here is how gradual underflow works. Suppose you have the following code:
x = 10; for (i = 0; i < LARGE_NUMBER; i++) x = x / 10;
The first time through the loop, x is set to 1; the second time through, to 0.1; the third time through, to 0.01; and so on. Eventually, x reaches the lower limit of the machine’s capacity to represent its value. What happens the next time the loop runs?
Let’s say that the smallest number characterizable is 1.234567e-38
The next time the loop runs, the number is modified by “stealing” from the mantissa and “giving” to the exponent so the new value is 1.23456e-39 and, subsequently, 1.2345e-40 and so on. This is known as “gradual underflow,” which is the default behavior. In nonstandard mode, none of this “stealing” takes place; typically, x is simply set to zero.