I have an array that contains seven numbers:
array(159.60, 159.60, 159.60, 159.60, 159.60, 199.50, 199.50);
array(395.68, 395.68, 395.68, 395.68, 395.68, 395.68, 395.68);
array(531.18, 531.18, 531.18, 531.19, 531.18, 531.18, 531.18);
I need to check if all values are same, with one twist: sometimes the values differ slightly because of rounding off errors (see 4th value in 3rd array). I want them considered same.
What would be the best way to check if all array values are same within a tolerance value, say 0.1.