Rounding
Encyclopedia
|
| Tutorials | Encyclopedia | Dictionary | Directory |
|
Rounding
Rounding is the process of reducing the number of significant digits in a number. The result of rounding is a "shorter" number having fewer non-zero digits yet similar in magnitude. The result is less precise but easier to use. For example: 73 rounded to the nearest ten is 70, because 73 is closer to 70 than to 80. Rounding can be analyzed as a form of quantization. There are many different rules that can be followed when rounding. Some of the more popular are described below.
Common methodThis method is commonly used in mathematical applications, for example in accounting. It is the one generally taught in elementary mathematics classes. This method is also known as Symmetric Arithmetic Rounding or Round-Half-Up (Symmetric Implementation)
Examples:
For negative numbers the absolute value is rounded and the sign is added back afterwards. Examples:
Round-to-even methodThis method is also known as unbiased rounding, convergent rounding, statistician's rounding, Dutch rounding, Gaussian rounding, or bankers' rounding. It is identical to the common method of rounding except when the digit(s) following the rounding digit starts with a five and has no non-zero digits after it. The new algorithm is:
With all rounding schemes there are two possible outcomes: increasing the rounding digit by one or leaving it alone. With traditional rounding, if the number has a value less than the half-way mark between the possible outcomes, it is rounded down; if the number has a value exactly half-way or greater than half-way between the possible outcomes, it is rounded up. The round-to-even method is the same except that numbers exactly half-way between the possible outcomes are sometimes rounded up—sometimes down. Although it is customary to round the number 4.5 up to 5, in fact 4.5 is no nearer to 5 than it is to 4 (it is 0.5 away from both). When dealing with large sets of scientific or statistical data, where trends are important, traditional rounding on average biases the data upwards slightly. Over a large set of data, or when many subsequent rounding operations are performed as in digital signal processing, the round-to-even rule tends to reduce the total rounding error, with (on average) an equal portion of numbers rounding up as rounding down. This generally reduces upwards skewing of the result. Round-to-even is used rather than round-to-odd as it reduces rounding to a final digit of 5, and so reduces the likelihood of error resulting from double rounding. Examples:
HistoryThe Round-to-even method has been the ASTM (E-29) standard since 1940. The origin of the terms unbiased rounding and statistician's rounding are fairly self-explanatory. In the 1906 4th edition of Probability and Theory of Errors http://historical.library.cornell.edu/cgi-bin/cul.math/docviewer?did=05170001&view=50&frames=0&seq=48 Robert Woodward called this "the computer's rule" indicating that it was then in common use by human computers who calculated mathematical tables. Churchill Eisenhart's 1947 paper "Effects of Rounding or Grouping Data" (in Selected Techniques of Statistical Analysis, McGrawHill, 1947, Eisenhart, Hastay, and Wallis, editors) indicated that the practice was already "well established" in data analysis. The origin of the term bankers' rounding is more obscure. If this rounding method was ever a standard in banking, the evidence has proved extremely difficult to find. To the contrary, section 2 of the European Commission report The Introduction of the Euro and the Rounding of Currency Amounts http://ec.europa.eu/economy_finance/publications/publication1224_en.pdf suggests that there had previously been no standard approach to rounding in banking. Other methods of roundingOther methods of rounding exist, but use is mostly restricted to computers and calculators, statistics and science. In computers and calculators, these methods are used for one of two reasons: speed of computation or usefulness in certain computer algorithms. In statistics and science, the primary use of alternate rounding schemes is to reduce bias, rounding error and drift?these are similar to round-to-even rounding. They make a statistical or scientific calculation more accurate. Ease of computationOther methods of rounding include "round towards zero" (also known as truncation) and "round away from zero". These introduce more round-off error and therefore are rarely used in statistics and science; they are still used in computer algorithms because they are slightly easier and faster to compute. Two specialized methods used in mathematics and computer science are the floor (always round down to the nearest integer) and ceiling (always round up to the nearest integer). Statistical accuracyStochastic rounding is a method that rounds to the nearest integer, but when the two integers are equidistant (e.g., 3.5), then it is rounded up with probability 0.5 and down with probability 0.5. This reduces any drift, but adds randomness to the process. Thus, if you perform a calculation with stochastic rounding twice, you may not end up with the same answer. The motivation is similar to statistician's rounding. Rounding in an exact computationThe objective of rounding is often to get a number that is easier to use, at the cost of making it less precise. However, for evaluating a function with a discrete domain and range, rounding may be involved in an exact computation, e.g. to find the number of Sundays between two dates, or to compute a Fibonacci number. In such cases the algorithm can typically be set up such that computational rounding errors before the explicit rounding do not affect the outcome of the latter. For example, if an integer divided by 7 is rounded to an integer, a computational rounding error up to 1/14 in the division (which is much more than is possible in typical cases) does not affect the outcome. In the case of rounding down an integer divided by 7 this is not the case, but it applies e.g. if the number to be rounded down is an integer plus 1/2, divided by 7. Round functions in programming languages
The Round() function is not implemented in a consistent fashion among different Microsoft products for historical reasons.
Negative zero in meteorologyIn meteorology, temperatures between 0.0 and ?0.5 degrees (exclusive) may be rounded to ?0 to indicate a temperature which is below zero, but not cold enough to be rounded to ?1 or less. It is used especially in the Celsius scale, where below zero indicates freezing. It may be used, for example, to allow tallying of below-zero days. See alsoExternal links
ca:Arrodoniment cs:Zaokrouhlení da:Afrunding de:Rundung es:Redondeo fr:Arrondi ko:??? it:Arrotondamento he:????? (?????) nl:Afronden ja:???? no:Avrunding pl:Zaokr?glanie pt:Arredondamento ru:?????????? sl:Zaokro?anje sv:Avrundning zh:?????? Source: Wikipedia | The above article is available under the GNU FDL. | Edit this article
|
|
top
©2008-2009 TutorGig.com. All Rights Reserved. Privacy Statement