bhicks11 wrote:
>On Sep 15, 6:17*pm, Marshall Barton <marshbar...@wowway.comwrote:
>Arie wrote:
>I have a table with marks (from Exams) and when I create a query a
calculated field with an expression like:
>Round([mark1]+ [mark2])/2
>I am confronted with the problem that Access has a strange outcome.
>For instance:
>(4+5)/2 returns 4
(5+6)/2 returns 6
But, that's what Round() does. *It's cakked Bankers Rounding
because it minimizes the rounding errors when adding a
column of values.
What result do you expect, 5 and 6, like we were taught in
grade school? *If so, then try using the expression:
* * * * Int((mark1+ mark2) / 2 + .5)
Hi Marsh, she is getting a round up in one case and a round down in
the other?
As I said before, that's what Bankers Rounding does.
Specifically, it rounds to the nearest even number in the
next (to the left) position. E.g. 4.5 rounds to 4, 5.5
rounds to 6, 6.5 round to 6, 7.5 rounds to 8, etc. Then, if
you sum a column of those rounded values, the total will be
more accurate than always rounding the midpoint fraction up.
--
Marsh