If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Strange values when summing in a query
Why is it that a query in Access resturns strange values when summing simple
figures. Example: I have a number of records with a number field values like 8 7.5 6 8 12 9.3 and so on. When I make a query that sums these fields the correct sum may be 269.3 but in the query is says 263.30000000013 or something like that. -- Kjell Harnesk, Sweden. |
#2
|
|||
|
|||
Strange values when summing in a query
It's floating point round-off error.
Just as humans can't represent certain fractions exactly in base 10 (think, for example, 1/3, which is 0.333333 repeating), so too computers can't represent certains fractions exactly in base 16. There's an entire branch of computer science call numerical methods (or numerical analysis) devoted to the study of how to reduce round-off error. -- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no private e-mails, please) "Kjell Harnesk" wrote in message ... Why is it that a query in Access resturns strange values when summing simple figures. Example: I have a number of records with a number field values like 8 7.5 6 8 12 9.3 and so on. When I make a query that sums these fields the correct sum may be 269.3 but in the query is says 263.30000000013 or something like that. -- Kjell Harnesk, Sweden. |
Thread Tools | |
Display Modes | |
|
|