[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master d0a65c2 04/23: Demonstrate that Brent's δ ca
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master d0a65c2 04/23: Demonstrate that Brent's δ can be almost arbitrarily small |
Date: |
Tue, 27 Jul 2021 21:59:50 -0400 (EDT) |
branch: master
commit d0a65c20ddec49255972adee3656721e49abe170
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>
Demonstrate that Brent's δ can be almost arbitrarily small
---
zero_test.cpp | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/zero_test.cpp b/zero_test.cpp
index ff06add..6afd8e0 100644
--- a/zero_test.cpp
+++ b/zero_test.cpp
@@ -721,6 +721,15 @@ void test_various_functions()
test_a_decimal_function(f06, root_06, -2.1 , 1.9, 15 , __LINE__);
test_a_function (f06, root_06, 1.9, -2.1, 1.0e-15, __LINE__);
test_a_function (f06, root_06, -2.1 , 1.9, 1.0e-15, __LINE__);
+
+ // Here, the input tolerance is legitimately much smaller than ϵ.
+ // Brent describes 'tol' as positive, so it shouldn't be zero, yet
+ // it has no absolute minimum (other than DBL_TRUE_MIN) because
+ // it is a relative error. Thus, when ζ = 0, δ has no minimum at
+ // all (other than DBL_TRUE_MIN).
+ auto f07 = [](double x) {return 1.23 * (x - 1.0e-100);};
+ auto root_07 = 1.0e-100;
+ test_a_function(f07, root_07, 1.0e-10, 1.0e-200, 1.0e-150, __LINE__);
}
void test_hodgepodge()
- [lmi-commits] [lmi] master a041329 08/23: Consider bounds not to bracket a root if value at either is NaN, (continued)
- [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, 2021/07/27
- [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 <=
- [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
- [lmi-commits] [lmi] master d2dcbf8 15/23: Reduce complexity, Greg Chicares, 2021/07/27
- [lmi-commits] [lmi] master e93ca8f 17/23: Demonstration, for immediate reversion, Greg Chicares, 2021/07/27
- [lmi-commits] [lmi] master 4500338 22/23: Simplify, Greg Chicares, 2021/07/27
- [lmi-commits] [lmi] master 2ad4944 20/23: Record some more observations--no files changed, Greg Chicares, 2021/07/27