Hi

I have an issue in the following expression

a = b * (a call to Dt will return some real value)/1000;

example with data : a = 200000 * (0.6/1000);

Iam getting result as 119.9999999999; but is should get 120.0;

when iam writing expression as below, iam able to get the expected output.

a = b * (a call to Dt will return some real value);

a = a/1000;

Thanks,

--Vijay

Hi,

If you make that same calculation in Java, you will see that this is because of the (lack of) precision of the double primitive type (a real is really just a double).

What you need to do is to round it to the correct number of decimal places, that should give you the answer you need. 119.999... is equivalent to 120.0, for a certain precision.

Regards,

Jostein