In mathematics and computer science, truncation is limiting the number of digits right of the decimal point.
Floor and ceiling functions
Truncation of positive real numbers can be done using the floor function. Given a number to be truncated and , the number of elements to be kept behind the decimal point, the truncated value of x is
However, for negative numbers truncation does not round in the same direction as the floor function: truncation always rounds toward zero, the floor function rounds towards negative infinity. For a given number , the function ceil is used instead.
In some cases trunc(x,0) is written as [x]. See Notation of floor and ceiling functions.
With computers, truncation can occur when a decimal number is typecast as an integer; it is truncated to zero decimal digits because integers cannot store non-integer real numbers.
An analogue of truncation can be applied to polynomials. In this case, the truncation of a polynomial P to degree n can be defined as the sum of all terms of P of degree n or less. Polynomial truncations arise in the study of Taylor polynomials, for example.
This page is automatically generated and may contain information that is not correct, complete, up-to-date, or relevant to your search query. The same applies to every other page on this website. Please make sure to verify the information with EPFL's official sources.
Significant figures (also known as the significant digits, precision or resolution) of a number in positional notation are digits in the number that are reliable and necessary to indicate the quantity of something. If a number expressing the result of a measurement (e.g., length, pressure, volume, or mass) has more digits than the number of digits allowed by the measurement resolution, then only as many digits as allowed by the measurement resolution are reliable, and so only these can be significant figures.
In mathematics, a real number is a number that can be used to measure a continuous one-dimensional quantity such as a distance, duration or temperature. Here, continuous means that pairs of values can have arbitrarily small differences. Every real number can be almost uniquely represented by an infinite decimal expansion. The real numbers are fundamental in calculus (and more generally in all mathematics), in particular by their role in the classical definitions of limits, continuity and derivatives.
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.