[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master 2391573 11/22: Rename a variable, for tersene
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master 2391573 11/22: Rename a variable, for terseness |
Date: |
Sun, 6 Jun 2021 21:38:01 -0400 (EDT) |
branch: master
commit 2391573db2dcf3ac9d53d53c43b077a3904bfa0a
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>
Rename a variable, for terseness
---
zero.hpp | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/zero.hpp b/zero.hpp
index 0b255a4..35e7304 100644
--- a/zero.hpp
+++ b/zero.hpp
@@ -59,7 +59,7 @@ typedef std::pair<double,root_validity> root_type;
namespace detail
{
inline void expatiate
- (int & number_of_iterations
+ (int & n_iter
,std::ostream & os_trace
,interpolation_technique technique
,double x
@@ -69,7 +69,7 @@ inline void expatiate
if(os_trace.good())
{
os_trace
- << "iteration " << number_of_iterations++
+ << "iteration " << n_iter++
<< " " << "IBLQb"[technique]
<< " iterand " << x
<< " value " << fx
@@ -261,9 +261,9 @@ root_type decimal_root
{
static constexpr double epsilon {std::numeric_limits<double>::epsilon()};
- round_to<double> const round_dec {decimals, r_to_nearest};
+ round_to<double> const round_dec {decimals, r_to_nearest};
- int number_of_iterations {0};
+ int n_iter {0};
interpolation_technique technique {interpolate_initialization};
os_trace.precision(DECIMAL_DIG);
@@ -279,14 +279,14 @@ root_type decimal_root
}
double fa = static_cast<double>(f(a));
- detail::expatiate(number_of_iterations, os_trace, technique, a, fa);
+ detail::expatiate(n_iter, os_trace, technique, a, fa);
if(0.0 == fa) // Note 0.
{
return std::make_pair(a, root_is_valid);
}
double fb = static_cast<double>(f(b));
- detail::expatiate(number_of_iterations, os_trace, technique, b, fb);
+ detail::expatiate(n_iter, os_trace, technique, b, fb);
if(0.0 == fb) // Note 0 [bis].
{
return std::make_pair(b, root_is_valid);
@@ -410,7 +410,7 @@ root_type decimal_root
else
{
fb = static_cast<double>(f(b));
- detail::expatiate(number_of_iterations, os_trace, technique, b,
fb);
+ detail::expatiate(n_iter, os_trace, technique, b, fb);
}
}
}
- [lmi-commits] [lmi] master updated (f0526be -> 86661b6), Greg Chicares, 2021/06/06
- [lmi-commits] [lmi] master 7bd1245 01/22: Add a unit test: root of another unfriendly function, Greg Chicares, 2021/06/06
- [lmi-commits] [lmi] master c01b9b0 02/22: Improve concinnity, Greg Chicares, 2021/06/06
- [lmi-commits] [lmi] master 012967c 08/22: Diagnose any attempt to find a root in a zero-measure interval, Greg Chicares, 2021/06/06
- [lmi-commits] [lmi] master 83eb025 05/22: Rename a local variable, Greg Chicares, 2021/06/06
- [lmi-commits] [lmi] master ec0a308 06/22: Refactor, Greg Chicares, 2021/06/06
- [lmi-commits] [lmi] master 99aebcc 07/22: Treat decimal_root return value more flexibly, Greg Chicares, 2021/06/06
- [lmi-commits] [lmi] master 5c31ab3 09/22: Fix latent unit-test errors, Greg Chicares, 2021/06/06
- [lmi-commits] [lmi] master 2391573 11/22: Rename a variable, for terseness,
Greg Chicares <=
- [lmi-commits] [lmi] master b14e318 18/22: Adjust tolerance for a particular unit-test function, Greg Chicares, 2021/06/06
- [lmi-commits] [lmi] master 1c448d8 20/22: Augment decimal_root()'s return type, Greg Chicares, 2021/06/06
- [lmi-commits] [lmi] master 53c3513 21/22: Reorder unit tests, Greg Chicares, 2021/06/06
- [lmi-commits] [lmi] master 5cf534c 04/22: Constify, Greg Chicares, 2021/06/06
- [lmi-commits] [lmi] master 3865416 10/22: Rearrange certain unit tests, Greg Chicares, 2021/06/06
- [lmi-commits] [lmi] master 1f8316c 16/22: Test actual return value, Greg Chicares, 2021/06/06
- [lmi-commits] [lmi] master 3d4adb3 17/22: Clarify, Greg Chicares, 2021/06/06
- [lmi-commits] [lmi] master 200e756 03/22: Clarify documentation, Greg Chicares, 2021/06/06
- [lmi-commits] [lmi] master 1b0ed06 12/22: Change argument order, Greg Chicares, 2021/06/06
- [lmi-commits] [lmi] master 86661b6 22/22: Validate number of iterations, Greg Chicares, 2021/06/06