The IEEE 754 standard, mentioned in section 3.2.4, does not only declare the way a floating point number is stored, it also gives a standard for the accuracy of operations such as addition, subtraction, multiplication, division. What are the error and relative error if there had been one? The number in this example had no exponent part. The error is in the 4th digit: if thenĮxercise. The number has a representation that depends on whether we round or truncate. Let us consider an example in decimal arithmetic, that is, and with a 3-digit mantissa. If is a bound on the error, we will write Often we are only interested in bounds on the error. Often we are not interested in the sign of the error, so we may apply the terms error and relative error to and respectively. If is a number and its representation in the computer, we call the representation error or absolute representation error, and the relative representation error. That can be represented exactly, and those close by that can not be. We start by analyzing the error between numbers Thus, looking at the implementation of an algorithm, we need to analyze the effect of such small errors propagating through the computation. By contrast, the case that the result of a computation between computer numbers (even something as simpleĪs a single addition) is not representable is very common. Numbers that are too large or too small to be represented are uncommon: usually computations can be arranged so that this situation will not occur. This is commonly called round-off error analysis. Represented, and what it means for the accuracy of computations. In this section we will study the phenomenon that most real numbers can not be The fact that floating point numbers can only represent a small fraction of all real numbers, means that in practical circumstances a computation will hardly ever be exact.
0 Comments
Leave a Reply. |