All Topics  
Round-off error

 

   Email Print
   Bookmark   Link






 

Round-off error



 
 
A round-off error, also called rounding error, is the difference between the calculated approximation
Approximation

An approximation is an Accuracy and precision representation of something that is still close enough to be useful. Although approximation is most often applied to numbers, it is also frequently applied to such things as Function , shapes, and physical laws....
 of a number and its exact mathematical value. Numerical analysis
Numerical analysis

Numerical analysis is the study of algorithms for the problems of continuous mathematics .One of the earliest mathematical writings is the Babylonian tablet YBC 7289, which gives a sexagesimal numerical approximation of , the length of the diagonal in a unit square....
 specifically tries to estimate this error when using approximation equation
Equation

An equation is a mathematics Proposition, in table of mathematical symbols, that two things are exactly the same . Equations are written with an equal sign, as in...
s and/or algorithm
Algorithm

In mathematics, computing, linguistics and related subjects, an algorithm is a sequence of finite instructions, often used for calculation and data processing....
s, especially when using finite digits to represent infinite digits of real numbers. This is a form of quantization error
Quantization error

The difference between the actual analog value and quantized digital value due is called quantization error. This error is due either to rounding or truncation....
.

error introduced by attempting to represent a number on the computer is called representation error.






Discussion
Ask a question about 'Round-off error'
Start a new discussion about 'Round-off error'
Answer questions from other users
Full Discussion Forum



Encyclopedia


A round-off error, also called rounding error, is the difference between the calculated approximation
Approximation

An approximation is an Accuracy and precision representation of something that is still close enough to be useful. Although approximation is most often applied to numbers, it is also frequently applied to such things as Function , shapes, and physical laws....
 of a number and its exact mathematical value. Numerical analysis
Numerical analysis

Numerical analysis is the study of algorithms for the problems of continuous mathematics .One of the earliest mathematical writings is the Babylonian tablet YBC 7289, which gives a sexagesimal numerical approximation of , the length of the diagonal in a unit square....
 specifically tries to estimate this error when using approximation equation
Equation

An equation is a mathematics Proposition, in table of mathematical symbols, that two things are exactly the same . Equations are written with an equal sign, as in...
s and/or algorithm
Algorithm

In mathematics, computing, linguistics and related subjects, an algorithm is a sequence of finite instructions, often used for calculation and data processing....
s, especially when using finite digits to represent infinite digits of real numbers. This is a form of quantization error
Quantization error

The difference between the actual analog value and quantized digital value due is called quantization error. This error is due either to rounding or truncation....
.

Representation error

The error introduced by attempting to represent a number on the computer is called representation error. Some examples:


Notation
Represent
Approximate
Error
1/7
0.142 857
0.142 857
0.000 000 142 857
ln 2
Natural logarithm

The natural logarithm, formerly known as the hyperbolic logarithm, is the logarithm to the base e , where e is an irrational number constant approximately equal to 2.718281828....

0.693 147 180 559 945 309 41...  
0.693 147
0.000 000 180 559 945 309 41...
log10 2
Logarithm

In mathematics, the logarithm of a number to a given base is the Power or exponent to which the base must be raised in order to produce the number....

0.301 029 995 663 981 195 21...  
0.3010
0.000 029 995 663 981 195 21...
 2 
Cube root

In mathematics, a cube root of a number, denoted or x1/3, is a number a such that a3 = x. All real numbers have exactly one real number cube root and a pair of complex conjugate roots, and all nonzero complex numbers have three distinct complex cube roots....

1.259 921 049 894 873 164 76...  
1.25992
0.000 001 049 894 873 164 76...
v 2 
Square root

In mathematics, a square root of a number x is a number r such that r2 = x, or, in other words, a number r whose square is x....

1.414 213 562 373 095 048 80...  
1.41421
0.000 003 562 373 095 048 80...
e
E (mathematical constant)

The mathematical constant e is the unique real number such that the function ex has the same value as the derivative, for all values of x....

2.718 281 828 459 045 235 36...  
2.718 281 828 459 045  
0.000 000 000 000 000 235 36...
p
Pi

Pi or p is a mathematical constant whose value is the ratio of any circle's circumference to its diameter in Euclidean geometry; this is the same value as the ratio of a circle's area to the square of its radius....

3.141 592 653 589 793 238 46...  
3.141 592 653 589 793
0.000 000 000 000 000 238 46...
Increasing the number of digits allowed in a representation reduces the magnitude of possible roundoff errors, but any representation limited to finitely many digits will still cause some degree of roundoff error for uncountably many real numbers. This kind of error is unavoidable for conventional representations of numbers, but can be reduced by the use of guard digits.

Double-rounding can increase the round-off error. For example, if the numeral 9.945309 is rounded to two decimal places (9.95) for data entry purposes, and then rounded again to one decimal place (10.0) for display purposes, the apparent round-off error is 0.054691. If the original number was rounded to one decimal place in one step (9.9), the round-off error is only 0.045309.

There are five standard ways of performing the rounding in IEEE standard arithmetic:
  • truncation
    Truncation

    In mathematics, truncation is the term for limiting the number of numerical digits right of the decimal point, by discarding the least significant ones....
    : simply chop off the remaining digits; also called rounding to zero.
0.142857 ˜ 0.142 (dropping all significant digits after 3rd)
  • round to nearest
    Rounding

    Rounding involves reducing the number of significant digits in a number. The result of rounding is a "shorter" number having fewer non-zero digits yet similar in magnitude....
    : round to the nearest value, with ties broken in one of two ways. The result may round up or round down.
0.142857 ˜ 0.143 (rounding the 4th significant digit. This is rounded up because )
0.142857 ˜ 0.14 (rounding the 3rd significant digit. This is rounded down because )
  • round to -8: always round to the left on the number line
    Number line

    In mathematics, a number line is a picture of a straight line on which every point corresponds to a real number and every real number to a point....
  • round to 8: always round to the right on the number line


See also

Precision (arithmetic)
Precision (arithmetic)

The precision of a value describes the number of numerical digits that are used to express that value. In a scientific setting this would be the total number of digits or, less commonly, the number of fractional digits or decimal places ....
Truncation
Truncation

In mathematics, truncation is the term for limiting the number of numerical digits right of the decimal point, by discarding the least significant ones....
Rounding
Rounding

Rounding involves reducing the number of significant digits in a number. The result of rounding is a "shorter" number having fewer non-zero digits yet similar in magnitude....
Floating point
Floating point

In computing, floating point describes a system for numerical representation in which a String of digits represents a rational number.The term floating point refers to the fact that the radix point can "float": that is, it can be placed anywhere relative to the Significant figures of the number....
Machine epsilon
Machine epsilon

In floating point arithmetic, the machine epsilon is, for a particular floating point unit, the difference between 1 and the smallest exactly representable number greater than one....
Wilkinson's polynomial
Wilkinson's polynomial

In numerical analysis, Wilkinson's polynomial is a specific polynomial which was used by James H. Wilkinson in 1963 to illustrate a difficulty when root-finding algorithm of a polynomial: the location of the roots can be very sensitive to perturbations in the coefficients of the polynomial....