Verbose basictest

This commit is contained in:
Daniel Lemire 2019-10-24 16:40:40 -04:00
parent 59cad23aeb
commit 1ece6c0e2f
1 changed files with 4 additions and 0 deletions

View File

@ -143,8 +143,12 @@ bool number_test_powers_of_ten() {
}
} else {
double x = pjh.get_double();
double expected = std::pow(10, i);
if(x != std::pow(10, i)) {
printf("failed to parse %s. \n", buf);
int ulp = (int) f64_ulp_dist(x, expected);
printf("actual: %.20f expected: %.20f \n", x, expected);
printf("ULP: %d \n", ulp);
return false;
}
}