| United States-English |
|
|
|
![]() |
HP-UX Floating-Point Guide: HP 9000 Computers > Chapter 1 IntroductionOverview of Floating-Point Principles |
|
In the context of computer programming, the term floating-point refers to the ways in which modern computer systems represent real numbers and perform real arithmetic. Computers use special representations for floating-point numbers. They also have special rules for performing floating-point arithmetic that differ from the rules for performing integer arithmetic. Usually, a computer has special hardware for performing floating-point calculations at a higher speed than would be possible using the computer's integer-oriented hardware. In all modern computer systems, representations of real numbers are inherently inexact. There are an infinite number of real numbers, and a digital computer can represent only a finite subset of them. When you write a program that attempts to generate an unrepresentable value, the computer approximates the value by choosing a representable value close to the one you attempted to generate. Data that is input into a computer in floating-point format is almost always approximate, and the calculations performed by the computer are usually approximations of the intended mathematical operations; therefore, the results you receive from a mathematical computation are also usually approximations. The approximate nature of floating-point arithmetic has several important ramifications:
The types of incorrect results and unexpected errors that floating-point applications sometimes generate can be very difficult to interpret if you do not understand how your computer performs floating-point arithmetic. The purpose of this book is to help you avoid or fix these types of problems on HP 9000 computer systems and to help you increase the performance of your floating-point-intensive applications. |
||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||