From 7c59718101ae1f5f1dbab1a9118aa23ee1a9b3b4 Mon Sep 17 00:00:00 2001 From: Gang Wu Date: Tue, 31 Dec 2024 18:08:38 +0800 Subject: [PATCH] fix ut --- lang/c++/impl/json/JsonIO.hh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lang/c++/impl/json/JsonIO.hh b/lang/c++/impl/json/JsonIO.hh index b45752cbc62..f4d41091970 100644 --- a/lang/c++/impl/json/JsonIO.hh +++ b/lang/c++/impl/json/JsonIO.hh @@ -414,7 +414,7 @@ public: sep(); std::ostringstream oss; if (std::isfinite(t)) { - oss << std::setprecision(10) << t; + oss << std::setprecision(9) << t; } else if (std::isnan(t)) { oss << "NaN"; } else if (t == std::numeric_limits::infinity()) { @@ -431,7 +431,7 @@ public: sep(); std::ostringstream oss; if (std::isfinite(t)) { - oss << std::setprecision(18) << t; + oss << std::setprecision(17) << t; } else if (std::isnan(t)) { oss << "NaN"; } else if (t == std::numeric_limits::infinity()) {