On 2020-02-26 19:07, hamacker [email protected] [firebird-support] 
wrote:
> Hi All,
> 
> I do this update:
> UPDATE CV SET
>   perc_lucro=42.503064336972848
> WHERE (id_cv=57528)
> 
> Then  I do a select and 'perc_lucro' was change to 42,5030643369728
> after updated, two last numbers disappear.
> Why?
> perc_lucro is double precision type.
> FB 3.0.5 32bits, Windows 64.

A double precision is not an exact numeric type, it has roughly a 
precision of 15-17 decimals. Even that isn't entirely correct because of 
how a double precision works. In any case, a double precision cannot 
exactly store 42.503064336972848.

However, when testing this (with `select cast(42.503064336972848 as 
double precision) from rdb$database`), I get a value of 
42.50306433697285, which suggest that your software may do some 
additional rounding or truncation when presenting the value.

Mark

Reply via email to