Hello Everyone
May I get you help on CEIL command?
I wrote the following test program:
---------->
REPORT ZTEST_TOM_CALCT.
data:
result type I,
p1 type P DECIMALS 2,
p2 type P DECIMALS 2,
p3 type P DECIMALS 4,
p4 type P DECIMALS 4.
p1 = '5349.00'.
p2 = '0.25'.
p3 = '123.0000'.
p4 = '123.0000'.
result = CEIL( P1 * p2 / p3 * p4 * 100 ).
write result.
data: p_temp type string.
p_temp = P1 * p2 / p3 * p4 * 100 .
write:/ p_temp.
data:c_temp type p.
c_temp = ceil( p_temp ).
write:/ c_temp.
<-------------
The result is:
133,726
133725.00000000000000
133,725
I can understand ceil ( 133725.00..) = 133725.
But why
result = CEIL( P1 * p2 / p3 * p4 * 100 ) = 133726 ?
Regards
Tom