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.Code://detrmn_accuracy function double detrmn_accuracy (double calc_pi, double pi) { //declare local variables double accuracy; double diff; //function diff = calc_pi - pi; accuracy = fabs(diff); return accuracy; }