I need to convert a string to a double number. The usual double.Parse method returns approximation of the value. As I went through the forum here, I found the solution to be
int precision = 100000;//I want 5 digits after the decimal double value = exMath.Truncate(double.Parse(STRING) * precision) / precision;
The code works exactly as expected with the Microsoft Emulator, the string “0.03375” yields the value 0,03375. When I run the same code in the ChipworkX, however, I get the value 0,03374. Am i missing something?