Fix the matrix inversion test to avoid floating point issues.
Merge pull request #681 from starwed/math-test-fix

Fix the matrix inversion test to avoid floating point issues.