Skip to content

Commit

Permalink
fix ut
Browse files Browse the repository at this point in the history
  • Loading branch information
wgtmac committed Dec 31, 2024
1 parent 0e0d315 commit 7c59718
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lang/c++/impl/json/JsonIO.hh
Original file line number Diff line number Diff line change
Expand Up @@ -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<float>::infinity()) {
Expand All @@ -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<double>::infinity()) {
Expand Down

0 comments on commit 7c59718

Please sign in to comment.