Should x.5 rounded to x or x+1?

46 Views Asked by At

Say you have 300.5 dollars to pay as tax. Is there a mathematical concept that says rounding to 300 is better than 301 ?

1

There are 1 best solutions below

0
On

The two possible results are obtained under different rounding modes – they are specified in the IEEE 754 floating-point formats to give finer control over arithmetic calculations.

$300.5$ may round to $300$ if the mode is round-to-even or round-to-zero. It may round to $301$ if the mode is round-away-from zero.