Percentage calculations

2003-01-13 Thread ice
>From: "Brad Hile" <[EMAIL PROTECTED]> >To: <[EMAIL PROTECTED]> >Date: Sat, 11 Jan 2003 18:23:11 +0800 >Subject: Percentage calculations >Reply-To: [EMAIL PROTECTED] >Just wondering if anyone has a better way to work out percentage values. >Currently I

RE: Percentage calculations

2003-01-11 Thread Brad Hile
Carl West wrote: > To avoid getting an integer result you need to introduce a non-integer. > You could use: > eq=PercentAddition/100.0 > eq=PercentAddition/float(100) > eq=float(PercentAddition)/100 > > But this won't work because the result is already an integer > before you take the 'float' of

Re: Percentage calculations

2003-01-11 Thread Carl West
Brad Hile wrote: > > Just wondering if anyone has a better way to work out percentage values. >... > I've tried > set the floatprecision=2 > eq=PercentAddition)/100 > > but it always returns 0.00 To avoid getting an integer result you need to introduce a non-integer. You could use: eq=Percent

Percentage calculations

2003-01-11 Thread Brad Hile
Just wondering if anyone has a better way to work out percentage values. Currently I'm having to append text to the number then use value it works but seems kinda kludgy. something like this: PercentAddition=2 eq=value(PercentAddition) if value(PercentAddition)<100 then eq=value("0."& PercentAd