Rounding numbers...

gopunk

Lifer
Jul 7, 2001
29,239
2
0
i've noticed that a lot of people don't really do it properly... or at least not the same way as me

for example if you had 2.546, i would round that to 2.6 where other people would round that 2.5

i always thought you are supposed to round the 4 to a 5 because of the 6, then the 5 to a 6 because of the other 5.
 

aphex

Moderator<br>All Things Apple
Moderator
Jul 19, 2001
38,572
2
91
Originally posted by: gopunk
i've noticed that a lot of people don't really do it properly... or at least not the same way as me

for example if you had 2.546, i would round that to 2.6 where other people would round that 2.5

i always thought you are supposed to round the 4 to a 5 because of the 6, then the 5 to a 6 because of the other 5.

It really depends what the context is... Mathmatically, yes you should round up on anything .5 and above, but if you speaking in terms of things in which rounding down would cause problems, even a .1 should be rounded up...

 

gopunk

Lifer
Jul 7, 2001
29,239
2
0
Originally posted by: aphexII
Originally posted by: gopunk
i've noticed that a lot of people don't really do it properly... or at least not the same way as me

for example if you had 2.546, i would round that to 2.6 where other people would round that 2.5

i always thought you are supposed to round the 4 to a 5 because of the 6, then the 5 to a 6 because of the other 5.

It really depends what the context is... Mathmatically, yes you should round up on anything .5 and above, but if you speaking in terms of things in which rounding down would cause problems, even a .1 should be rounded up...

hmm, i don't think the discrepancy is because of that (though i'm sure that comes up)... it just seems like people aren't paying attention to the 6, they think the 4 is all they need to know.
 

tcsenter

Lifer
Sep 7, 2001
18,893
544
126
for example if you had 2.546, i would round that to 2.6 where other people would round that 2.5
I would round that to 2.55. :D

If I HAD to go one place after the decimal, it is 'supposed' to be rounded down to 2.5. So it is you that doesn't do it properly. haha

0.054 = difference between 2.6 and 2.546

0.046 = difference between 2.546 and 2.5

2.5 is closer to 2.546 than is 2.6

Is that right? I don't know.
 

Czar

Lifer
Oct 9, 1999
28,510
0
0
Originally posted by: tcsenter
for example if you had 2.546, i would round that to 2.6 where other people would round that 2.5
I would round that to 2.55. :D

If I HAD to go one place after the decimal, it is 'supposed' to be rounded down to 2.5. So it is you that doesn't do it properly. haha

0.054 = difference between 2.6 and 2.546

0.046 = difference between 2.546 and 2.5

2.5 is closer to 2.546 than is 2.6

Is that right? I don't know.
correct, at least I think so
 

kherman

Golden Member
Jul 21, 2002
1,511
0
0
Originally posted by: gopunk
i've noticed that a lot of people don't really do it properly... or at least not the same way as me

for example if you had 2.546, i would round that to 2.6 where other people would round that 2.5

i always thought you are supposed to round the 4 to a 5 because of the 6, then the 5 to a 6 because of the other 5.

Thought process way off! Only use the next least signifigant digit when rounding to any digit.

 

Adrian Tung

Golden Member
Oct 10, 1999
1,370
1
0
Well, that's very different from the way I would do it. I would need to know how many significant digits are needed in the rounding-up process first, so if you wanted only 2 significant digits then I would round it up to 2.5, if you wanted 3 digits I would round it up to 2.55 and so on.


:)atwl