Improve precision tests

... and clean up some unnecessarily complicated code.