[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
- [lmi-commits] [lmi] master updated (7d0257a3 -> 876d4b5b), Greg Chicares, 2022/06/17
- [lmi-commits] [lmi] master bcd3e721 2/8: Make relative-error function generally available, Greg Chicares, 2022/06/17
- [lmi-commits] [lmi] master ac211c61 7/8: Write DECIMAL_DIG where it's obviously intended,
Greg Chicares <=
- [lmi-commits] [lmi] master 876d4b5b 8/8: Remove unhelpful defect markers [265], Greg Chicares, 2022/06/17
- [lmi-commits] [lmi] master 79298e8c 1/8: Avoid left shift of a negative signed integer in fdlibm, Greg Chicares, 2022/06/17
- [lmi-commits] [lmi] master 08ec6337 4/8: Genericize relative_error(), Greg Chicares, 2022/06/17
- [lmi-commits] [lmi] master 4eb11e23 5/8: Use relative_error, Greg Chicares, 2022/06/17
- [lmi-commits] [lmi] master 8dfc0348 6/8: Remove an obsolete comment, Greg Chicares, 2022/06/17
- [lmi-commits] [lmi] master 0c922cb6 3/8: Rename rel_err() --> relative_error(), Greg Chicares, 2022/06/17