Subject | Re: [firebird-support] why the result is the number commas? |
---|---|
Author | Mark Rotteveel |
Post date | 2012-06-02T18:06:49Z |
On 2-6-2012 19:47, softdestek wrote:
http://docs.oracle.com/cd/E19957-01/806-3568/ncg_goldberg.html for a
thorough explanation.
Mark
--
Mark Rotteveel
> ACCOUNTS.DEBT is doubleDouble precision is not exact due to the way it represents numbers, see
> ACCOUNTS.RECEIVABLES is double
>
> MY QUERY
> SELECT
> SUM(ACCOUNTS.DEBT),
> SUM(ACCOUNTS.RECEIVABLES),
> sum(ACCOUNTS.DEBT)-SUM(ACCOUNTS.RECEIVABLES)
> FROM ACCOUNTS
> WHERE ACCOUNTS.CODE='100'
>
>
>
> 1) SQL RESULT
> SUM(ACCOUNTS.DEBT) 2708021,63
> 2) SQL RESULT
> SUM(ACCOUNTS.RECEIVABLES) 2707357,52
> the correct result=664,11
>
> 3)SQL RESULT
> sum(ACCOUNTS.DEBT)-SUM(ACCOUNTS.RECEIVABLES) 664,109999998938
> Why is this?
> Why is there a difference between the two results?
http://docs.oracle.com/cd/E19957-01/806-3568/ncg_goldberg.html for a
thorough explanation.
Mark
--
Mark Rotteveel