Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home

HP-UX Floating-Point Guide: HP 9000 Computers

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Glossary

 » Index

HP Part Number: B3906-90006

Edition: Edition 5

Published:  November 1997


Table of Contents

Printing History
Preface
Conventions
In This Book
1 Introduction
Overview of Floating-Point Principles
Overview of HP-UX Math Libraries
Math Libraries and System Architecture
Selecting Different Versions of the Math Libraries
Locations of the Math Libraries at Release 11.0
2 Floating-Point Principles and the IEEE Standard for Binary Floating-Point Arithmetic
What Is the IEEE Standard?
Floating-Point Formats
Single-Precision, Double-Precision, and Quad-Precision Formats
Normalized and Denormalized Values
Infinity
Not-a-Number (NaN)
Zero
Complex Data Types
IEEE Representation Summary
Exception Conditions
Inexact Result (Rounding)
Overflow Conditions
Underflow Conditions
Invalid Operation Conditions
Division by Zero Conditions
Exception Processing
Floating-Point Operations
Comparison
Conversion Between Operand Formats
The Remainder Operation
Recommended Functions
3 Factors that Affect the Results of Floating-Point Computations
How Basic Operations Affect Application Results
How Mathematical Library Functions Affect Application Results
How Exceptions and Library Errors Affect Application Results
Other System-Related Factors that Affect Application Results
Conversions Between Binary and Decimal
Compiler Behavior and Compiler Version
Compiler Options
Architecture Type of Run-Time System
Operating System Release of Build-Time System
Operating System Release of Run-Time System
Values of Certain Modifiable Hardware Status Register Fields
Floating-Point Coding Practices that Affect Application Results
Testing Floating-Point Values for Equality
Taking the Difference of Similar Values
Adding Values with Very Different Magnitudes
Unintentional Underflow
Truncation to an Integer Value
Ill-Conditioned Computations
4 HP-UX Math Libraries on HP 9000 Systems
HP-UX Library Basics
Math Library Basics
Anatomy of a Math Library Function Call
Math Library Error Handling for C
Handling Invalid Operation Exceptions (C and Fortran)
Math Library Error Handling for Fortran
Contents of the HP-UX Math Libraries
Scalar Math Libraries (libm and libcl)
The BLAS Library (libblas)
The Vector Library (libvec) (Obsolete)
Calling C Library Functions from Fortran
5 Manipulating the Floating-Point Status Register
Run-Time Mode Control: The fenv(5) Suite
The PA-RISC Floating-Point Status Register
Rounding Mode: fegetround and fesetround
Exception Bits
Manipulating the Floating-Point Environment: fegetenv, fesetenv, feupdateenv, feholdexcept
Underflow Mode: fegetflushtozero and fesetflushtozero
Command-Line Mode Control: The +FP Compiler Option
6 Floating-Point Trap Handling
Enabling Traps
Using the +FP Compiler Option
Using the fesettrapenable Function
Using the +fp_exception or +T Compiler Option (Fortran only)
Handling Traps
Using the ON Statement (Fortran only)
Using the sigaction(2) Function (C only)
Detecting Exceptions without Enabling Traps
Handling Integer Exceptions
Handling Integer Division by Zero
Handling Integer Overflow
7 Performance Tuning
Identifying and Removing Performance Bottlenecks
Inefficient Code
Optimizing Your Program
Specifying the Architecture Type
Including Debugging Information
Producing Position-Independent Code
Using Profile-Based Optimization
Creating and Zeroing Static Data (Fortran only)
Writing Routines in Assembly Language
BLAS Library Versions
Shared Libraries versus Archive Libraries
Denormalized Operands
Mixed-Precision Expressions
Matrix Operations
Data Alignment
Cache Aliasing
Static Variables
Quad-Precision Computations
A The C Math Library
C Math Library Tables
B The Fortran Math Library
C Floating-Point Problem Checklist
Results Different from Those Produced Previously
Incorrect or Imprecise Results
Compiling and Linking Errors
Glossary
Index
Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 1997 Hewlett-Packard Development Company, L.P.