What does 68.458335 round to?

I’m using this sum while trying to work out a broader calculation but my shocking maths has failed me once again. To a round integer, does 68.458335 round downwards to 68 or upwards to 69? Apologies if this is a stupid question. :slight_smile:

Usually, if you’re rounding this number to the nearest integer, you round down if the number is less than 68.5 and up if it’s 68.5 or above.

  1. But you really shouldn’t round until the end of your calculation.

Given the choice, always go for 69

Depends on what you want to do with your rounding. If what you want to do is find an integer which has minimal absolute difference from your given value, then, obviously, go for 68; it’s closer than 69 is. If the criteria which are important to you are something else, then you may want to do something else.

68.458335
68.45834
68.4583
68.458
68.46
68.5
68? or 69?

Hm, could go either way.

I’d say 68. But that’s just a personal preference.

68

Nope. You get to round once.

How many significant figures does your broader calculation have?

Right, but if it’s 68.45, I thought that might round to 68.5, and then 69. Why doesn’t it? I should’ve paid more attention in Maths.

Because you only get to round things once.

68.45 is closer to 68 than it is to 69. It’s a process that only has one step.

68.458335 is less than 68.500000. Round down.

68.499999 rounds down.

68.500000 rounds up.

Your explanation that 68.45 is closer to 68 than it is to 69 is both simple and correct, obviously. However, do note that, for rounding in the sense of “nearest multiple of whatever”, you can round multiple times to decreasing precision and do just fine, as long as you never end up exactly halfway between two multiples. If you do end up exactly halfway between two multiples, then you need to make a decision compatible with whatever previous precision you’ve now rounded away.

That is, the only problem case for “re-rounding” to decreasing decimal precision is when you end up with a last digit of 5 at some point and want to round that last digit away, because the rule “Round up on 5” is a hack, designed to accommodate the fact that if you had further nonzero digits in addition to the 5, then rounding up would be the appropriate thing to do, but not truly applicable otherwise.

It depends on what rounding scheme you’re using. “Round half to even” is a common rounding method and would round 68.5 to 68.

The question is: Why do you want to round this number at all? I’d work with it as is, then round the final calculation, if needed. If there are a lot of steps in-between, you could be seriously affecting the result.

A satisfying choice.

let Bill Gates resolve it. in Excel enter =round(68.458335,0) and Mr Gates will tell you the answer is 68.

In keeping with its generally piss poor handling of numerical issues, Excel rounds fives up, so I’m not going to believe anything it says without independent verification. Both R and Matlab agree, so it’s a reasonable answer.

It is, but one I’ve never understood. Given a particular precision level, you will always have the same number of data points rounding to each number. With the method you give, you will not. Starting with whole numbers that round to 10 (collapsed to save space):[spoiler]5
6
7
8
9
10
11
12
13
14

to 20
15
16
17
18
19
20
21
22
23
24

to 30
25
26
27
28
29
30
31
32
33
34

In the “round half to evens” system

to 10
6
7
8
9
10
11
12
13
14

to 20
15
16
17
18
19
20
21
22
23
24
25

to 30
26
27
28
29
30
31
32
33
34[/spoiler]

As you can see, you wind up with 2 more numbers that round to even numbers than odd numbers. This essentially makes even numbers (2/9) larger than odd ones. I cannot see how that would improve accuracy.

The idea with “round halfs to evens” is that if you end up taking sums (or, more generally, weighted sums or similar things) of the rounded results, and the original data is suitably uniformly distributed, then the biases will cancel out, whereas if you always round halfs up, you introduce a persistent bias upwards in the resulting data.

But, all the more reason to say, there is no such thing as the God-given, one-size-fits-all one true way to round; there is just different techniques with different properties appropriate for different goals. As with all math, first one must sit down and really think about what it is that one is trying to do and how to accomplish that, and then you pick an appropriate tool.