generates data for precision test
This program will run 1 million of the following experiment:
- generate two random points in the range given by the first argument
- compute the line joining these two points
- compute the distance between the points and the line
Eventually, it will print several computed value:
- range
- min coordinate value
- max coordinate value
- mean distance value
- max distance value
- mean distance value (computed with the "running std" method)
- standard deviation of distance value
Standard deviation is computed using a "single pass" algorithm, see https://en.wikipedia.org/wiki/Algorithms_for_calculating_variance
To run that experiment on several ranges use the provided target:
$ make dtest1