I am currently Debugging a Software that I translated from C++ to C#. Everything goes fine until one values in C# is different from C++. the computation is :
v2z = vBlock.z * cos(phi) + v1x * sin(phi);
where
phi = 0.800, vBlock.z =-3.6127196945104552 and v1x= 4.5158996181380688
the result i C++ is
4.4408920985006262e-16
in C# the result is
0
And that is the Problem because in my condition later I need a value v2z >0.
After reading Topics on that subject I found These one interesting Formatting doubles for output in C#. I thought I could use the DoubleConverter.ToexactString() onto my C# values but that doesn't worked. Do you have any Ideas how to get exact the same values in C# as in C++?