How do you round to the nearest unit ?

1 Answer
May 28, 2018

See below

Explanation:

Rounding to the nearest unit means to find the nearest integer to a given number.

Basically, you have to get rid of the decimal part, if any.

As an immediate corollary, you have that if a number #x# is already an integer, then there's no point in rounding it, since the result would be #x# itself.

Now, let's assume that our number actually has a decimal part, for example #4.687#.

It might help you to think of this number as #4+0.687# to clearly see that 4.687 lies between #4# and #5#, since it is something (#0.687#) more than #4#, but still not #5#.

So, the question is: is our number closer to #4# or to #5#? Which, in turn, means to ask: the decimal part that we've added, #0.687#, is nearest to #0# or #1#?

If it is nearest to #0#, it means that our number is more than #4#, but still nearer to #4# than it is to #5#, otherwise it is "far enough" from #4# to be nearer to #5#.

Since halfway between #0# and #1# is #0.5#, and our decimal part is #0.687>0.5#, we can say that #4.687# is rounded to #5#.

I'll leave some more examples:

  • #0.3345 \to 0#
  • #-5.178\to -5#
  • #-7.95 \to -8#
  • #20 \to 20#
  • #20.687 \to 21#