Added functions to test for order of magnitude