// has a condition number of almost 500,000 and the normal equation condition
// number is that squared. This means that we don't get the exact answer with
// a fast iterative solution.
// Thus, we have to check the residuals rather than testing that the answer matched
// the ideal.
assertEquals(0, m.times(x1).minus(b).norm(2), 1.0e-2);
assertEquals(0, m.transpose().times(m).times(x1).minus(m.transpose().times(b)).norm(2), 1.0e-7);
// and we need to check that the error estimates are pretty good.
assertEquals(m.times(x1).minus(b).norm(2), r.getResidualNorm(), 1.0e-5);
assertEquals(m.transpose().times(m).times(x1).minus(m.transpose().times(b)).norm(2), r.getNormalEquationResidual(), 1.0e-9);