I am using QuickCheck to test my code for some numeric calculations. Basically I have an exact function and several approximations of it that are much more efficient.
I'm currently implementing the properties I want to test something like:
prop_blah input = (abs $ (exact input)-(approx input)) < threshold
But it would be really nice to know exactly how accurate each of the approximation algorithms is and compare them with each other. One easy way to do this would be to get reports of the mean and standard deviation of the left hand side of the inequality. Is this somehow possible?
approx
will not be a factor x away from the correct answer, with that knowledge the quickcheck property is trivial. That is, it might help to analyze your approx function theoretically. – Shaven