lmi-commits
[Top][All Lists]
Advanced

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

[lmi-commits] [lmi] master f576a4b 11/23: Augment unit test


From: Greg Chicares
Subject: [lmi-commits] [lmi] master f576a4b 11/23: Augment unit test
Date: Tue, 27 Jul 2021 21:59:52 -0400 (EDT)

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

    Augment unit test
    
    Motivation: Interpolations such as these arise when bounds are extremely
    large, and can lead to catastrophic cancellation.
---
 zero_test.cpp | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/zero_test.cpp b/zero_test.cpp
index a13b60e..fd6b326 100644
--- a/zero_test.cpp
+++ b/zero_test.cpp
@@ -439,6 +439,10 @@ void test_binary64_midpoint()
 
     LMI_TEST(materially_equal(5.59376e-155, binary64_midpoint(0.0,  0.25), 
1.0e-5));
 
+    LMI_TEST(materially_equal(1.09631e-104, binary64_midpoint(0.0, 1.0e100), 
1.0e-5));
+    LMI_TEST(materially_equal(1.09631e-104, binary64_midpoint(1.0e100, 0.0), 
1.0e-5));
+    LMI_TEST(materially_equal(0.000106605 , binary64_midpoint(0.0, 1.0e300), 
1.0e-5));
+
     LMI_TEST(materially_equal( 2.65703e-154, binary64_midpoint( 0.0,  6.25), 
1.0e-5));
     LMI_TEST(materially_equal( 2.65703e-154, binary64_midpoint(-0.0,  6.25), 
1.0e-5));
     LMI_TEST(materially_equal(-2.65703e-154, binary64_midpoint( 0.0, -6.25), 
1.0e-5));



reply via email to

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