Y
ywchan
I have written the following codes:
double mean = 313.4;
int fieldValue = 321;
double result = ((double)fieldValue) - mean;
MessageBox.Show(result.ToString());
MessageBox.Show(Math.Pow(result,2).ToString());
However, for the value of result, I got 7.6000000000000227 instead of 7.6
This made my calculation wrong...
Any idea to solve it?
double mean = 313.4;
int fieldValue = 321;
double result = ((double)fieldValue) - mean;
MessageBox.Show(result.ToString());
MessageBox.Show(Math.Pow(result,2).ToString());
However, for the value of result, I got 7.6000000000000227 instead of 7.6
This made my calculation wrong...
Any idea to solve it?