added utility for testing approximate matrix equality