add some verification against MATLAB output

Add a new test which checks that the output from the Python code matches that
of MATLAB to within tolerance. We allow quite some slop because MATLAB is less clear about when things are done with single and when they're done with double precision.