Fallback strtod() when not able to do fast-path

This shall generate best possible precision (if strtod() is correctly
implemented). Need more unit tests and performance tests. May add an
option for accepting precision error. Otherwise LUT in Pow10() can be
reduced.
This commit is contained in:
miloyip
2014-09-03 01:02:38 +08:00
parent a46d152218
commit 0580d42d11
2 changed files with 74 additions and 52 deletions

View File

@@ -119,7 +119,9 @@ TEST(Reader, ParseNumberHandler) {
Reader reader; \
reader.Parse(s, h); \
EXPECT_EQ(1u, h.step_); \
EXPECT_DOUBLE_EQ(x, h.actual_); \
EXPECT_EQ(x, h.actual_); \
if (x != h.actual_) \
printf(" Actual: %.17g\nExpected: %.17g\n", h.actual_, x);\
}
TEST_NUMBER(ParseUintHandler, "0", 0);