Hi Fabio,
Thanks for the reply.
INdexing the tables before sum has no effect on the outcome of Round(). It is not a problem for me as I have already determined that it is close enough for my purposes. About 95% of the time, it comes out equal to 4 decimal places. The other times it was off by .0001 which was due to Round() not actually rounding the numbers correctly. I was just curious why round() would yield different results for the same number that was manually entered than the result of a calculation.
The result from SUM was determined by
?str(m.lnTotalAVG1,30,18)
*!* result = 58271.270049999900000000
?Round(m.lnTotalAVG1,4)
*!* result = 58271.2701
*!*Manually entered same number
m.lnTotalAVG1 = 58271.270049999900000000
?Round(m.lnTotalAVG1,4)
*!* result = 58271.2700
>Hi Elmer,
>
>>Set decimals to 4
>this not set sum rounding, but only display rounding.
>Any calculation is done on floatig point.
>
>try this:
>
>* order the sum computation
>select EMISSIONUNITREPORT2
>INDEX ON EMISBYAVG TAG TAGTEMP
>sum EMISBYAVG to m.lnTotalAVG
>
>select EMISSIONUNITREPORT3
>INDEX ON EMISBYAVG TAG TAGTEMP
>sum EMISBYAVG to m.lnTotalAVG1
>.... test
>
>
>Fabio