Mryange commented on code in PR #50940:
URL: https://github.com/apache/doris/pull/50940#discussion_r2165522287


##########
be/src/gutil/strings/numbers.cc:
##########
@@ -406,14 +406,29 @@ int FloatToBuffer(float value, int width, char* buffer) {
     return snprintf_result;
 }
 
+// refer to: 
https://en.cppreference.com/w/cpp/types/numeric_limits/max_digits10.html
 int FastDoubleToBuffer(double value, char* buffer) {
-    auto end = fmt::format_to(buffer, FMT_COMPILE("{}"), value);
+    auto* end = fmt::format_to(buffer, FMT_COMPILE("{:.17g}"), value);
     *end = '\0';
     return end - buffer;
 }
 
 int FastFloatToBuffer(float value, char* buffer) {
-    auto* end = fmt::format_to(buffer, FMT_COMPILE("{}"), value);
+    /*

Review Comment:
   我们这个pr里面应该没有考虑to string的问题



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to