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.42249999999 99
b= 1678.0000000000 000
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.78422546364 719
b= 1678.0000000000 0000
a*b = 335237.930328
because of these changes i am getting wrong values in furthur calculations.
i am not to find the solution.
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.42249999999 99
b= 1678.0000000000 000
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.78422546364 719
b= 1678.0000000000 0000
a*b = 335237.930328
because of these changes i am getting wrong values in furthur calculations.
i am not to find the solution.
Comment