Rounding
The title of this article is ambiguous. For rounding in a linguistic sense, see rounding (phonetics).
Rounding, or rounding, is the replacement of a number with an approximate value that has desired properties that the original number lacks.
You round up to
- Make numbers with decimal places easier to read;
- to respect the limited number of representable digits (also for floating point numbers);
- to specify the value of irrational numbers at least approximately, such as the circular number π ;
- to account for the accuracy of a result and thereby avoid spurious accuracy; for this purpose, not only decimal places are rounded, but also large integers without shortening the presentation. For example, the Federal Employment Agency rounds the calculated number of unemployed to a full 100. Here, the number of digits presented remains unchanged, but the last two digits are indicated as not significant;
- to adapt a given number to the unit that can be represented or is to be used. Examples are the smallest coin for cash, the smallest arithmetical currency unit for book money, whole grams for kitchen scales, whole mandates for seat allocation procedures for proportional representation.
If a positive number is increased, one speaks of "rounding up"; if it is decreased, of "rounding down". For negative numbers, these words are ambiguous. If decimal places are only omitted, one speaks of "truncate".
The sign "approximately equal" ( ≈ ) may indicate that the following number is rounded. It was introduced in 1892 by Alfred George Greenhill.
Dealing with rounded numbers
Rounding already rounded numbers
If the initial number is already the result of a rounding, then for the limiting case that the new rounding digit is 5 (and all digits after that are zeros), the unrounded number must be used if possible (for example, for mathematical constants):
- unrounded number known: 13.374999747, rounded initial number: 13.3750
→ Rounding the unrounded number to two decimal places results in: 13.37
- unrounded number unknown, rounded initial number: 13.3750
→ Rounding the previously rounded number to two decimal places gives: 13.38.
Marking of rounding results
In scientific papers and log tables, it is sometimes indicated whether the last digit was obtained by rounding up or down. A digit obtained by rounding up is indicated by a line below (or above) the digit, a digit that has not been changed by rounding (i.e. the number has been rounded down) is indicated by a dot above the digit.
Examples:
- becomes ; this number becomes when rounded again. So when rounding again (to three decimal places in the example), round down.
- becomes ; this number becomes when rounded again.} , more clearly . So when rounding again (to three decimal places in the example), round up. For further rounding (here to two places), round down, indicated by 5.
If no further digits are known, the initial number is assumed to be exact.
Calculating with rounded numbers
If rounded numbers are included in a calculation, the final result must be rounded to the same number of significant digits. For example, if a force of 12.2 Newtons is measured, then all final results that depend on that force must be rounded to leave a maximum of three significant digits. In this way, the reader is not led to believe that the accuracy is higher than it really is.
Rounding rules formal
Especially the commercial rounding is explained in such a way that even children understand it. For this you only need to know prices of goods and salaries in the comma notation. Even in the chapter "Elementary mathematics" of the pocket book of mathematics by Bronstein/Semendyaev somewhat more complicated rules of rounding are formulated without the help of deeper mathematical expressions, but accompanied by mathematical explanations. In the present section some of these and some other mathematical points of view are discussed.
Finite and infinite digit sequences
Bronstein/Semendyaev discuss rounding down or up using formal number words - strings in a (decimal) place value system, not to be confused with word type. Positive decimal fractions (in the strict sense, ) can be written as.
(or vice versa). Here there are digits before the decimal point (general separator) and digits after. are from the digit set {0,1
,2
,3,4,5,6,7
,8
,9}
.
Other positive real numbers can be approximated arbitrarily precisely by decimal fractions (as approximations), cf. representations of various types of numbers and decimal fraction expansion. The coefficients of the decimal fraction expansion
of such a number result in an infinitely long sequence of digits . Here, in each case, the number is the digit value of - 0
has the digit value , 1 has
digit value etc. Using
the sequence of approximations is monotonically increasing and upper bounded by Even more, the truncation error approaches 0, hence converges to . If
in each case the string representing , then for the string a prefix of the string , of the infinitely long string representing - casually - it is something similar, Bronstein/Semendjajew informally calling it an "initial piece" of the latter. The same as for can be said of (comma and decimal places missing).
However, the statements about and are also true if is representable by a finite string with decimal places In this case, for , the coefficients and the digits are 0
. This approach is also useful for formulating rounding rules.
For negative numbers, the same applies, preceded by a minus sign, and so on. (the sequence of approximate values falls...).
With other digit sets and other criteria for representability by finite strings, the preceding also applies to place value systems to other bases instead of 10. The base 10 is commonplace unless you are (professionally) involved in implementing rounding in computers, where powers of 2 serve as bases.
The ever-popular dot notation is to be understood formally as defined recursively as follows ( stands for the concatenation of strings, ε for the empty string):
"Cut off"/"Cancel
Truncate or cancel/abort after the -th decimal place of a number of which decimal places are known, means to replace the "number word" by as an "approximation", in the notation used above for this purpose by . Thus, one uses a prefix or "initial piece" of a more precise string. The case is practically present, for example, if one determines the first digits after the decimal point and no further digits for a number that cannot be represented with a finite number of digits - in this case, however, the number represented by rather an approximation for . For mathematical rounding to the -th decimal place, however, knowledge of (at least) is required.
The abort of a number with decimal places - e.g. calculated from measured values or read from the measuring device - decimal places can be useful when calculating with rounded numbers, or if you know that the device displays decimal places, but can only reliably measure of them.
Round up
The Gaussian bracket :, also called the Gaussian, integer, or round-off function, maps any real number to the largest integer that is not greater than the real number.
Corollaries:
- The Gaussian function does not change sign, but can map a positive number to zero.
- For positive numbers in place notation, the application of the Gaussian function is identical to truncating the decimal places (including the decimal point).
- For any negative non-integer, the magnitude of the function value is greater than the magnitude of the input number.
To round a positive non-integer in place notation so that only the -th decimal place is retained (rounding it to the -th place after the decimal point), one simply truncates the other decimal places. In the decimal system, using the Gaussian bracket, the decimal place derived from is rounded to the -th decimal place
.
Round up
The counterpart to the Gaussian bracket function is the round-up function (also called upper Gaussian bracket), which adds to a real number the integer
to the b {\displaystyle b}. The value of a positive real number x to the -th decimal place of a positive real number is ⌈ .
Questions and Answers
Q: What does the word "rounding" mean?
A: Rounding is replacing a numerical value with another value that is approximately equal but has a shorter, simpler, or more explicit form.
Q: What is an example of rounding?
A: An example of rounding would be US$23.74 being rounded to US$24, the fraction 312/937 being rounded to 1/3, and the expression 2 {\displaystyle {\sqrt {2}}} being rounded to 1.41.
Q: Why do we round numbers?
A: We round numbers in order to obtain a value that is easier to write and handle than the original. It may also be done to indicate the accuracy of a computed number.
Q: What are some potential issues with rounding?
A: Rounding can introduce some round-off error as a result and in certain cases it may make the result meaningless due to errors accumulating over time in calculations. Additionally, accurate rounding of transcendental mathematical functions can be difficult because it's not possible to know how many extra digits need to be calculated for resolving whether to round up or down beforehand.
Q: How does rounding relate to quantization?
A: Rounding has many similarities with quantization which occurs when physical quantities must be encoded by numbers or digital signals.