lmi-commits
[Top][All Lists]
Advanced

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

[lmi-commits] [lmi] master 2782bfd 2/2: Improve documentation


From: Greg Chicares
Subject: [lmi-commits] [lmi] master 2782bfd 2/2: Improve documentation
Date: Wed, 16 Jun 2021 11:39:37 -0400 (EDT)

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

    Improve documentation
    
    The ALGOL 60 original
      a:=b; b:=c; c:=a;
    means exactly what it says. In modern times, it seems appropriate to
    state that it's not a faulty three-way swap.
---
 zero.hpp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/zero.hpp b/zero.hpp
index f72a1a7..205329d 100644
--- a/zero.hpp
+++ b/zero.hpp
@@ -314,6 +314,8 @@ root_type decimal_root
             fc = fa;
             d = e = b - a;
             }
+        // If 'c' is a closer approximant than 'b', then swap them,
+        // discarding the old value of 'a'.
         if(std::fabs(fc) < std::fabs(fb))
             {
              a =  b;  b =  c;  c =  a;



reply via email to

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