lmi-commits
[Top][All Lists]
Advanced

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

[lmi-commits] [lmi] odd/brent ea32ee0 1/8: Suppress unwanted output


From: Greg Chicares
Subject: [lmi-commits] [lmi] odd/brent ea32ee0 1/8: Suppress unwanted output
Date: Fri, 18 Jun 2021 20:19:10 -0400 (EDT)

branch: odd/brent
commit ea32ee08f202f61a05994c1866017d3e54fd5563
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>

    Suppress unwanted output
    
    * zero2.hpp: 'b' needn't be printed twice.
    * zero3.hpp: Likewise.
    * zero_test.cpp: Don't test whether root equals zero--it does for some
        functions, but not for others.
---
 zero2.hpp     | 2 +-
 zero3.hpp     | 2 +-
 zero_test.cpp | 4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/zero2.hpp b/zero2.hpp
index 50cdaf9..c513e63 100644
--- a/zero2.hpp
+++ b/zero2.hpp
@@ -184,7 +184,7 @@ int j = 0;
             b += tol * signum(m);
             }
         fb = f(b);
-//std::cout << ++j << " br " << ' ' << a << ' ' << b << ' ' << c << ' ' << 
"IBLcQb"[technique] << ' ' << b << std::endl;
+//std::cout << ++j << " br " << ' ' << a << ' ' << b << ' ' << c << ' ' << 
"IBLcQb"[technique] << std::endl;
 std::cout << ++j << " br " << "IBLcQb"[technique] << ' ' << b << std::endl;
 #if 0 // RECTIFIED
         // Brent does this at the top
diff --git a/zero3.hpp b/zero3.hpp
index b4c28cc..148d495 100644
--- a/zero3.hpp
+++ b/zero3.hpp
@@ -74,7 +74,7 @@ int j = 0;
         double x = a + t * (b - a);
         double fx = f(x);
 //std::cout << ++j << " ch " << "IBLcQb"[technique] << ' ' << x << std::endl;
-std::cout << ++j << " ch " << "IBLcQb"[technique] << ' ' << t << ' ' << x << ' 
' << fx << ' ' << a << ' ' << b << ' ' << c << ' ' << b << std::endl;
+std::cout << ++j << " ch " << "IBLcQb"[technique] << ' ' << t << ' ' << x << ' 
' << fx << ' ' << a << ' ' << b << ' ' << c << std::endl;
         if(signum(fx) == signum(fa))
             {
             c = a;
diff --git a/zero_test.cpp b/zero_test.cpp
index d18d1f0..4b2d3c6 100644
--- a/zero_test.cpp
+++ b/zero_test.cpp
@@ -279,7 +279,7 @@ int test_main(int, char*[])
     double hi =   4.0 ;
 std::cout << "test genuine brent" << std::endl;
     double d = brent_zero(lo, hi, 1.0e-16, e_19);
-    LMI_TEST(std::fabs(d) <= epsilon);
+//  LMI_TEST(std::fabs(d) <= epsilon);
 
 std::cout << "test brent" << std::endl;
     d = brent(lo, hi, 1.0e-16, e_19);
@@ -293,7 +293,7 @@ std::cout << "test decimal_root" << std::endl;
 std::ostringstream os2;
     r = decimal_root(lo, hi, bias_none, 16, e_19, os2);
     LMI_TEST(root_is_valid == r.validity);
-    LMI_TEST(std::fabs(r.root) <= epsilon);
+//  LMI_TEST(std::fabs(r.root) <= epsilon);
     // Assertions labelled 'weak' test the number of iterations
     // against empirical measurements (with various architectures)
     // rather than a theoretical maximum. Perhaps they'll always



reply via email to

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