Subject | Re: [firebird-support] Re: Numeric Calculation Error ? |
---|---|
Author | Dimitry Sibiryakov |
Post date | 2005-01-14T10:42:28Z |
On 14 Jan 2005 at 9:49, kamen_lai wrote:
be negative. Probably, you forgot parentheses in the first case?
left to right.
SY, Dimitry Sibiryakov.
>Sorry, I don't care about the figure after decimal point , but theSorry, but if you substract two numbers from zero, result have to
>major problem is the integer part -230930 and 4984.
>
>1. The correct result should be positive but the first result is
>netagive.
>
>2. -230930 is an error result
be negative. Probably, you forgot parentheses in the first case?
>> >> > select 0.00 - (13060.45*9.031631) - (13060.45*8.65) fromCalculations of operations with the same priority is performed from
left to right.
>RDB$DATABASE--
>> >> >
>> >> > the wrong result is -230930.057593950041
>> >> > but
>> >> >
>> >> > select 0.00 + (13060.45*9.031631) - (13060.45*8.65) from
>RDB$DATABASE
>> >> >
>> >> > get correct result is 4984.2725939500006
SY, Dimitry Sibiryakov.