Making the test tougher.
This commit is contained in:
parent
7eb7cd265a
commit
8f704fdb7c
|
@ -54,7 +54,7 @@ inline void foundFloat(double result, const u8 * buf) {
|
||||||
parse_error |= PARSE_ERROR;
|
parse_error |= PARSE_ERROR;
|
||||||
}
|
}
|
||||||
// we want to get some reasonable relative accuracy
|
// we want to get some reasonable relative accuracy
|
||||||
if(fabs(expected - result)/fmax(fabs(expected),fabs(result)) > 0.000000000000001) {
|
if(fabs(expected - result)/fmin(fabs(expected),fabs(result)) > 0.000000000000001) {
|
||||||
printf("parsed %.32f from \n", result);
|
printf("parsed %.32f from \n", result);
|
||||||
printf(" %.32s whereas strtod gives\n", buf);
|
printf(" %.32s whereas strtod gives\n", buf);
|
||||||
printf(" %.32f,", expected);
|
printf(" %.32f,", expected);
|
||||||
|
|
Loading…
Reference in New Issue