Pull mat-equal out to common code.
Add residual tests.
Add mat-negate.
Fix approx-equal-p.