Subject | Re: [firebird-support] Re: Numeric Calculation Error ? |
---|---|
Author | Sibylle Koczian |
Post date | 2005-01-14T10:54:25Z |
At 10:49 14.01.2005, you wrote:
wherever you got these two results?
I hope I didn't greatly misunderstand SELECT ... FROM RDB$DATABASE: in this
case it _is_ supposed simply to do the calculation and give back the result?
HTH
Sibylle
Dr. Sibylle Koczian
Universitaetsbibliothek, Abt. Naturwiss.
D-86135 Augsburg
Tel.: (0821) 598-2400, Fax : (0821) 598-2410
e-mail : Sibylle.Koczian@...-Augsburg.DE
>Sorry, I don't care about the figure after decimal point , but theBut your first SELECT _must_ have a negative result:
>major problem is the integer part -230930 and 4984.
>
>1. The correct result should be positive but the first result is
>netagive.
> >> > select 0.00 - (13060.45*9.031631) - (13060.45*8.65) fromIs the first "-" a typo? If yes: only in the mail or in your application or
>RDB$DATABASE
> > >> >
wherever you got these two results?
> > >> > the wrong result is -230930.057593950041yes, because in this case the first operator is +, not -.
> > >> >
> > >> > but
> > >> >
> > >> > select 0.00 + (13060.45*9.031631) - (13060.45*8.65) from
>RDB$DATABASE
> > >> >
> > >> > get correct result is 4984.2725939500006
> > >> >
I hope I didn't greatly misunderstand SELECT ... FROM RDB$DATABASE: in this
case it _is_ supposed simply to do the calculation and give back the result?
HTH
Sibylle
Dr. Sibylle Koczian
Universitaetsbibliothek, Abt. Naturwiss.
D-86135 Augsburg
Tel.: (0821) 598-2400, Fax : (0821) 598-2410
e-mail : Sibylle.Koczian@...-Augsburg.DE