| Duoas (6732) | |||||||
|
On a slow but regular basis I get questions and commentary about the Article I posted a while ago: http://www.cplusplus.com/forum/articles/3638 The following post exemplifies the general nature of them:
Whether or not you believe a mathematical concept does not affect its truth. Don't feel bad, though, because this particular point is confusing. And you have confused yourself more by mixing notations and value. Given your ten dots: @ @ @ @ @ | @ @ @ @ @ let's count them: 1 2 3 4 5 | 6 7 8 9 10 That's right, there are exactly ten dots. Exactly half of ten is five. If you want to do it linearly, you can do that also, but you must remember to count properly:
Linearly, halfway between zero and ten dots (the fewest I have are zero, and the most I have are ten) is five. Since you are still unsure about that, go ahead and count how many spaces there are between each number. Notice that there are exactly ten.
As part of your rethinking, you may consider that you missed a large piece of the whole point in the article. There are more than one way to round numbers. The so-called "grade school" method, or round-half-up (the one you are favoring), is a biased method and is not always useful. (It is actually less useful than people think, since it assumes something about the data being processed.) Finally, you are nit-picking me about a different rounding algorithm than the one you are considering. If you were making a comparison between the two, that would be one thing, but as you are not, then you are essentially complaining that the apple is not an orange. In the round-half-down algorithm, unlike the round-half-up algorithm, 0.5 or less rounds down and everything else rounds up. I hope I have helped explain this better to you. Good luck! | |||||||
|
|
|||||||
| hamsterman (4325) | |
|
What do they teach kids these days?.. Wait. Is Name Withheld over 100 years old? To add a pointless argument, the question whether you round 5 up or down is the question whether you round 0 up or down (to itself). The logic is that in any range of 10 numbers we want to have an equal number of ups and downs. Neither way is smarter than the other. Anyway, it was a nice article (I mean the original one). I'm glad this one reminded it. | |
|
|
|
| Duoas (6732) | |
|
Since Name Withheld posted when he went through elementary school I changed the date also. I was tempted to write 19x0, but I thought people would have just a little too much fun reading that as 2000 or 2011... (At least, I would have.) And yes, the whole point in rounding is what kind of bias is appropriate for your data. The grade school method is biased toward positive infinity. Not all biases are symmetric around zero. The grade school method is not, either. Anyway, thanks! | |
|
|
|
| hamsterman (4325) | |
|
Aren't you being a little too considerate? Also, 5000 posts.. Congratulations! | |
|
|
|
| Computergeek01 (2873) | |
|
Wow, you're still getting called on an article you wrote almost three years ago? The only rounding that has ever made sense to me was scaled rounding. Yeah it's complicated compared to the grammer school version but it simplifies the math you have to do later and prevents irrational numbers from poping up in your calculations. Tolerances are built into the formulas and the components. Don't believe me? Look up what the fourth band on a resistor stands for. I guess what I'm saying is that if you're going to round at all then make sure you have a reason to. | |
|
|
|