[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master a1a1901 11/13: Refactor
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master a1a1901 11/13: Refactor |
Date: |
Sun, 4 Jul 2021 19:04:45 -0400 (EDT) |
branch: master
commit a1a19012a1513da8de530b16beeb090d4df0d01a
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>
Refactor
Write the root of 'f01' as 'root_01' rather than as a floating literal.
---
zero_test.cpp | 32 ++++++++++++++++----------------
1 file changed, 16 insertions(+), 16 deletions(-)
diff --git a/zero_test.cpp b/zero_test.cpp
index 90796c6..3c9c035 100644
--- a/zero_test.cpp
+++ b/zero_test.cpp
@@ -502,22 +502,22 @@ void test_various_functions()
// within tolerance, ignoring roundoff in the computed function.
// That may very often be useful, but it can produce spurious
// failures, as in these three commented-out lines:
-// test_a_decimal_function(f01, 0.0, -1.0, 4.0, 20, __LINE__, 169);
-// test_a_function (f01, 0.0, -1.0, 4.0, 0.5 * 1.0e-20, __LINE__);
-// test_a_decimal_function(f01, 0.0, -1.0, 4.0, 19, __LINE__, 171);
-// test_a_function (f01, 0.0, -1.0, 4.0, 0.5 * 1.0e-19, __LINE__);
-// test_a_decimal_function(f01, 0.0, -1.0, 4.0, 18, __LINE__, 168);
-// test_a_function (f01, 0.0, -1.0, 4.0, 0.5 * 1.0e-18, __LINE__);
- test_a_decimal_function(f01, 0.0, -1.0, 4.0, 17, __LINE__, 163);
- test_a_function (f01, 0.0, -1.0, 4.0, 0.5 * 1.0e-17, __LINE__);
- test_a_decimal_function(f01, 0.0, -1.0, 4.0, 16, __LINE__, 156);
- test_a_function (f01, 0.0, -1.0, 4.0, 0.5 * 1.0e-16, __LINE__);
- test_a_decimal_function(f01, 0.0, -1.0, 4.0, 15, __LINE__, 142);
- test_a_function (f01, 0.0, -1.0, 4.0, 0.5 * 1.0e-15, __LINE__);
- test_a_decimal_function(f01, 0.0, -1.0, 4.0, 14, __LINE__, 128);
- test_a_function (f01, 0.0, -1.0, 4.0, 0.5 * 1.0e-14, __LINE__);
- test_a_decimal_function(f01, 0.0, -1.0, 4.0, 12, __LINE__, 112);
- test_a_function (f01, 0.0, -1.0, 4.0, 0.5 * 1.0e-12, __LINE__);
+// test_a_decimal_function(f01, root_01, -1.0, 4.0, 20, __LINE__, 169);
+// test_a_function (f01, root_01, -1.0, 4.0, 0.5 * 1.0e-20, __LINE__);
+// test_a_decimal_function(f01, root_01, -1.0, 4.0, 19, __LINE__, 171);
+// test_a_function (f01, root_01, -1.0, 4.0, 0.5 * 1.0e-19, __LINE__);
+// test_a_decimal_function(f01, root_01, -1.0, 4.0, 18, __LINE__, 168);
+// test_a_function (f01, root_01, -1.0, 4.0, 0.5 * 1.0e-18, __LINE__);
+ test_a_decimal_function(f01, root_01, -1.0, 4.0, 17, __LINE__, 163);
+ test_a_function (f01, root_01, -1.0, 4.0, 0.5 * 1.0e-17, __LINE__);
+ test_a_decimal_function(f01, root_01, -1.0, 4.0, 16, __LINE__, 156);
+ test_a_function (f01, root_01, -1.0, 4.0, 0.5 * 1.0e-16, __LINE__);
+ test_a_decimal_function(f01, root_01, -1.0, 4.0, 15, __LINE__, 142);
+ test_a_function (f01, root_01, -1.0, 4.0, 0.5 * 1.0e-15, __LINE__);
+ test_a_decimal_function(f01, root_01, -1.0, 4.0, 14, __LINE__, 128);
+ test_a_function (f01, root_01, -1.0, 4.0, 0.5 * 1.0e-14, __LINE__);
+ test_a_decimal_function(f01, root_01, -1.0, 4.0, 12, __LINE__, 112);
+ test_a_function (f01, root_01, -1.0, 4.0, 0.5 * 1.0e-12, __LINE__);
auto f02 = [](double x) {return std::pow(x - 1.7, 17.0);};
auto root_02 = 1.7;
- [lmi-commits] [lmi] master aaadfe1 05/13: Translate the ALGOL scrolls more literally, (continued)
- [lmi-commits] [lmi] master aaadfe1 05/13: Translate the ALGOL scrolls more literally, Greg Chicares, 2021/07/04
- [lmi-commits] [lmi] master e68be69 07/13: Test lmi_root() against reference implementation, Greg Chicares, 2021/07/04
- [lmi-commits] [lmi] master 41d1896 08/13: Move some tests out of a hodgepodge, Greg Chicares, 2021/07/04
- [lmi-commits] [lmi] master 0e29fb4 10/13: Augment a block of unit tests, Greg Chicares, 2021/07/04
- [lmi-commits] [lmi] master bf65f24 12/13: Remove duplicative tests, Greg Chicares, 2021/07/04
- [lmi-commits] [lmi] master 28955d1 01/13: Refactor for flexibility, Greg Chicares, 2021/07/04
- [lmi-commits] [lmi] master 8a1404f 02/13: Describe the preceding commit, Greg Chicares, 2021/07/04
- [lmi-commits] [lmi] master e6b40ee 04/13: Write root-finder arguments in a more natural order, Greg Chicares, 2021/07/04
- [lmi-commits] [lmi] master d5bd712 06/13: Add an instrumented reference implementation, Greg Chicares, 2021/07/04
- [lmi-commits] [lmi] master 9be9b1d 09/13: Refactor, Greg Chicares, 2021/07/04
- [lmi-commits] [lmi] master a1a1901 11/13: Refactor,
Greg Chicares <=
- [lmi-commits] [lmi] master 55873f1 13/13: Test an uncommon code path, Greg Chicares, 2021/07/04