Re: [mvdbms] RE: Rounding in Access

50 views
Skip to first unread message

Dan McGrath

unread,
Mar 15, 2018, 2:55:28 PM3/15/18
to mvd...@googlegroups.com
For what's it's worth, this is the default way of rounding in IEEE 754 "Standard for Floating-Point Arithmetic" and is sometimes called "bankers' rounding" -> You'll see accountants use this method.

The general idea is if you always rounding up, or down, then your totals would either be biased towards inflation or deflation - particularly because ending in a 5 is fairly common in accounting. To combat this for large sets of numbers, the strategy of always rounding to the even number is used (so 1.5 and 2.5 both go to 2). This eliminates the bias for most purposes.

There is a whole host of different strategies for rounding half numbers up or down depending upon your needs. It can be an interesting read if you're in to that :D

On 15 March 2018 at 11:27, Albert Kallal <Kal...@msn.com> wrote:

Sorry sorry sorry!

 

Wrong group!

 

(my mvp group for access starts with mv)

 

 

Regards,

Albert k

 

 

 

From: mvd...@googlegroups.com [mailto:mvdbms@googlegrroups.com] On Behalf Of Albert Kallal
Sent: March 15, 2018 11:26 AM
To: mvd...@googlegroups.com
Subject: [mvdbms] Rounding in Access

 

Well, for “all” these years, I always thought that access would round up.

 

Eg:

 

? round(8.626,2)  =  8.63

 

? round(8.627,2) =  8.63

 

However, if the LAST digit is a 5, and previous is even number then access does not round up.

 

Eg:

 

? round(8.625,2)  =  8.62   (huh??????)  should be 8.63!!!!

 

If you use “format(8.625,0.00)” on the above, you get 8.63 – and this includes reports etc.

 

Anyway, in the vast  majority of cases, one does not notice this,

but I am sending invoices from Access to sage 300 accounting.

 

Some of the invoice totals were not matching, and it was the above rounding issue.

 

A REAL surprise! (after all these years, I did not realize that numbers ending in .5 would not round up!

 

(the issue is if the digit BEFORE is an EVEN value (such as above), then if the next digit is 5, then rounding up DOES NOT occur!

 

It interesting that office uses this bankers rounding – most accounting packages don’t!

 

Anyway – not a huge deal, but something I simply did not know.

 

 

R

Albert

 

--
You received this message because you are subscribed to
the "Pick and MultiValue Databases" group.
To post, email to: mvd...@googlegroups.com
To unsubscribe, email to: mvdbms+unsubscribe@googlegroups.com
For more options, visit http://groups.google.com/group/mvdbms

--
You received this message because you are subscribed to
the "Pick and MultiValue Databases" group.
To post, email to: mvd...@googlegroups.com
To unsubscribe, email to: mvdbms+unsubscribe@googlegroups.com
For more options, visit http://groups.google.com/group/mvdbms

Reply all
Reply to author
Forward
0 new messages