lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [lmi] master 4561782 2/5: Elaborate another unit test


From: Greg Chicares
Subject: [lmi-commits] [lmi] master 4561782 2/5: Elaborate another unit test
Date: Mon, 2 Aug 2021 18:25:15 -0400 (EDT)

branch: master
commit 4561782f5691e10aa4573ea6c97ca8d42491e34c
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>

    Elaborate another unit test
---
 zero_test.cpp | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/zero_test.cpp b/zero_test.cpp
index 22ed1c7..1c79aab 100644
--- a/zero_test.cpp
+++ b/zero_test.cpp
@@ -1140,7 +1140,14 @@ void test_hodgepodge()
     r = lmi_root(signum_offset, -1.0e300, 1.0e300, 5.0e-19, 0);
     LMI_TEST(root_is_valid == r.validity);
     LMI_TEST(materially_equal(-1.0 / 3.0, r.root));
-    LMI_TEST_RELATION(64,<=,r.n_eval);
+    LMI_TEST_RELATION(r.n_eval,==,64);
+
+    // Similarly test decimal_root, using a narrower interval because
+    // round_to() cannot handle 1.0e300 (defectively, perhaps).
+    r = decimal_root(signum_offset, -1.0e30, 1.0e30, bias_none, 16, 0);
+    LMI_TEST(root_is_valid == r.validity);
+    LMI_TEST(materially_equal(-1.0 / 3.0, r.root));
+    LMI_TEST_RELATION(r.n_eval,<=,64);
 }
 
 void test_former_rounding_problem()



reply via email to

[Prev in Thread] Current Thread [Next in Thread]