Subject | Re: [firebird-support] double type in Stored procedure showing lots of decimals. |
---|---|
Author | Michael Weissenbacher |
Post date | 2012-09-26T10:58:32Z |
> I have a stored procedure writing a*b, then I get this a*b to be rounded to 8 decimals.Standard Float / Double behaviour, see:
>
> a = 2.05
> b = 36.5902439
>
> I stored the data in a dummy table, and this is where I find that sometimes the a*b gives me the value of 75.009999995, but sometimes it gives me the value of 75.0099999949999. And this has caused my value after rounded to 8 decimals not to be exact the same, where it gives 75.01 for the first time, but 75.00999999 for some other time.
>
> Anyone experiences this before ?
>
http://en.wikipedia.org/wiki/Floating_point#Minimizing_the_effect_of_accuracy_problems
regards,
Michael