section_path: Types/Approximations and errors
section_name: Approximations and errors
paragraph_text: Approximations and errors
  
  In science and engineering, numbers represent estimates of physical quantities derived from measurement or modeling. Unlike mathematically exact numbers such as π or 2 {\displaystyle {\sqrt {2}}}, scientifically relevant numerical data are inherently inexact, involving some measurement uncertainty. One basic way to express the degree of certainty about each number's value and avoid false precision is to round each measurement to a certain number of digits, called significant digits, which are implied to be accurate. For example, a person's height measured with a tape measure might only be precisely known to the nearest centimeter, so should be presented as 1.62 meters rather than 1.6217 meters. If converted to imperial units, this quantity should be rounded to 64 inches or 63.8 inches rather than 63.7795 inches, to clearly convey the precision of the measurement. When a number is written using ordinary decimal notation, leading zeros are not significant, and trailing zeros of numbers not written with a decimal point are implicitly considered to be non-significant. For example, the numbers 0.056 and 1200 each have only 2 significant digits, but the number 40.00 has 4 significant digits. Representing uncertainty using only significant digits is a relatively crude method, with some unintuitive subtleties; explicitly keeping track of an estimate or upper bound of the approximation error is a more sophisticated approach. In the example, the person's height might be represented as 1.62 ± 0.005 meters or 63.8 ± 0.2 inches.
  
  In performing calculations with uncertain quantities, the uncertainty should be propagated to calculated quantities. When adding or subtracting two or more quantities, add the absolute uncertainties of each summand together to obtain the absolute uncertainty of the sum. When multiplying or dividing two or more quantities, add the relative uncertainties of each factor together to obtain the relative uncertainty of the product. When representing uncertainty by significant digits, uncertainty can be coarsely propagated by rounding the result of adding or subtracting two or more quantities to the leftmost last significant decimal place among the summands, and by rounding the result of multiplying or dividing two or more quantities to the least number of significant digits among the factors. (See Significant figures § Arithmetic.)
  
  More sophisticated methods of dealing with uncertain values include interval arithmetic and affine arithmetic. Interval arithmetic describes operations on intervals. Intervals can be used to represent a range of values if one does not know the precise magnitude, for example, because of measurement errors. Interval arithmetic includes operations like addition and multiplication on intervals, as in + = {\displaystyle +=} and × = {\displaystyle \times =}. It is closely related to affine arithmetic, which aims to give more precise results by performing calculations on affine forms rather than intervals. An affine form is a number together with error terms that describe how the number may deviate from the actual magnitude.
  
  The precision of numerical quantities can be expressed uniformly using normalized scientific notation, which is also convenient for concisely representing numbers which are much larger or smaller than 1. Using scientific notation, a number is decomposed into the product of a number between 1 and 10, called the significand, and 10 raised to some integer power, called the exponent. The significand consists of the significant digits of the number, and is written as a leading digit 1–9 followed by a decimal point and a sequence of digits 0–9. For example, the normalized scientific notation of the number 8276000 is 8.276 × 10 6 {\displaystyle 8.276\times 10^{6}} with significand 8.276 and exponent 6, and the normalized scientific notation of the number 0.00735 is 7.35 × 10 − 3 {\displaystyle 7.35\times 10^{-3}} with significand 7.35 and exponent − 3. Unlike ordinary decimal notation, where trailing zeros of large numbers are implicitly considered to be non-significant, in scientific notation every digit in the significand is considered significant, and adding trailing zeros indicates higher precision. For example, while the number 1200 implicitly has only 2 significant digits, the number 1.20 × 10 3 {\displaystyle 1.20\times 10^{3}} explicitly has 3.
  
  A common method employed by computers to approximate real number arithmetic is called floating-point arithmetic. It represents real numbers similar to the scientific notation through three numbers: a significand, a base, and an exponent. The precision of the significand is limited by the number of bits allocated to represent it. If an arithmetic operation results in a number that requires more bits than are available, the computer rounds the result to the closest representable number. This leads to rounding errors. A consequence of this behavior is that certain laws of arithmetic are violated by floating-point arithmetic. For example, floating-point addition is not associative since the rounding errors introduced can depend on the order of the additions. This means that the result of (a + b) + c {\displaystyle (a+b)+c} is sometimes different from the result of a + (b + c) {\displaystyle a+(b+c)}. The most common technical standard used for floating-point arithmetic is called IEEE 754. Among other things, it determines how numbers are represented, how arithmetic operations and rounding are performed, and how errors and exceptions are handled. In cases where computation speed is not a limiting factor, it is possible to use arbitrary-precision arithmetic, for which the precision of calculations is only restricted by the computer's memory.