More verbose error report.

This commit is contained in:
Daniel Lemire 2022-11-16 12:29:46 -05:00
parent 2c8e738950
commit 95321767ee

View File

@ -141,11 +141,15 @@ bool check_file(std::string file_name) {
// Compare with expected results
if (float32_parsed != float32) {
std::cout << "bad 32 " << str << std::endl;
std::cout << "parsed = " << iHexAndDec(float32_parsed) << ", expectd = " << iHexAndDec(float32) << std::endl;
std::cout << "fesetround: " << round_name(d) << std::endl;
fesetround(FE_TONEAREST);
return false;
}
if (float64_parsed != float64) {
std::cout << "bad 64 " << str << std::endl;
std::cout << "parsed = " << iHexAndDec(float64_parsed) << ", expectd = " << iHexAndDec(float64) << std::endl;
std::cout << "fesetround: " << round_name(d) << std::endl;
fesetround(FE_TONEAREST);
return false;
}