Ensure uniform printing of nan and inf
Helps to make certain testsuite output identical cross-platform (fewer
spurious failures due to printf differences)
Adjust some test comparison thresholds for better platform-to-platform behavior.