HP-UX Floating-Point Guide
Contents
5
1. Introduction
Overview of Floating-Point Principles . . . . . . . . . . . . . . . . . . . . . . . . . . .22
Overview of HP-UX Math Libraries. . . . . . . . . . . . . . . . . . . . . . . . . . . . .24
Math Libraries and System Architecture. . . . . . . . . . . . . . . . . . . . . . .25
Selecting Different Versions of the Math Libraries . . . . . . . . . . . . . . .27
Locations of the Math Libraries at Release 11.0 . . . . . . . . . . . . . . . . .29
2. Floating-Point Principles and the IEEE Standard for Binary
Floating-Point Arithmetic
What Is the IEEE Standard? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .35
Floating-Point Formats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .36
Single-Precision, Double-Precision, and Quad-Precision Formats . . .36
Normalized and Denormalized Values . . . . . . . . . . . . . . . . . . . . . . . . .41
Infinity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .43
Not-a-Number (NaN) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .45
Zero . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .46
Complex Data Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .47
IEEE Representation Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .48
Exception Conditions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .53
Inexact Result (Rounding) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .53
Overflow Conditions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .56
Underflow Conditions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .57
Invalid Operation Conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .58
Division by Zero Conditions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .59
Exception Processing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .60