Subject | Re: [firebird-support] Firebird roundind issues |
---|---|
Author | Mark Rotteveel |
Post date | 2009-07-02T07:01:33Z |
> Hi all,This is perfectly normal when storing decimals as floating points. Don't store exact numbers as doubles if you want exact precision. Doubles are floating point numbers and are imprecise by definition.
>
> I don´t know if this is the right place to post this message, but anyway
> there it goes...
>
> I´m having rounding issues with Delphi 2007/Zeos 6.6 and Firebird.
>
> When i try to save the extended value '3.26' it stores '3.2599999...'.
I don't know Delphi, but you need to use a precise decimal (eg BigDecimal in Java) in combination with a NUMBER or DECIMAL field on the database side.
Mark
--
Neu: GMX Doppel-FLAT mit Internet-Flatrate + Telefon-Flatrate
für nur 19,99 Euro/mtl.!* http://portal.gmx.net/de/go/dsl02