lmi-commits
[Top][All Lists]
Advanced

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

[lmi-commits] [lmi] master e85193a 6/8: Clarify


From: Greg Chicares
Subject: [lmi-commits] [lmi] master e85193a 6/8: Clarify
Date: Tue, 25 May 2021 20:11:00 -0400 (EDT)

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

    Clarify
    
    The paragraph that ended with a question was not an incomplete thought,
    but that wasn't clear until dozens of lines later.
    
    Added a null else after an if...else to indicate that it had not been
    omitted by accident, especially because the tests are not collectively
    exhaustive.
---
 zero.hpp | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/zero.hpp b/zero.hpp
index 53321cb..7ff8ddf 100644
--- a/zero.hpp
+++ b/zero.hpp
@@ -150,7 +150,7 @@ typedef std::pair<double,root_validity> root_type;
 ///   !(0.0 != fb && std::fabs(m) <= tol)
 /// is satisfied. But b might not have the desired bias. In that case,
 /// 0.5 * (b + c) is not necessarily correct either, because its bias
-/// is unknown; yet is it appropriate to return c instead?
+/// is unknown; yet is it appropriate to return c instead? Sometimes.
 ///
 /// The bias of c must be correct because f(b) and f(c) are known to
 /// have different signs. And c is within Brent's tolerance in the weak
@@ -297,6 +297,10 @@ root_type decimal_root
                 {
                 return std::make_pair(c, root_is_valid);
                 }
+            else
+                {
+                ; // Do nothing.
+                }
             }
         if(std::fabs(e) < tol || std::fabs(fa) <= std::fabs(fb))
             {



reply via email to

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