Decimal Places

  • Thread starter Thread starter Reggie Laffond
  • Start date Start date
R

Reggie Laffond

I am importing a text file with both text and numeric fields. In my import
spec I set the numeric fields to "double". The data looks fine after import
and even when I add those fields in a query. But sometimes when I change the
query to a summary query and "sum" these numeric fields I get a bunch of
decimal places like instead of 250 it will display 249.99999999991 or
instead of 15 I see 15.00000000001.

Any ideas?

Thanks in advance.
 
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Computers use binary arithmetic. Humans use decimal arithmetic. Binary
doesn't convert as accurately to decimal as we humans would like. There
are many discussions about this subject on all newsgroups that have
anything to do w/ data storage and computer mathematics - search
Google's newsgroups (Groups) archives for other ideas.

--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBQeNA1IechKqOuFEgEQKGfQCg08gWn/37P+dG+i1agiPUn+xxKvIAoOf5
bJSeYlVDJgpX655j1DTNjaFk
=m6bz
-----END PGP SIGNATURE-----
 
If you only need accuracy to 4 decimal places, you can use the currency field
type. It does not have this type of problem.
 

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

Back
Top