[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master 3865416 10/22: Rearrange certain unit tests
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master 3865416 10/22: Rearrange certain unit tests |
Date: |
Sun, 6 Jun 2021 21:38:01 -0400 (EDT) |
branch: master
commit 38654169acb36ade9f80c7d834fe192d951d4550
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>
Rearrange certain unit tests
---
zero_test.cpp | 23 +++++++++++------------
1 file changed, 11 insertions(+), 12 deletions(-)
diff --git a/zero_test.cpp b/zero_test.cpp
index 3cde119..c1b0e29 100644
--- a/zero_test.cpp
+++ b/zero_test.cpp
@@ -222,14 +222,17 @@ int test_main(int, char*[])
// Various tests--see function-template definition.
- test_zero(0.5, 5.0, 1, e, std::exp(1.0));
- test_zero(0.5, 5.0, 2, e, std::exp(1.0));
- test_zero(0.5, 5.0, 3, e, std::exp(1.0));
- test_zero(0.5, 5.0, 4, e, std::exp(1.0));
- test_zero(0.5, 5.0, 5, e, std::exp(1.0));
- test_zero(0.5, 5.0, 6, e, std::exp(1.0));
- test_zero(0.5, 5.0, 7, e, std::exp(1.0));
- test_zero(0.5, 5.0, 8, e, std::exp(1.0));
+ test_zero(-1.0e100, 4.0e100, -100, e, std::exp(1.0));
+ test_zero(-1.0 , 4.0 , 0, e, std::exp(1.0));
+ test_zero( 0.5 , 5.0 , 1, e, std::exp(1.0));
+ test_zero( 0.5 , 5.0 , 2, e, std::exp(1.0));
+ test_zero( 0.5 , 5.0 , 3, e, std::exp(1.0));
+ test_zero( 0.5 , 5.0 , 4, e, std::exp(1.0));
+ test_zero( 0.5 , 5.0 , 5, e, std::exp(1.0));
+ test_zero( 0.5 , 5.0 , 6, e, std::exp(1.0));
+ test_zero( 0.5 , 5.0 , 7, e, std::exp(1.0));
+ test_zero( 0.5 , 5.0 , 8, e, std::exp(1.0));
+ test_zero(-1.0 , 4.0 , 100, e, std::exp(1.0));
// Brent's book uses the nineteenth-power function in examples.
// His example using a tolerance of 1e-20 is subject to underflow
@@ -251,10 +254,6 @@ int test_main(int, char*[])
double d = brent_zero(-1.0, 4.0, 1.0e-20, e_19);
LMI_TEST(std::fabs(d) <= epsilon);
- test_zero(-1.0e100, 4.0e100, -100, e, std::exp(1.0));
- test_zero(-1.0 , 4.0 , 0, e, std::exp(1.0));
- test_zero(-1.0 , 4.0 , 100, e, std::exp(1.0));
-
d = brent_zero(-100.0, 100.0, 1.0e-20, eq_2_1);
LMI_TEST(-100.0 <= d && d <= -100.0 * (1.0 - 6.0 * epsilon));
- [lmi-commits] [lmi] master 012967c 08/22: Diagnose any attempt to find a root in a zero-measure interval, (continued)
- [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, 2021/06/06
- [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 <=
- [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
- [lmi-commits] [lmi] master 9027fef 13/22: Refactor, Greg Chicares, 2021/06/06
- [lmi-commits] [lmi] master c1a020a 14/22: Include appropriate headers, and say why they're included, Greg Chicares, 2021/06/06
- [lmi-commits] [lmi] master 4d9ed2d 19/22: Abstract the Brent error limit, Greg Chicares, 2021/06/06
- [lmi-commits] [lmi] master 776f09c 15/22: Return a struct rather than a std::pair, Greg Chicares, 2021/06/06