Source code
Revision control
Copy as Markdown
Other Tools
diff --git a/double-conversion/double-to-string.cc b/double-conversion/double-to-string.cc
--- a/double-conversion/double-to-string.cc
+++ b/double-conversion/double-to-string.cc
@@ -212,16 +212,12 @@ bool DoubleToStringConverter::ToShortestIeeeNumber(
bool DoubleToStringConverter::ToFixed(double value,
int requested_digits,
StringBuilder* result_builder) const {
- DOUBLE_CONVERSION_ASSERT(kMaxFixedDigitsBeforePoint == 60);
- const double kFirstNonFixed = 1e60;
-
if (Double(value).IsSpecial()) {
return HandleSpecialValues(value, result_builder);
}
if (requested_digits < 0) return false;
if (requested_digits > kMaxFixedDigitsAfterPoint) return false;
- if (value >= kFirstNonFixed || value <= -kFirstNonFixed) return false;
// Find a sufficiently precise decimal representation of n.
int decimal_point;
diff --git a/double-conversion/double-to-string.h b/double-conversion/double-to-string.h
--- a/double-conversion/double-to-string.h
+++ b/double-conversion/double-to-string.h
@@ -38,7 +38,7 @@ class DoubleToStringConverter {
// When calling ToFixed with a double > 10^kMaxFixedDigitsBeforePoint
// or a requested_digits parameter > kMaxFixedDigitsAfterPoint then the
// function returns false.
- static const int kMaxFixedDigitsBeforePoint = 60;
+ static const int kMaxFixedDigitsBeforePoint = 309;
static const int kMaxFixedDigitsAfterPoint = 100;
// When calling ToExponential with a requested_digits