I didn't know of precision until you pointed it out, and even then when I read the following in the programmers guide, I thought of truncate rather than rounding.

<x-tad-bigger> The optional PRECISION attribute is an integer that controls the number of decimal places displayed in the result. The </x-tad-bigger><x-tad-bigger>default</x-tad-bigger><x-tad-bigger> </x-tad-bigger><x-tad-bigger>precision</x-tad-bigger><x-tad-bigger> is the maximum required for accuracy of the result.</x-tad-bigger>

But still, two rounding methods are better than none.

J.

On 06/08/2004, at 1:50 PM, John McGowan wrote:
That's kind of a "hack" There is a more appropriate way of doing that using the "precision" attribute.

I think <@CALC expr="expression" Precision="0"> is what you want

the precision attribute specifies the number of decimal places, so I'm pretty sure you would use 0 to round to the nearest integer...

I use it all the time when calculating monetary values with precision=2

/John

Jason Schulz wrote:
Works like a charm.

Thanks,

J.

On 06/08/2004, at 11:42 AM, Bill Downall wrote:
On 6 Aug 2004 at 11:36, Jason Schulz wrote:

Is there a tag/expression that will round a number in the normal
manner (ie, if >=0.5, round up, if >0.5 round down)?

@calc ceil will force round up, and @calc floor will force round down,
but I need the traditional rounding.

Jason,

Try @CALC floor of (value + .5)

Bill

Reply via email to