commit | 0d25506a2e7fb52928963313343e0237e890059e | [log] [tgz] |
---|---|---|
author | Florian Loitsch <florian@loitsch.com> | Sat Jul 26 14:57:45 2014 +0200 |
committer | Florian Loitsch <florian@loitsch.com> | Sat Jul 26 14:57:45 2014 +0200 |
tree | 8b1200e5211550c1af97ed8f6467cc13db274bb1 | |
parent | 24099d52dca15a9ce7c90b7e6226cc33dde83071 [diff] |
error can shift more than 32 bits. See issue 47.
diff --git a/src/strtod.cc b/src/strtod.cc index 3471756..17abcbb 100644 --- a/src/strtod.cc +++ b/src/strtod.cc
@@ -286,7 +286,7 @@ const int kDenominator = 1 << kDenominatorLog; // Move the remaining decimals into the exponent. exponent += remaining_decimals; - int error = (remaining_decimals == 0 ? 0 : kDenominator / 2); + uint64_t error = (remaining_decimals == 0 ? 0 : kDenominator / 2); int old_e = input.e(); input.Normalize();