[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master 858d037 09/13: Include appropriate headers, a
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master 858d037 09/13: Include appropriate headers, and say why they're included |
Date: |
Fri, 9 Apr 2021 18:42:37 -0400 (EDT) |
branch: master
commit 858d037fc4f0fa3f2d0a32014025c1eb14c66e93
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>
Include appropriate headers, and say why they're included
---
round_to.hpp | 4 ++--
round_to_test.cpp | 3 +++
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/round_to.hpp b/round_to.hpp
index 4502878..2339732 100644
--- a/round_to.hpp
+++ b/round_to.hpp
@@ -28,10 +28,10 @@
#include "mc_enum_type_enums.hpp" // enum rounding_style
#include "stl_extensions.hpp" // nonstd::power()
-#include <cmath>
+#include <cmath> // fabs(), floor(), rint()
#include <limits>
#include <stdexcept>
-#include <type_traits>
+#include <type_traits> // is_floating_point_v
#include <vector>
// Round a floating-point number to a given number of decimal places,
diff --git a/round_to_test.cpp b/round_to_test.cpp
index 41d0b1c..3b331ca 100644
--- a/round_to_test.cpp
+++ b/round_to_test.cpp
@@ -31,9 +31,12 @@
#include <algorithm> // max()
#include <cfloat> // DECIMAL_DIG
#include <climits> // INT_MIN
+#include <cmath> // fabs()
#include <ios>
#include <iostream>
+#include <limits>
#include <ostream>
+#include <stdexcept>
// Print name of software rounding style for diagnostics.
char const* get_name_of_style(rounding_style style)
- [lmi-commits] [lmi] master 79741b1 01/13: Assert a precondition more consistently, (continued)
- [lmi-commits] [lmi] master 79741b1 01/13: Assert a precondition more consistently, Greg Chicares, 2021/04/09
- [lmi-commits] [lmi] master 358c5c9 06/13: Modernize, Greg Chicares, 2021/04/09
- [lmi-commits] [lmi] master edb098f 02/13: Strengthen unit tests, Greg Chicares, 2021/04/09
- [lmi-commits] [lmi] master 2a3d961 03/13: Measure cost of a needless transcendental calculation, Greg Chicares, 2021/04/09
- [lmi-commits] [lmi] master 6bc828a 05/13: Realign, Greg Chicares, 2021/04/09
- [lmi-commits] [lmi] master 290dc89 10/13: Remove a source of inaccuracy [285], Greg Chicares, 2021/04/09
- [lmi-commits] [lmi] master a32cee0 13/13: Hoist a division, Greg Chicares, 2021/04/09
- [lmi-commits] [lmi] master 1e49ee3 04/13: Revise 'round_to' documentation [286], Greg Chicares, 2021/04/09
- [lmi-commits] [lmi] master 1bead9e 08/13: Purge unwanted, commented-out code, Greg Chicares, 2021/04/09
- [lmi-commits] [lmi] master ce9ed5c 07/13: Add an inchoate test of power-of-ten scaling, Greg Chicares, 2021/04/09
- [lmi-commits] [lmi] master 858d037 09/13: Include appropriate headers, and say why they're included,
Greg Chicares <=
- [lmi-commits] [lmi] master ca63009 11/13: Expunge an obsolete comment, Greg Chicares, 2021/04/09
- [lmi-commits] [lmi] master c41faec 12/13: Resolve a marked defect [284], Greg Chicares, 2021/04/09