I have a c++ component. It exposes an API which accept two double values:
say:
void Multiply(double a, double b);
if i call this API from a C# code using PInoke and pass the values
a=199.4225
b=1678
a*b = 335237.92955
andi debug the code and found that in the Autos window the values are actually
a= 199.4224999999999
b= 1678.0000000000000
If i call this method from a c++ code and pass the same values of a and b.
I debug the code and Autos window show s the values:
a= 199.78422546364719
b= 1678.00000000000000
a*b = 335237.930328
because of these changes i am getting wrong values in furthur calculations.
i am not to find the solution.