Subject | Re: [firebird-support] INTEGER BUG |
---|---|
Author | Dimitry Sibiryakov |
Post date | 2009-05-05T12:26:22Z |
> Why do we get an integer overflow with this code:Because result has type numeric(18,19), where 19=10+4+3+1+1, that is
>
> select
> cast(1.000 as numeric(18,10)) * 1.0000 * 1.000 * 1.0 * 1.0 from
> rdb$database
impossible.
> but not this one?Because 10+4+1+1+1 = 17. Numeric (18,17) is possible.
>
> select
> cast(1.000 as numeric(18,10)) * 1.0000 * 1.0 * 1.0 * 1.0 from
> rdb$database
> This is a SERIOUS BUG!!In your head only. Read about precise arithmetic in Dialect 3.
SY, SD.