ArticleslgStudy

science

Round-off error

Round-off error is a science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Round-off error rather than just read about it. In short: In computing, a roundoff error, also called rounding error, is the difference between the result produced by a given algorithm using exact arithmetic and the result produced by the same algorithm using finite-precision, rounded arithmetic. Rounding errors are due to inexactness in the representation of real numbers and the arithmetic operations done with them.

Key takeaways

  • Round-off error belongs to science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Round-off error to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Round-off error from memory before moving on to harder problems.

Reference excerpt

In computing, a roundoff error, also called rounding error, is the difference between the result produced by a given algorithm using exact arithmetic and the result produced by the same algorithm using finite-precision, rounded arithmetic. Rounding errors are due to inexactness in the representation of real numbers and the arithmetic operations done with them. This is a form of quantization error. When using approximation equations or algorithms, especially when using finitely many digits to represent real numbers (which in theory have infinitely many digits), one of the goals of numerical analysis is to estimate computation errors. Computation errors, also called numerical errors, include both truncation errors and roundoff errors. When a sequence of calculations with an input involving any roundoff error are made, errors may accumulate, sometimes dominating the calculation. In ill-conditioned problems, significant error may accumulate. In short, there are two major facets of roundoff errors involved in numerical calculations:

The ability of computers to represent both magnitude and precision of numbers is inherently limited. Certain numerical manipulations are highly sensitive to roundoff errors. This can result from both mathematical considerations as well as from the way in which computers perform arithmetic operations.

Representation error The error introduced by attempting to represent a number using a finite string of digits is a form of roundoff error called representation error. Here are some examples of representation error in decimal representations:

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. Additional digits used for intermediary steps of a calculation are known as guard digits. Rounding multiple times can cause error to accumulate. For example, if 9.945309 is rounded to two decimal places (9.95), then rounded again to one decimal place (10.0), the total error is 0.054691. Rounding 9.945309 to one decimal place (9.9) in a single step introduces less error (0.045309). This can occur, for example, when software performs arithmetic in x86 80-bit floating-point and then rounds the result to IEEE 754 binary64 floating-point.

Floating-point number system Compared with the fixed-point number system, the floating-point number system is more efficient in representing real numbers so it is widely used in modern computers. While the real numbers R {\displaystyle \mathbb {R} } are infinite and continuous, a floating-point number system F {\displaystyle F} is finite and discrete. Thus, representation error, which leads to roundoff error, occurs under the floating-point number system.

Notation of floating-point number system A floating-point number system F {\displaystyle F} is characterized by 4 {\displaystyle 4} integers:

β {\displaystyle \beta } : base or radix

p {\displaystyle p} : precision

[ L , U ] {\displaystyle [L,U]} : exponent range, where L {\displaystyle L} is the lower bound and U {\displaystyle U} is the upper bound Any x ∈ F {\displaystyle x\in F} has the following form:

x = ± ( d 0 . d 1 d 2 … d p − 1 ⏟ significand ) β × β E ⏞ exponent = ± d 0 × β E + d 1 × β E − 1 + … + d p − 1 × β E − ( p − 1 ) {\displaystyle x=\pm (\underbrace {d_{0}.d_{1}d_{2}\ldots d_{p-1}} _{\text{significand}})_{\beta }\times \beta ^{\overbrace {E} ^{\text{exponent}}}=\pm d_{0}\times \beta ^{E}+d_{1}\times \beta ^{E-1}+\ldots +d_{p-1}\times \beta ^{E-(p-1)}}

where d i {\displaystyle d_{i}} is an integer such that 0 ≤ d i ≤ β − 1 {\displaystyle 0\leq d_{i}\leq \beta -1} for i = 0 , 1 , … , p − 1 {\displaystyle i=0,1,\ldots ,p-1} , and E {\displaystyle E} is an integer such that L ≤ E ≤ U {\displaystyle L\leq E\leq U} .

… excerpt ends here. Continue reading the full article.

Worked examples

Example 1 — a first encounter with Round-off error

Start with the simplest possible case. Write down what Round-off error claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Round-off error before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Round-off error ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Round-off error

In research
Round-off error appears in science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Round-off error in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Round-off error is common in secondary-school and first-year university syllabi. It links to neighbouring topics Numerical analysis, so understanding it makes those chapters shorter.
In everyday life
Look for Round-off error outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study Round-off error in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Round-off error means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Round-off error out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Round-off error in simple terms?

In computing, a roundoff error, also called rounding error, is the difference between the result produced by a given algorithm using exact arithmetic and the result produced by the same algorithm using finite-precision, rounded arithmetic. Rounding errors are due to inexactness in the representatio…

Why does Round-off error matter?

Because it connects several science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Round-off error?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Round-off error.

Tags

  • Numerical analysis

Keep exploring