Crazy Decimal Places

D

DEI

I am doing some summing in Queries and keep getting
numebrs with a large number of decimal places (Ex:
38.8500000000001).

The numbers in the tables these calculations are based on
have three decimal places at the most. I have tried to
change properties in the Table, Query, and even Report and
nothing seems to change the appearance of these values.

Is there something I can do?
 
M

Marshall Barton

DEI said:
I am doing some summing in Queries and keep getting
numebrs with a large number of decimal places (Ex:
38.8500000000001).

The numbers in the tables these calculations are based on
have three decimal places at the most. I have tried to
change properties in the Table, Query, and even Report and
nothing seems to change the appearance of these values.

Floating point (Single, Double) data types do not guarantee
100% accuracy, not even if you do the math with pencil and
paper (try to write down the decimal value of 1/3).

Generally, you can just ignore such small inaccuracies by
specifying a format with fewer decimal places and the number
will be rounded so you won't see these little discrepencies.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top