Subject RE: [ib-support] SP Calculate Error.
Author Josipovic, Nick
Try to explicitly cast your variables to floats.
It seems, like the division in the brackets is done with integers, so
1+(25/100)=1+0......

Nick Josipovic
Corporate Market Intelligence

Phone: ++49 6227 762945


> -----Original Message-----
> From: Gerhardus Geldenhuis [mailto:linuxmail@...]
> Sent: Monday, June 04, 2001 1:05 PM
> To: ib-support@yahoogroups.com
> Subject: [ib-support] SP Calculate Error.
>
>
> Hi
> I have the following line of code that gives the wrong
> result. The result I
> get is 39.8 instead of 49.75.
> Most of the values is variables but I changed it to values to
> see if one of
> the variables was at fault.
> TEMPVAR = 39.8*(1+25/100);
>
> If this one line is not enough I will post the whole
> procedure if need be.
>
> Hopefully I am overlooking something obvious.
>
> Groete
> Gerhardus
>
>
> To unsubscribe from this group, send an email to:
> ib-support-unsubscribe@egroups.com
>
>
>
> Your use of Yahoo! Groups is subject to
> http://docs.yahoo.com/info/terms/
>
>