Definition:Rounding/Treatment of Half/Round to Even

From ProofWiki
Jump to navigation Jump to search

Definition

Let $n \in \Z$ be an integer.

Let $x \in \R$ be a real number.


Consider the situation when $\dfrac x {10^n} + \dfrac 1 2$ is an integer.

That is, $\dfrac x {10^n}$ is exactly midway between the two integers $\dfrac x {10^n} - \dfrac 1 2$ and $\dfrac x {10^n} + \dfrac 1 2$.


The round to even convention is that the nearest even integer to $\dfrac x {10^n}$ is used:

$X = \begin {cases} 10^n \floor {\dfrac x {10^n} + \dfrac 1 2} & : \text {$\floor {\dfrac x {10^n} + \dfrac 1 2}$ even} \\ 10^n \ceiling {\dfrac x {10^n} - \dfrac 1 2} & : \text {$\floor {\dfrac x {10^n} + \dfrac 1 2}$ odd} \end {cases}$

where $X$ is the rounded value.


This convention has the advantage over the rounding up and rounding down in that it minimizes cumulative rounding errors.


Examples

$72 \cdotp 465$ to $2$ Decimal Places

$72 \cdotp 465$ rounded to $2$ decimal places using rounding to even is $72 \cdotp 46$.


$183 \cdotp 575$ to $2$ Decimal Places

$183 \cdotp 575$ rounded to $2$ decimal places using rounding to even is $183 \cdotp 58$.


$116 \, 500 \, 000$ to Nearest Million

$116 \, 500 \, 000$ rounded to the nearest million using rounding to even is $116 \, 000 \, 000$.


Sources