determine how many 0's are in a number (value)
Does anybody know how I can determine how many 0's are in a number to determine decimal value accuracy?
here is my function:
The function is supposed to subtract an estimated value of pi from actual pi and determine how close the estimated value is to actual value. Right now, it only outputs the difference between the two values. Thanks.
double detrmn_accuracy (double calc_pi, double pi)
//declare local variables
diff = calc_pi - pi;
accuracy = fabs(diff);