Subject | Mathematics problem |
---|---|
Author | miki_avramovic |
Post date | 2005-10-07T17:36:25Z |
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
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