Subject Interbase Rounding Error???
Author Lauren Kinkead
I'm not sure if this is the correct newsgroup, but...

I've think I've discovered an Interbase bug??...a numeric field with two
decimal precision has occasional rounding errors. Some newsgroup said that
Interbase 6.x solved the rounding problem by introducing the precision (ex
numeric(15,2)). That's what we're using, but 35.12 was getting stored as 35
11. In code, I noticed that the erroneous rounding issue was showing 35
1100 instead of 35.12. When I switched the field definition to numeric(15
4) then the value assigned was 35.1200. I'm not sure if this really "fixed"
the problem or if it just fixed this occurrence of the rounding problem.

This is a potentially time-consuming bug for us because Interbase won't let
you redefine the field. It gives the error message: "Cannot change
datatype for FEE_CHARGED. Conversion from base type 64-bit numeric to
DOUBLE PRECISION is not supported."

We'd have to create a new field, copy the data from the old field, then drop
the old field and rename the new field to the dropped field name.

I'm not quite sure what to do....any help would be greatly appreciated.

Lauren Kinkead


[Non-text portions of this message have been removed]