View previous topic :: View next topic |
Author |
Message |
abracadabra Beginner
Joined: 02 Sep 2003 Posts: 101 Topics: 55 Location: India
|
Posted: Thu Feb 26, 2004 1:46 am Post subject: Compute |
|
|
I am facing this strange problem. I have 3 fields
A - 9(2)V9(5)
B - 9(2)V9(5)
C - 9(2)V9(5)
Now B*A gives C.
When I do the calculation of B*A in a calculator or excel it is giving the value desired. Please note here that both B and A's actual values are more than 5 decimal places.
However, when the same calculation takes place in a COBOL program, the value of C is not coming the same as the calculator/excel. This is because the program is first taking till the 6th decimal place and calculating internally and then mving to C rounded
What could be the reason?
Thanks _________________ Cheers! |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12369 Topics: 75 Location: San Jose
|
|
Back to top |
|
|
|
|