0
champu

Number Rounding - .5

Recommended Posts

Wow what a good question...........

I would like to know too! It's a conspiracy I tell ya! Maybe we weren't supposed to round at all......maybe we've caused the world to spin itself into oblivion. Oh no.......what have we done?
I'm so funny I crack my head open!

P.M.S. #102

Share this post


Link to post
Share on other sites
someone already pmed me the "answer" that's on that site, but I still think it's balderdash.

if you're talking about rounding numbers between 70.0 and 71.0 to the nearest ones place, you can't say, "70.0, 70.1, 70.2, 70.3, and 70.4 get rounded down and 70.5, 70.6, 70.7, 70.8, and 70.9 that's five in each direction, yay everyone wins."

well, you can't say that without being horribly horribly wrong anyway.

I'm sorry, 70.0 doesn't count, it was a stellar attempt at a valid explaination, but you're not rounding it anywhere, it's already there.

the truth is, there are four numbers going down, and five numbers going up. And while it's fine that it's a standard to round ".5" up even though it's exactly in the middle, it was a completely arbitrary decision that made it that way.

I think this is why we have inflation, increasing taxing, and world suffering.

Share this post


Link to post
Share on other sites
Quote

Wow what a good question...........

I would like to know too! It's a conspiracy I tell ya! Maybe we weren't supposed to round at all......maybe we've caused the world to spin itself into oblivion. Oh no.......what have we done?



These days, it seems oblivion would be an improvement for the world! [:/]

-
-Jeffrey
"With tha thoughts of a militant mind... Hard line, hard line after hard line!"

Share this post


Link to post
Share on other sites
Quote

it was a completely arbitrary decision that made it that way.



Yeah, yeah... Even the so called "Doctor Rob" started by saying he wasn't sure. I've used that math site from time to time to not have to reinvent the wheel when writing some code in an area I'm not familiar; even while to some the formula might seem pretty basic.

That said, this decision was probably not arbitrary.

Ok, how about this explanation. It's a personal one, but after years of designing and coding hundreds of custom mapping applications (where issues of scale and precision come up very often), it order to be most accurate, I've found that rounding up from 5 beats rounding down practically every time. I'll explain.

Let's say you're measuring a quantity that has a precision greater than tool you're using to measure it with. And with continuous, floating-point type measurements, this happens almost all the time. (I'll get to integers in a bit) Meaning, your tool can only measure a quantity down to the tenths, but this quantity you're measuring can be described down the the hundreths or greater (think: location, length, or area). In this case, your measuring tool will not read 2.5 until the moment the measurement arrives at 2.5. Since with most floating point-type continuous measurements, the chances are MUCH greater that your tool's '2.5' measurement is greater than 2.5 (say, 2.501) and didn't just freeze at 2.5, then 2.501 is closer to 3 than it is to 2, so therefore your measurement of 2.5 is better to be rounded up to 3.

It's like 12:00am being midnight and 12:00pm being noon. If you see a clock which just struck noon, chances are it's already a split second past noon (at a precision greater than that clock can display), therefore it's more accurate to say that 12:00 noon is PM than AM. And then inverse analysis sinks the putt, in that, if 12:00 noon was AM and 12:00:01 was PM, then when exactly did the time become PM? Boom, 12:00 noon is where it became PM. Noon is then 12:00pm. And you don't need to know the display scale first to make that decision.

So, if floating-point measurements show that 5 should be rounded up, then integer math (even exactly 0.5, which is an integer when shifted) should also be rounded up to be consistent. Meaning, why have a different rule for floats than for integers. Because then you'd first need to know whether the number is a float or an integer, and you might not always know by just looking at a number.

And then finally, if you're rounding at all, that means you already don't care about the precision of the value you have in front of you. So then, you shouldn't care much about which way it rounds. Even if Doctor Rob from the Math Forum says to round 'up'.

Share this post


Link to post
Share on other sites
Quote

I remember reading somwhere that if the number you're rounding to is even up go up, odd you go down. Or was it the other way?

51.5 -> 52

44.5 -> 44




That idea is crap.

eg


51.5->52
52.5->52


51.5
51.6
51.7
51.8
51.9
52.0
52.1
52.2
52.3
52.4
52.5
=
52


52.6
52.7
52.8
52.9
53.0
53.1
53.2
53.4
=
53


There are less numbers if you do it that way.


. Note:

always round the same way. Up or down. who cares...


Just don't round until the last line...
--
Arching is overrated - Marlies

Share this post


Link to post
Share on other sites
Quote

Quote

Maybe we weren't supposed to round at all......



Then what would you use for pi?



According to the Bible, the pillars of Solomon's Temple had a circumference of 12 cubits and a diameter of 4 cubits. Therefore we have it on Biblical authority that pi = 3 exactly.
...

The only sure way to survive a canopy collision is not to have one.

Share this post


Link to post
Share on other sites
that is actually a good explaination of why to round up...

...provided you have prior knowledge that your instrument of measure performs simple truncation as opposed to any kind of rounding itself (such as a digital clock, or a clock that tics instead of sweeps)

but then again, maybe the clock tics to the next second exactly half way between the last second and the current one, and then tics again exactly half way between this second and the next. In this case the clock would actually be rounding to the nearest second, and for any given reading, you'd have an equal chance of the actual time being just before or just after your measurement.

Share this post


Link to post
Share on other sites
Weren't the pillars a cog like shape? Like if you looked down on a golf ball, they had rounded troughs going around it. Maybe the measuring SNAFU comes from measuring around the outside of the "lands" but across from the inside of the "grooves."

Depending on the depth of the grooves, that could account for 0.1415269, yes?
witty subliminal message
Guard your honor, let your reputation fall where it will, and outlast the bastards.
1*

Share this post


Link to post
Share on other sites
Quote

but then again, maybe the clock tics to the next second exactly half way between the last second and the current one



I'm with ya there, but the way I'd explain that is that when you round twice, (even if you don't know about the first rounding) then any error which occurs is simply not controllable, regardless of which way you decide to round the 5s.

Like, let's say I want to round 2.46 to the nearest tenth. That would make it 2.5. Then later I want to round 2.5 to the nearest whole. That would make it 3.0 (for reasons I surmised before). But let's back up and say I want to round 2.46 to the nearest whole, that would be 2! This problem of rounding 2.46 to 3 is caused more by rounding twice, than by the decision to round 5s upward. (Cuz if you rounded 5s downward, I could do the same to turn 2.54 into 2.)

But yes, I'm assuming that a tool which measures continuous values with a less precise display will not 'click' to the next unit until that unit has been reached by continuous measurement. (personal experience only)

If you have a measuring tool, and you don't know whether or not that tool is already rounding for you, then that's a bigger problem than deciding which way to go with your 5s, or how this became the 'standard' way to do it.

Then finally, sometimes the direction to round something depends on the applied situation and not just numbers in the abstract. (I'm not a math guy; I make practical applications.) I've had cases where continuous measurements were only important in finding whole entities, in which case even 2.9 was required to round down to 2. In this case, it would cause problems to say '3', because you don't actually have '3'.

And then yes (masher), I've seen other cases where the result of the rounding needed to be divisible by 2, so rounding 5s to the nearest even number was chosen as the way to go.

Share this post


Link to post
Share on other sites
Quote

I think this is why we have inflation, increasing taxing, and world suffering.



You're assuming that rounding something up makes it seem worse. Sometimes rounding something "good" down makes it seem worse, up makes it seem better.

With continuous measurements of 'real number' values, counting always starts at 0 (not one; zero). Proof: when you count up to 0.01, you're 'counting' even though you haven't reached one yet. 0.00 to 0.49 count as 50 values rounded down to 0, and 0.50 to 0.99 count as 50 values rounded up to 1. You can't start counting at 0.01, because then what happens to 0.001? And so on...

The only counting that starts at 1 is "ordinal" or integer values, think: years, shoes, helmets (first year, second shoe, fifth helmet). This is the 2004th year of our Lord, not that we're 2004 years from zero, etc. (Today is 2003.53 years past zero)

Man, sorry, I'm spending way too much time on this... Might need this bong y'all been talkin about.

The big bottom line (from me that is): I think we round 5 upward to defer to the floating point behavior of continuous measurements. Whole number rounding just piggy-backs along and follows the same rule.

Share this post


Link to post
Share on other sites
Quote

Rounding functions in some languages (I know this happens in VB.NET) will round to the even number



Yep. That was frustrating the first time I tripped on it too, since this is different than the way it worked at VC++6 (and VB6 too). Better to write your own roundup() and rounddown() functions and not rely on the default behavior of .NET's Convert and Math classes.

MSDN says this makes .NET conform to IEEE Standard 754. "Banker's rounding" which rounds .5 to the nearest even number. Searching the web on IEEE 754 produces head-pounding material which allegedly justifies it.

I really need to get myself back on the track that this a skydivers discussion forum.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

0