Subject | Re[2]: [firebird-support] Mathematics problem |
---|---|
Author | Miki Avramovic |
Post date | 2005-10-08T08:05:50Z |
I forgot to difine type of variables:
PCR is DOUBLE PRECISION
PC is NUMERIC(18,2)
RABAT_PROC is DOUBLE PRECISION
PCR is DOUBLE PRECISION
PC is NUMERIC(18,2)
RABAT_PROC is DOUBLE PRECISION
> How are PC and RABAT_PROC defined?Original message:
> I founded a little problem with evaluation of this formula in procedure
> or trigger:
> PC = 109.87
> RABAT_PROC = 5
> 1. case:
> PCR = PC - RABAT_PROC * PC / 100; Result for PCR is 104.291 (OK)
> 2. case:
> PCR = PC - RABAT_PROC * (PC / 100); Result for PCR is 109.33 (Bad)
> 3. case:
> PCR = PC - (RABAT_PROC * PC) / 100; Result for PCR is 109.33 too
> (Bad)
> My version of Firebird server is 1.52. I try with both of classical and
> super server.
> With Best Regards
> Miki Avramovic