Browse Definitions :
Definition

truncation error

What is a truncation error?

A truncation error is the difference between an actual and a truncated, or cut-off, value. A truncated quantity is represented by a numeral with a fixed number of allowed digits, with any excess digits chopped off -- hence, the expression truncated.

Truncation error explained with Taylor series

In mathematical and computing applications, the true or analytical derivative or value of a function may be different from the value obtained by numerical approximation. The truncation error is the difference between these two values. It refers to the discrepancy that arises from executing a finite number of steps to approximate an infinite process -- a process known as discretization -- usually for ease of calculation.

Consider an infinite exponential function, ex. It may be expressed as the sum of the infinite Taylor series polynomial:

ex = 1 + (x / 1!) + (x2 / 2!) + (x3 / 3!) + ⋯ + (xn / n!) + ⋯ ∞

ex = 1 + x + (x2 / 2) + (x3 / 6) + ⋯ + (xn / n!) + ⋯ ∞

Thus, ex has an infinitely long series that can be expressed in a truncated (approximated) format:

ex = p2x +∑(xn / n!)

n = 3

Here, p2x = 1 + (x / 1!) + (x2 / 2!)

In this case, the infinite Taylor series ex is approximated by a quadratic polynomial where n = 3. This approximation gives an approximate or inaccurate answer, resulting in a truncation error.

The Taylor series is useful to represent a continuously differentiable function as a polynomial function of infinite order. Adding each of these values generates the exact answer. However, if the calculation is stopped after any finite value of n, the final value will only be an approximation of the value of ex. The difference between the exact answer and the approximate answer is the truncation error.

Reducing a truncation error

A truncation error is always present as long as a finite number of steps is used to approximate an infinite mathematical calculation process. However, it is possible to make this error as small as possible by making n as large as possible, that is, by doing repeated iterations and including as many numbers of terms in the approximation as possible. However, this may result in additional time or cost, so many numerical applications accept approximations of the exact analytical answer and the resultant truncation error.

Truncation error examples

Example 1

Consider the infinite series 1/2 + 1/4 + 1/8 + 1/16 + 1/32 and so on adds up to exactly 1. But this final value is only derived when all the values in the series are added together. If this infinite series is truncated to a finite series containing only the first four terms, the series now becomes 1/2 + 1/4 + 1/8 + 1/16. Adding these four terms does not produce 1. Rather, the value will be 15/16, or 0.94. In this case, the truncation error = 1 - 15/16 = 1/16 = 0.06.

Example 2

Consider the speed of light in a vacuum. The official value is 299,792,458 meters per second (m/s). In scientific (power-of-10) notation, it is expressed as 2.99792458 x 108 m/s. But truncating it to only two decimal places yields 2.99 x 108 m/s.

Since the truncation error is the difference between the actual value and the truncated value, in this case, it comes to the following:

2.99792458 x 108 - 2.99 x 108 = 0.00792458 x 108 m/s

Truncation error in practice

Truncation errors commonly appear in these practical applications:

  • discretizing equations
  • finite-difference approximations

1. Discretizing equations

Discretization is the conversion of a continuous function (differentiation) to a discrete approximation for numerical evaluation.

A derivative is expressed as the following:

f'(xi) = lim (f(xi+1) - f(xi)) / h

h → 0

This equation can be approximated by removing the limit and expressing it as the following:

f'(xi) ~ (f(xi+1) - f(xi)) / h

This is a type of forward difference approximation where the derivative at xi is approximated by using the value at xi and forwarding one step at xi+1. The Taylor series approximation is a type of discretized equation.

2. Finite-difference approximations

Three types of finite-difference approximations are possible: forward difference, backward difference and central difference.

In forward difference, the argument x is increased by a small amount, and each of a set of finite differences is calculated by subtracting the present value of a function f(x) from a new value. Thus, the value of the function f(x) at xi and forward one step at f(xi+1) is used to approximate the derivative at xi.

Forward difference is expressed as ∆i = f(x + i) - f(xi).

In backward difference, the argument x is changed by a small negative amount, and each of a set of finite differences is calculated by subtracting a previous value of the function f(x) from the present value. Thus, it uses the value of the function f(x) at xi and backward one step at f(xi-1) to approximate the value of the derivative at xi.

Backward difference is expressed as ∇i = f(i) - f(x - i).

Central difference uses the value of f(x) one step backward at f(xi-1) and one step forward f(xi+1) to approximate the derivative at xi. The finite difference is calculated by subtracting the value of a function when x is decreased by a given amount from its value and also increased by the same amount.

Central difference is expressed as δ = f(x + ½h) - f(x - ½h).

Although the central difference method also creates a truncation error, the magnitude of this error is smaller than the forward or backward difference methods. That's why central difference is a more accurate approximation method than forward or backward difference.

Truncation error and rounding error

In mathematics and computing, a truncation error is not the only source of error. When numerically solving initial-value problems using difference formats, a rounding error can also occur. This refers to the difference between a rounded-off numerical value and its actual value.

If a numerical problem consists of multiple steps and values are rounded off at each step, the rounding error in each may be small. However, as the number of steps increases, the sum of the rounding error accumulates with each step, and the final error may be quite large, resulting in unstable numerical results.

Truncation errors and rounding errors may be the same, or they may be two different types of errors in numerical and computing calculations. The sum of the truncation error and roundoff error is known as the total numerical error. Reducing the step size can reduce the truncation error and thus the total error. However, doing so can also increase the rounding error. That's why it's best to reduce the step size just enough so that the truncation error is reduced to an acceptable level without increasing the rounding error by a large amount.

See also: mathematical symbols.

This was last updated in August 2022

Continue Reading About truncation error

SearchNetworking
  • network packet

    A network packet is a basic unit of data that's grouped together and transferred over a computer network, typically a ...

  • virtual network functions (VNFs)

    Virtual network functions (VNFs) are virtualized tasks formerly carried out by proprietary, dedicated hardware.

  • network functions virtualization (NFV)

    Network functions virtualization (NFV) is a network architecture model designed to virtualize network services that have ...

SearchSecurity
  • Domain-based Message Authentication, Reporting and Conformance (DMARC)

    The Domain-based Message Authentication, Reporting and Conformance (DMARC) protocol is one leg of the tripod of internet ...

  • data breach

    A data breach is a cyber attack in which sensitive, confidential or otherwise protected data has been accessed or disclosed in an...

  • insider threat

    An insider threat is a category of risk posed by those who have access to an organization's physical or digital assets.

SearchCIO
  • data privacy (information privacy)

    Data privacy, also called information privacy, is an aspect of data protection that addresses the proper storage, access, ...

  • leadership skills

    Leadership skills are the strengths and abilities individuals demonstrate that help to oversee processes, guide initiatives and ...

  • data governance policy

    A data governance policy is a documented set of guidelines for ensuring that an organization's data and information assets are ...

SearchHRSoftware
SearchCustomerExperience
  • recommerce

    Recommerce is the selling of previously owned items through online marketplaces to buyers who reuse, recycle or resell them.

  • implementation

    Implementation is the execution or practice of a plan, a method or any design, idea, model, specification, standard or policy for...

  • first call resolution (FCR)

    First call resolution (FCR) is when customer service agents properly address a customer's needs the first time they call.

Close