lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [lmi] master ac211c61 7/8: Write DECIMAL_DIG where it's ob


From: Greg Chicares
Subject: [lmi-commits] [lmi] master ac211c61 7/8: Write DECIMAL_DIG where it's obviously intended
Date: Fri, 17 Jun 2022 17:16:28 -0400 (EDT)

branch: master
commit ac211c61fb22654f6ad4003a57066ad4c0d6ff38
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>

    Write DECIMAL_DIG where it's obviously intended
---
 ihs_crc_comp.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/ihs_crc_comp.cpp b/ihs_crc_comp.cpp
index f9884997..a2e85133 100644
--- a/ihs_crc_comp.cpp
+++ b/ihs_crc_comp.cpp
@@ -27,6 +27,7 @@
 
 #include <algorithm>
 #include <cctype>
+#include <cfloat>                       // DECIMAL_DIG
 #include <cmath>
 #include <cstdlib>
 #include <fstream>
@@ -311,7 +312,7 @@ void f_3(std::string const& line1, std::string const& line2)
         << '\n';
     std::streamsize const original_precision = std::cout.precision();
     std::cout
-        << std::setprecision(20)
+        << std::setprecision(DECIMAL_DIG)
         << rel_err
         << "  " << d1
         << " vs. " << d2



reply via email to

[Prev in Thread] Current Thread [Next in Thread]