Subject Re: Rounding problems
Author Alexander V.Nevsky
--- In firebird-support@yahoogroups.com, "Riho-Rene Ellermaa"
<r.ellermaa@h...> wrote:
> 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

Formatting is task for client application, so it depends on tool
you use on client side. In Delphi we usually use TField.DisplayFormat,
FloatToStrF, FormatFloat...

Best regards,
Alexander