Subject | Rounding problems |
---|---|
Author | Riho-Rene Ellermaa |
Post date | 2004-05-06T07:09:10Z |
Firebird 1.03
Database SQLDialect=1 and database fields are DoublePrecision
When calculating one fields value (i.e 0+12345678.78-12345678.78) I get
the result as 5.244567E-7
I know that this is normal behaviour for floating point calculations,
but how can I get the result into more or less acceptable format. The
number of places after comma can vary (up to 12 places), but when it is
zero, I would like to show 0.00 not 1.2323E-15
Riho Ellermaa
Database SQLDialect=1 and database fields are DoublePrecision
When calculating one fields value (i.e 0+12345678.78-12345678.78) I get
the result as 5.244567E-7
I know that this is normal behaviour for floating point calculations,
but how can I get the result into more or less acceptable format. The
number of places after comma can vary (up to 12 places), but when it is
zero, I would like to show 0.00 not 1.2323E-15
Riho Ellermaa