# 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

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
• Actually, if you read Hagen von Eitzen, you will see it is not as "unambiguous" as it may appear: E.g. $0.45$ rounds up to $0.5$, which rounds up to 1. How about rounding the number the OP asks about: $.444444444444444444444444444449$ How many places are you willing to round up to? If you allow rounding all digits up to the hundredths place to ($.45$), it's arbitrary whether to then round to the tenths place, to .05, and then to the integer 1. – amWhy Oct 17 '16 at 19:20
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").
• + Agreed! ${}{}{}{}$ – amWhy Oct 17 '16 at 19:26
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$.