Subject RE: [ib-support] Wierd math???
Author Brian K. Woods
Joe,
Nando and Martijn raise valid points about floating point math and
database storage issues.

However, I agree that in your particular situation, one should at the very
minimum get
some value just slightly off 0 (since with so few values, you couldn't get
that much
accumulated rounding error).
So I took a quick sec to run a test. I created a dummy table with an int
field and
a double-precision field (all you gave in your explanation), populated it
with your given
data, along with some interspersed records with key <> 5, and then ran your
query. It gives
the expected 0.00 result, no rounding error at all.
That leads me to believe that your problem isn't weird math,
but something else pertaining to indexes or corruption or some other thing.
You should probably
do a similar test yourself in a new dummy database to see if you get the
screwy result or not.
If you don't get the error, I'd try backing up and restoring the db...

HTH and good luck!
Brian