[AccessD] Rounding with CCur conversion

Bobby Heid bheid at sc.rr.com
Sat May 31 18:22:03 CDT 2008


Asger,

The currency type rounds to 4 decimal places.

Bobby

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Asger Blond
Sent: Thursday, May 01, 2008 7:55 PM
To: 'Access Developers discussion and problem solving'
Subject: [AccessD] Rounding with CCur conversion

Hi group,

 

I just noticed that the algorithm in VB for rounding seems to be different
for the Round-function and the CCur-function.

The Round-function use "Banker's rounding", also known as "Dutch rounding".
The CCur-function behaves differently:

Round(1.11115,4) --> 1.1112

Round(11.11115,4) --> 11.1112

Round(111.11115,4) --> 111.1112

CCur(1.11115) --> 1.1112

CCur(11.11115) --> 11.1112

CCur(111.11115) --> 111.1111  ?!!

 

What's going on in the last conversion? Is this a bug or does the
CCur-function have a special algorithm?

 

TIA

Asger





More information about the AccessD mailing list