Approximations: rounding and truncation
There are many times when computations are done with approximations to numbers, sometimes by choice, sometimes because there is no other way. In this module we look at two ways of approximating numbers: rounding and truncation.
These pages can also be downloaded as a (non interactive) PDF file from here.
Truncation is a method of approximating numbers. It is easier than rounding, but does not always give the best approximation to the original number. Truncation is used in computing when division is done with integers and the answer must be an integer.
The number $e$ is $$e=2.718281828459045\dots$$
Sometimes a number is approximated by just ignoring digits. This is called truncation.
- $e$ truncated to give and integer is $2$;
- $e$ truncated to a number with $1$ decimal place is $2.7$;
- $e$ truncated to a number with $2$ decimal place is $2.71$;
- $e$ truncated to a number with $3$ decimal place is $2.718$;
- $\pi =3.14159\dots$ truncated to give an integer is $3$;
- $-\pi =-3.14159\dots$ truncated to give an integer is $-3$;
- $\pi =3.14159\dots$ truncated to give a number with $3$ decimal places is $3.141$.