[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master 86ae65d 18/23: Revert "Demonstration, for imm
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master 86ae65d 18/23: Revert "Demonstration, for immediate reversion" |
Date: |
Tue, 27 Jul 2021 21:59:54 -0400 (EDT) |
branch: master
commit 86ae65d555031f3c564450fee20ff01955202b45
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>
Revert "Demonstration, for immediate reversion"
This reverts commit e93ca8fb1dfbfce2d2588b087efb0c7bbf534caf.
---
zero.hpp | 3 +--
zero_test.cpp | 10 +++++-----
2 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/zero.hpp b/zero.hpp
index eaf527f..1b89b0f 100644
--- a/zero.hpp
+++ b/zero.hpp
@@ -613,10 +613,9 @@ root_type decimal_root
std::unordered_map<double,double> m;
- auto fr = [&](double& x) // f(), rounded
+ auto fr = [&](double x) // f(), rounded
{
double const r = round_dec(x);
- x = r; // Change the reference argument--demonstration only
auto const i = m.find(r);
if(m.end() != i)
{
diff --git a/zero_test.cpp b/zero_test.cpp
index 962f879..28696cc 100644
--- a/zero_test.cpp
+++ b/zero_test.cpp
@@ -204,7 +204,7 @@ void test_a_decimal_function
#if defined LMI_X86_64 && defined LMI_POSIX
if(0 != n_eval)
{
-//// INVOKE_LMI_TEST_EQUAL(n_eval, r.n_eval, file, line);
+ INVOKE_LMI_TEST_EQUAL(n_eval, r.n_eval, file, line);
}
#endif // defined LMI_X86_64 && defined LMI_POSIX
stifle_warning_for_unused_variable(n_eval);
@@ -767,7 +767,7 @@ void test_celebrated_equation()
return value: +2.09455148154232650981 (rounded)
)--cut-here--";
-////LMI_TEST_EQUAL(verified, oss.str());
+ LMI_TEST_EQUAL(verified, oss.str());
#endif // defined LMI_X86_64 && defined LMI_POSIX
}
@@ -933,7 +933,7 @@ void test_hodgepodge()
// succeed, because floating-point behavior is determinate;
// but small variations betoken no catastrophe.
LMI_TEST_RELATION(159,<=,r.n_eval); // weak
-////LMI_TEST_RELATION(r.n_eval,<=,166); // weak
+ LMI_TEST_RELATION(r.n_eval,<=,166); // weak
d = brent_zero(eq_2_1, -100.0, 100.0, 0.5);
zeta = -100.0;
@@ -946,7 +946,7 @@ void test_hodgepodge()
LMI_TEST(10 == max_n_eval_bolzano(-100.0, 100.0, 0.5, -100.0));
LMI_TEST(98 == max_n_eval_brent (-100.0, 100.0, 0.5, -100.0));
LMI_TEST(r.n_eval <= 98);
-////LMI_TEST_EQUAL(11, r.n_eval); // weak
+ LMI_TEST_EQUAL(11, r.n_eval); // weak
// Number of evaluations required:
// 23 for brent_zero() [above]
// 20 for decimal_root()
@@ -972,7 +972,7 @@ void test_hodgepodge()
LMI_TEST( 53 == max_n_eval_bolzano(-100.0, 100.0, 0.0, -100.0));
LMI_TEST(2807 == max_n_eval_brent (-100.0, 100.0, 0.0, -100.0));
LMI_TEST(r.n_eval <= 2807);
-////LMI_TEST_EQUAL(67, r.n_eval); // weak
+ LMI_TEST_EQUAL(67, r.n_eval); // weak
r = decimal_root(signum_offset, -1.0, 1.0, bias_none, 13);
LMI_TEST(root_is_valid == r.validity);
- [lmi-commits] [lmi] master updated (d6bd802 -> 028b454), Greg Chicares, 2021/07/27
- [lmi-commits] [lmi] master eea9469 02/23: Ignore an immaterial i686 deviation, Greg Chicares, 2021/07/27
- [lmi-commits] [lmi] master a041329 08/23: Consider bounds not to bracket a root if value at either is NaN, Greg Chicares, 2021/07/27
- [lmi-commits] [lmi] master c9c50dc 07/23: Add a specialized midpoint function for root finding, Greg Chicares, 2021/07/27
- [lmi-commits] [lmi] master f576a4b 11/23: Augment unit test, Greg Chicares, 2021/07/27
- [lmi-commits] [lmi] master dc63e62 16/23: Cache evaluations for rounded decimal solves, Greg Chicares, 2021/07/27
- [lmi-commits] [lmi] master cecc91f 21/23: Avoid a unit-test false negative, Greg Chicares, 2021/07/27
- [lmi-commits] [lmi] master 4b26bf8 01/23: Add a parenthetical comment to a unit test, Greg Chicares, 2021/07/27
- [lmi-commits] [lmi] master 86ae65d 18/23: Revert "Demonstration, for immediate reversion",
Greg Chicares <=
- [lmi-commits] [lmi] master e59df26 14/23: Refactor, Greg Chicares, 2021/07/27
- [lmi-commits] [lmi] master 8f2f355 19/23: Augment unit tests; record some observations, Greg Chicares, 2021/07/27
- [lmi-commits] [lmi] master a259cb6 05/23: Calculate maximum possible number of iterations, Greg Chicares, 2021/07/27
- [lmi-commits] [lmi] master d0a65c2 04/23: Demonstrate that Brent's δ can be almost arbitrarily small, Greg Chicares, 2021/07/27
- [lmi-commits] [lmi] master 548f9ab 06/23: Document known shortcomings of a unit-testing helper, Greg Chicares, 2021/07/27
- [lmi-commits] [lmi] master 19a4a3a 03/23: For now at least, trace solves in regression test, Greg Chicares, 2021/07/27
- [lmi-commits] [lmi] master 04c58eb 09/23: Count iterations and evaluations separately, Greg Chicares, 2021/07/27
- [lmi-commits] [lmi] master bbf2517 10/23: Use signum() where a signum function is wanted, Greg Chicares, 2021/07/27
- [lmi-commits] [lmi] master e08be34 12/23: Improve a unit test, Greg Chicares, 2021/07/27
- [lmi-commits] [lmi] master 02dde17 13/23: Avoid catastrophic cancellation, Greg Chicares, 2021/07/27