When I started my test, I turn off my app.
And do update(and select) using only ISQL tool (IBExpert) and dbweaver.
in both I had to configure select to show float using mask (0.######..), so
the number can be different that I show you, but always eat last numbers.
I need to store long decimals numbers maybe more than 15 decimals, is it
possible without store as string?

Em qua., 26 de fev. de 2020 às 15:21, Mark Rotteveel m...@lawinegevaar..nl
[firebird-support] <firebird-support@yahoogroups.com> escreveu:

>
>
> On 2020-02-26 19:07, hamacker sirhamac...@gmail.com [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
> 
>
  • [firebird-support... hamacker sirhamac...@gmail.com [firebird-support]
    • Re: [firebir... Mark Rotteveel m...@lawinegevaar.nl [firebird-support]
      • Re: [fir... hamacker sirhamac...@gmail.com [firebird-support]
        • Re: ... Dimitry Sibiryakov s...@ibphoenix.com [firebird-support]
          • ... hamacker sirhamac...@gmail.com [firebird-support]
        • Re: ... Mark Rotteveel m...@lawinegevaar.nl [firebird-support]

Reply via email to