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

Preface

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Glossary

 » Index

The HP-UX Floating-Point Guide describes how floating-point arithmetic is implemented on HP 9000 systems and discusses how floating-point behavior affects the programmer. This book provides information useful to any programmer writing or porting floating-point-intensive programs.

We recommend that you start with Chapter 1 “Introduction”, which not only provides an overview of floating-point principles but also provides important information about HP-UX math libraries.

If you are unfamiliar with floating-point issues, you should go next to Chapter 2 “Floating-Point Principles and the IEEE Standard for Binary Floating-Point Arithmetic” and Chapter 3 “Factors that Affect the Results of Floating-Point Computations”. Chapter 2 “Floating-Point Principles and the IEEE Standard for Binary Floating-Point Arithmetic” provides an overview of the IEEE Standard for Binary Floating-Point Arithmetic, which constitutes the foundation for many floating-point architectures, including Hewlett- Packard's. For more specific information about the standard, contact the IEEE Standards Board. Chapter 3 “Factors that Affect the Results of Floating-Point Computations” describes the many factors that can cause floating-point computations to produce unexpected results.

If you already understand floating-point issues, you may want to go directly to Chapter 4 “HP-UX Math Libraries on HP 9000 Systems” and the subsequent chapters and appendixes, which provide specific information about floating-point behavior on HP 9000 systems and about the libraries and facilities available on these systems.

If you have the HP FORTRAN/9000 (FORTRAN 77) compiler, all of the sample programs in this manual are online, in the directory /opt/fortran/lib/demos/FPGuide.

Comments

We welcome your comments on this manual. Please send electronic mail to editor@ch.hp.com, or send regular mail to

MLL Learning Products
Hewlett-Packard Company
Mailstop: CHR 02 DC
300 Apollo Drive
Chelmsford, MA 01824

Audience

This manual is written for application developers who write programs that perform mathematical operations. It assumes a basic knowledge of the HP-UX operating system and of a high-level programming language such as C or Fortran.

Summary of Technical Changes

This edition of the HP-UX Floating-Point Guide describes the following changes to the HP-UX math libraries at Release 11.00.

The math libraries provided in the /usr/lib directory support PA-RISC 1.1 (PA1.1) and PA-RISC 2.0 (PA2.0) systems. The libraries in /usr/lib support PA2.0 systems in 32-bit mode; the libraries in /usr/lib/pa20_64 support PA2.0 systems in 64-bit mode.

A version of the BLAS library tuned for optimal 32-bit performance on PA2.0 systems is provided in the directory /opt/fortran90/lib/pa2.0/libblas.a (for HP Fortran 90). The PA1.1 version is in /opt/fortran90/lib/libblas.a.

At Release 11.00, the C math library implements several new functions and macros that the ISO/ANSI C committee has included in the C9X draft standard (the proposed new ISO/ANSI C standard):

  • Exponential functions: exp2, scalbn

  • Maximum, minimum, and positive difference functions: fdim, fmax, fmin

  • Comparison macros: isgreater, isgreaterequal, isless, islessequal, islessgreater, isunordered

  • Nearest integer functions: round, trunc, lrint, llrint, lround, llround, nearbyint

  • Manipulation functions: nan, nextafterf

  • Remainder function: remquo

The following C library functions have been unsupported since Release 10.30:

  • cabs (hypot has equivalent functionality)

  • drem (remainder has equivalent functionality)

  • finite (replaced by the isfinite macro)

  • The fpgetround(3M) suite of functions (replaced by the fenv(5) suite)

  • matherr

Related Documentation

The IEEE Standard for Binary Floating-Point Arithmetic (ANSI/IEEE Std 754-1985) is the essential reference for developers of floating-point applications. To obtain a copy, write to the IEEE Standards Board, 345 East 47th Street, New York, NY 10017, USA.

The document ANSI/IEEE Std 754-1985, entitled "IEEE Standard for Binary Floating-Point Arithmetic," was also published in ACM SIGPLAN Notices 22(2), pp. 9 - 25, Feb. 1987.

The international version of the standard is Binary floating-point arithmetic for microprocessor systems, second edition (IEC 559:1989).

Information on HP-UX programming languages and tools is available in both online and hardcopy format. The following online guides are available through the HP Help System if you have the relevant compilers or tools:

  • HP FORTRAN/9000 Online Reference

  • HP C Online Reference

  • HP C++ Online Programmer's Guide

  • HP-UX Linker and Libraries Online User Guide

  • HP DDE Debugger Online User's Guide

  • HP Puma Online User's Guide

You may also refer to the following hardcopy documents:

  • HP-UX 64-bit Porting and Transition Guide (5966-9844) describes the changes needed to compile, link, and run programs in 64-bit mode on HP-UX Release 11.0.

  • The HP Fortran 90 Programmer's Reference (B3908-90001) describes the Fortran 90 programming language on HP-UX systems.

  • The HP FORTRAN/9000 Programmer's Reference (B3906-90002) and HP FORTRAN/9000 Programmer's Guide (B3906-90001) describe the FORTRAN 77 programming language on HP-UX systems.

  • The HP C/HP-UX Reference Manual (92453-90024) and HP C Programmer's Guide (92434-90002) describe the C programming language on HP-UX systems.

  • The HP Pascal/HP-UX Reference Manual (92431-90005) and HP Pascal/HP-UX Programmer's Guide (92431-90006) describe the HP Pascal programming language on HP-UX systems.

  • The HP PA-RISC Compiler Optimization Technology White Paper (5964-9846E) provides detailed information about compiler optimization levels, optimization types, and specific optimizations.

  • The HP/DDE Debugger User's Guide (B3476-90015) describes the HP DDE debugger.

  • The PA-RISC 1.1 Architecture and Instruction Set Reference Manual (09740-90039) describes the PA-RISC 1.1 architecture. PA-RISC 2.0 Architecture, by Gerry Kane (Prentice-Hall, ISBN 0-13-182734-0), describes the PA-RISC 2.0 architecture.

  • The Assembly Language Reference Manual (92432-90001) describes assembly language programming on HP-UX systems. The ADB Tutorial (92432-90005) introduces the assembly language debugger.

To order manuals, call HP DIRECT at 1-800-637-7740. Outside the USA, please contact your local sales office.

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 1997 Hewlett-Packard Development Company, L.P.