gnucobol-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [open-cobol-list] [Bulk] Posible difference in the precision ofCOMPU


From: Sergey Kashyrin
Subject: Re: [open-cobol-list] [Bulk] Posible difference in the precision ofCOMPUTE statements between OPEN COBOL 1.1 and mainframe COBOL
Date: Tue, 9 Mar 2010 06:03:50 -0500


COMPUTE RESULT-1 ROUNDED = 46956.93 / 24 + 5308.00 / 24

For mainframe rules were published a long time ago:

1)    46956.93 / 24  == 1956.538  (i.e. no rounding, but +1 decimal digit)
2)    5308.00 / 24    ==  221.166   (the same way)
3)   1956.538   + 221.166   == 2177.704
4)   rounding == 2177.70

Regards,
Sergey



reply via email to

[Prev in Thread] Current Thread [Next in Thread]