[AccessD] Currency vs Double

Gustav Brock Gustav at cactus.dk
Mon Jan 14 04:09:48 CST 2008


Hi Rocky

There is no way to choose a specific data type to solve each and every rounding "issue". You have to know what you are doing and what you wish to accomplish.

As the name Currency tells, it is optimized for money calculations where indeed subtractions are performed without the typical errors from using Double or Single. On the other hand, as JC shows, you may need to perform interim calculations with another data type, or apply rounding carefully. Sadly, the native Round function is buggy, so for critical applications you will need a custom rounding function (one of which I have posted several times).

/gustav

>>> rockysmolin at bchacc.com 13-01-2008 19:32:18 >>>
 
Dear List:
 
Is there any difference between currency and double when working with
relatively small number - like under a million?  Does currency take care of
rounding errors which would happen in double calculations?
 
MTIA
 
Rocky






More information about the AccessD mailing list