# How to round 0.45? Is it 0 or 1?

This question is inspired by How to round 0.4999... ? Is it 0 or 1? I didn't quite understand the logic of the answer. It seems you round every decimal place no matter how far back it goes? In the case of 0.49999, you're rounding up the 9 increases which causes the .4 to be .5 making it round up to 1 (rather than down).

So 0.45 will rounds to 1? Would .444444444444444444444444444449 also round to 1?

-
0.4999.. doesn't go "up" or increase to 0.5. they are equal. –  wim Oct 22 '12 at 1:51
add comment

## 4 Answers

I think your understanding of the reason why $0.499999\ldots$ ($=0.4\overline{9}$) rounds to $1$ is mistaken. The reason why $0.4\overline{9}$ rounds to $1$ is because it is equal to $0.5$, which rounds up.

However, $0.45$ unambiguously rounds down to $0$; indeed, any number in the range $-0.5 \le x < 0.5$ rounds to $0$.

-
(I changed "=$0.4\overline{9}$ to "$=0.4\overline{9}$". That is standard usage. Notice the difference in physical appearance. Putting things like this INSIDE of TeX is proper usage since the standard typesetting conventions are built in. –  Michael Hardy Oct 21 '12 at 21:36
@MichaelHardy: Thanks. I'm surprised you noticed that, and not my assertion that 0.4999... rounds to 9! –  Clive Newstead Oct 22 '12 at 7:33
add comment

The distance from $0.45$ to $0$ is $0.45$ and the distance from $0.45$ to $1$ is $0.55$, which is bigger. So in order to round to the nearest integer, you'd round to $0$.

Sometimes a bias in favor of being too big is desirable: If you're laying a cable across the floor of the San Francisco Bay from SF to Oakland, and it's too short, you lose everything, but if it's too long, you lose only the cost of the excess cable.

-
add comment

You may be thinking of this: Rounding $0.4445$ or even $0.4449$ directly to an integer produces $0$. When rounding $0.4445$ to three decimal places, we round the 5 up and onbtain $0.445$. When we round this number again (to two decimal places), we obtain $0.45$, and if we round this to one decimal place, we obtain $0.5$, which we finally round to integer obtaining $1$ instad of $0$. Repeated rounding is to be avoided! There are rounding strategies that can cope better with repeated rounding ("round 5 to even") then the usual and conventional rounding rule ("round 5 up").

In other words: Rounding introduces error.

-
+1, only answer that actually understands the "0.45" rounding issue. –  Matsemann Oct 22 '12 at 8:46
add comment

It is definitely 0, since it is less than 0.5. But in these cases i would not round to 0, since it might make the solution meaningless. It all depends from the problem's scope and you instructor (or the environment).

-
add comment