Rounding

from Wikipedia, the free encyclopedia

The rounding or the rounds is the replacement of a number by a proxy , the desired properties, which are missing the original number.

One rounds to

  • Make numbers with decimal places easier to read;
  • to adhere to the limited number of representable digits (also with floating point numbers );
  • to indicate the value of irrational numbers at least approximately, such as the circle number ;
  • to take into account the accuracy of a result and thereby avoid fictitious accuracy ; not only are decimal places rounded, but also large whole numbers without shortening the representation. For example, the Federal Employment Agency rounds the calculated number of unemployed to a full 100. Here, the number of digits shown 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 used . Examples are the smallest coin for cash, the smallest arithmetical currency unit for book money, whole grams for kitchen scales, and entire mandates for proportional representation for seat allocation procedures .

If a positive number is increased, one speaks of "rounding up"; if it is made smaller, “round off”. In the case of negative numbers, these words are ambiguous. If only decimal places are left out, one speaks of "cut off".

The "approximately equal" (  ) sign  can indicate that the following number is rounded. It was introduced by Alfred George Greenhill in 1892 .

Rounding rules

Commercial rounding

The Commercial rounds (not negative numbers) is as follows:

  • If the number in the first decimal place is 0, 1, 2, 3 or 4, then it is rounded down.
  • If the number in the first decimal place is a 5, 6, 7, 8 or 9, then it is rounded up.

This rounding rule is described by the DIN 1333 standard . Rounding is often taught in elementary school.

Examples (rounding to two decimal places):

  • 13.3749 ... € ≈ 13.37 €
  • 13.3750 ... € ≈ 13.38 €

Negative numbers are according to their magnitude rounded, at a 5 to say away from zero ( engl : Away from Zero ):

  • −13.3749 ... € ≈ −13.37 €
  • −13.3750 ... € ≈ −13.38 €

The Commercial rounds is partially in the legal environment as Civil rounds called and z. B. in Section 14 of the Civil Service Pension Act as follows:

"The pension rate is to be calculated to two decimal places. The second decimal place must be increased by one if one of the digits five to nine would remain in the third place. "

Symmetrical rounding

Commercial and symmetrical rounding differ from each other only in where a number is rounded exactly in the middle between two numbers with the selected number of decimal digits.

The symmetrical (or geodetic, mathematical, undistorted, scientific ) rounding is defined as follows (formulation adapted):

  1. If the number in the first decimal place is 0, 1, 2, 3 or 4, it is rounded down.
  2. If the number is a 5 (followed by further numbers that are not all zero), 6, 7, 8 or 9 in the first decimal place, it is rounded up.
  3. If the digit in the first decimal place to be omitted is only a 5 (or a 5 followed by only zeros), it is rounded off in such a way that the last digit to be retained is even.

This type of rounding is used in numerical math , engineering, and technology. It is provided in the IEEE-754 standard for calculating with binary floating point numbers in computers. In English literature it is called Round to Even or Banker's Rounding .

Examples (rounding to one decimal place):

  • 2.2499 ≈ 2.2 (according to rule 1)
  • 2.2501 ≈ 2.3 (according to rule 2)
  • 2.2500 ≈ 2.2 (rounded to an even number according to rule 3)
  • 2.3500 ≈ 2.4 (rounded to an even number according to rule 3)

The commercial rounding creates small systematic errors, since rounding up by 0.5 occurs, but rounding down by 0.5 never occurs; this can skew statistics slightly. The mathematical rounding always rounds up or down from the exact middle between two digits to the next even digit. As a result, the average is rounded up and down roughly as often, at least if the original numbers are stochastic . (Counterexample: if small numbers are more common than large ones, they can systematically be rounded down more often than up, see Benford's law .)

Sum preserving rounding

In the case of sum-preserving rounding, the addends are rounded so that their sum is equal to the rounded sum of the addends. It may be necessary to round some summands away from the nearest rounded value to the opposite value.

Important applications are the allocation of seats in proportional representation and the allocation of the entire VAT in an invoice to its individual items.

The case that all summands are positive has been thoroughly researched, see seat allocation procedure .

The Hare-Niemeyer method there can be generalized for summands with both signs : All numbers are rounded to the nearest round numbers, and as long as the sum is too large (or too small), one of the rounded up (or rounded) numbers is chosen the one with the greatest rounding up (or the greatest amount of rounding down) and changes its rounding in the opposite direction. This makes the sum of the amounts of the changes minimal .

Dealing with rounded numbers

Rounding numbers that have already been rounded

If the initial number is already the result of rounding, then for the borderline case that the new rounding digit is 5 (and all digits after that zero), the unrounded number must be used if possible (e.g. with mathematical constants):

  • Unrounded number known: 13.374999747, rounded starting number: 13.3750
→ rounded number: 13.37
  • Unrounded number unknown, rounded starting number: 13.3750
→ rounded number: 13.38.

Identification of rounding results

In scientific papers and logarithm tables , it is sometimes indicated whether the last digit was obtained by rounding up or down. A number that was obtained by rounding up is indicated by a line under (or above) the number, a number that has not been changed by the rounding (the number has been rounded off) is marked with a point above the number .

Examples:

  • becomes to ; this number is the new rounds . When rounding again (in the example to three places after the decimal point), it must be rounded down.
  • becomes to ; this number becomes clearer the next time you round it to . When rounding again (in the example to three places after the decimal point), you have to round up. For further rounding (here to two places) it would be rounded down, indicated by 5 .

If no other digits are known, the starting number is assumed to be exact.

Calculate with rounded numbers

If rounded numbers are included in a calculation, the final result must be rounded to the same number of significant digits. If z. For example, if a force of 12.2 Newtons is measured, then all final results that depend on this force must be rounded so that a maximum of three significant digits remain. In this way, the reader is not pretended to be more precise than what is actually available.

Formal rounding rules

Commercial rounding in particular is explained in a way that children can understand. For this, you just have prices of goods and salaries know in the point notation. Even in the chapter "Elementary Mathematics" of the Mathematics Pocket Book by Bronstein / Semendjajew, somewhat more complicated rounding rules are formulated without the aid of deeper mathematical expressions, but accompanied by mathematical explanations. This section discusses some of these and some other mathematical considerations.

Finite and infinite sequences of digits

Bronstein / Semendjajew discuss rounding up or down on the basis of formal numerals - strings in a (decimal) place value system , not to be confused with the part of speech . Positive decimal fractions (in the strict sense, ) can be used as

written (or vice versa). There are places before the comma (general separator ) and places after. are out of the numeric stock { , , , , , , , , , }. 0123456789

Other positive real numbers can decimal fractions (as approximate) with arbitrary precision approximated will see. Representations of different types of numbers and development of decimal fractions . The coefficients of the decimal fraction expansion

Such a number then results in an infinitely long sequence of digits (interrupted by a comma or separator) . The number is the digit value of - has the digit value , has the digit value , etc. With 01

the sequence of approximate values ​​increases monotonically and is limited by upwards . Even more: the termination error tends towards 0, thus converging towards . Is

each the representing character string, so for the character string is a prefix of the character string , of the infinitely long, representing character string - casually  - it is something similar, Bronstein / Semendjajew informally call it a “ beginning part ” of the latter. The same as for can be said of (comma and decimal places are missing).

The statements about and also apply if can be represented by a finite character string with decimal places. In this case are for the coefficients and the digits . This approach is also helpful for the formulation of rounding rules. 0

For negative numbers, the same applies with a preceding minus sign , etc. (the sequence of approximate values ​​falls ...).

With different sets of digits and different criteria for the representability by finite character strings, the above also applies to place value systems to other bases instead of 10. Base 10 is commonplace if you are not (professionally) concerned with the implementation of rounding in the computer , where powers of 2 serve as bases.

The widely popular dot notation is formally defined as recursive as follows ( stands for the concatenation of character strings, for the empty character string ):

"Cut off" / "Cancel"

Truncation or abortion / abortion after the -th decimal place of a number, of which decimal places are known, means that the “numerical word” is replaced by “approximation”, in the notation used above with . So one uses a prefix or a "beginning part" of a more precise character string. This is the case , for example, when, for a number that cannot be represented with a finite number of digits, the first decimal places are determined one after the other and no further digits - in this case, however, the number represented by is an approximation for . However, knowledge of (at least) is required for mathematical rounding to the -th decimal place .

Canceling a number with decimal places - e.g. B. 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 shows decimal places, but can only measure reliably from them.

Round off

The Gaussian bracket  : also known as the Gaussian, integer or rounding function , maps every real number to the largest integer that is not greater than the real number.

Conclusions:

  • The Gaussian function does not change the sign , but can map a positive number to zero.
  • For positive numbers in digit notation, the use of the Gaussian function is identical to cutting off the decimal places (including the comma).
  • For every negative non-integer , the magnitude of the function value is greater than the magnitude of the input number.

In order to round off a positive non-integer number in digits so that only the -th decimal place is retained (it is rounded down to the -th place after the decimal point), you simply cut off the other decimal places . In the decimal system, the value rounded off to the -th decimal place using the Gaussian brackets

.

Round up

The counterpart to the Gaussian bracket function is the rounding function (also called the upper Gaussian bracket ), that of a real number is the whole number

assigns. The value of a positive real number rounded up to the -th decimal place is .

Rounding in the computer

Since floating point numbers in the computer only occupy a certain, finite memory area, the accuracy is limited by the system. After mathematical operations (such as multiplication), numbers are also usually produced that would require greater precision. In order to still be able to show the result, it must be rounded in some way so that the number fits into the intended number format (e.g. IEEE 754 ).

The simplest rounding scheme is the cutting (engl. Truncation or chopping ): A number of a particular point to the left to stand, dropped the rest. This rounds it down to the nearest possible number. For example, if you round to zero decimal places, a . This method is very fast, but it suffers from a relatively large rounding error (in the example it is ). However, clipping is an indispensable method in digital signal processing . It is the only method that can reliably prevent an unstable limit cycle due to rounding errors in digital filters .

Commercial rounding is also used as a further rounding scheme ( round-to-nearest ). Before rounding, you add to the number to be rounded and then cut off. In the example this would mean that it will be cut off . The error here is only . However, this rounding is positively distorted.

Therefore, one takes into account mathematical rounding ( English round-to-nearest-even ), which rounds to the next even number for numbers that end in. This rounding procedure is provided for in the IEEE 754 standard. Alternatively, also rounded to the nearest odd number ( English round-to-nearest-odd ).

Even though mathematical rounding performs well numerically, it still requires complete addition since the carry bit wanders through all digits of the number in the worst case. It therefore has a relatively poor runtime performance. A ready-made table that contains the rounded results, which only need to be called up, is a possible way around this problem.

Web links

Wiktionary: rounds  - explanations of meanings, word origins, synonyms, translations

Individual evidence

  1. Isaiah Lankham, Bruno Nachtergaele, Anne Schilling: Linear Algebra as an Introduction to Abstract Mathematics. World Scientific, Singapore 2016, ISBN 978-981-4730-35-8 , p. 186.
  2. Commercial rounding - What is commercial rounding? Billomat GmbH & Co. KG ( Nuremberg ), accessed on March 31, 2018 (particularly explains how to use rounded figures ).
  3. Didactics of the number areas ( Memento of the original from February 19, 2015 in the Internet Archive ) Info: The archive link was inserted automatically and not yet checked. Please check the original and archive link according to the instructions and then remove this notice. (PDF; 118 kB) University of Augsburg, C. Bescherer. @1@ 2Template: Webachiv / IABot / www.math.uni-augsburg.de
  4. ^ Ilja N. Bronstein et al .: Taschenbuch der Mathematik, ISBN 978-3808557891 .
  5. How To Implement Custom Rounding Procedures - Article 196652, Microsoft Support (2004).
  6. ^ A b J. N. Bronstein , KA Semendjajew : Taschenbuch der Mathematik . Ed .: Günter Grosche, Viktor Ziegler. 20th edition. Verlag Harri Deutsch , Thun and Frankfurt / Main 1981, ISBN 3-87144-492-8 , section 2.1. "Elementary approximation calculation" (edited by G. Grosche), Section 2.1.1.
  7. ^ A b Bronstein, Semendjajew: Taschenbuch der Mathematik . 20th edition. 1981, section 2.1.1.1. "Number representation in the position system", p. 149 .
  8. ^ A b c Bronstein, Semendjajew: Taschenbuch der Mathematik . 20th edition. 1981, section 2.1.1.2. "Termination errors and rounding rules", p. 150 .