lmi-commits
[Top][All Lists]
Advanced

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

[lmi-commits] [lmi] master 172f4ab 04/11: Separate incrementation from e


From: Greg Chicares
Subject: [lmi-commits] [lmi] master 172f4ab 04/11: Separate incrementation from expatiation
Date: Thu, 1 Jul 2021 20:19:03 -0400 (EDT)

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

    Separate incrementation from expatiation
---
 zero.hpp | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/zero.hpp b/zero.hpp
index 416374f..230b3c4 100644
--- a/zero.hpp
+++ b/zero.hpp
@@ -280,14 +280,16 @@ root_type decimal_root
         }
 
     double fa = static_cast<double>(f(a));
-    detail::expatiate(os_trace, n_iter++, technique, a, fa);
+    detail::expatiate(os_trace, n_iter, technique, a, fa);
+    ++n_iter;
     if(0.0 == fa) // Note 0.
         {
         return {a, root_is_valid, n_iter};
         }
 
     double fb = static_cast<double>(f(b));
-    detail::expatiate(os_trace, n_iter++, technique, b, fb);
+    detail::expatiate(os_trace, n_iter, technique, b, fb);
+    ++n_iter;
     if(0.0 == fb) // Note 0 [bis].
         {
         return {b, root_is_valid, n_iter};
@@ -413,7 +415,8 @@ root_type decimal_root
         else
             {
             fb = static_cast<double>(f(b));
-            detail::expatiate(os_trace, n_iter++, technique, b, fb);
+            detail::expatiate(os_trace, n_iter, technique, b, fb);
+            ++n_iter;
             }
         }
 }



reply via email to

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