[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] odd/eraseme_error 69d06e9 10/10: Attempt to find a p
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] odd/eraseme_error 69d06e9 10/10: Attempt to find a problem |
Date: |
Wed, 7 Jul 2021 06:22:15 -0400 (EDT) |
branch: odd/eraseme_error
commit 69d06e9c8f3ff5f6b03b7a538335b7af7bf4a01b
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>
Attempt to find a problem
Symptom observed after the immediately preceding commit: 'gui_test.sh'
freezes with i686-w64-mingw32 and wine-4.0.3, here...
paste_census: started
time=2067ms (for paste_census)
paste_census: ok
pdf_census: started
^^^^^^^^^^^^^^^^^^^ freezes
...which seems to be about where the GUI test moves the mouse pointer.
Is this a wine defect, an lmi GUI defect, or a defect in 'zero.hpp',
the only relevant file that had changed since origin/master, where the
GUI test succeeded?
This commit causes all solves to be traced unconditionally, with a trace
epilogue showing return from lmi_root(), and from decimal_root() (which
calls lmi_root()). The last two lines of that trace are...
Returning from lmi_root() line 360
Returning from decimal_root()
...which seems to suggest that decimal_root() does return.
---
ihs_avsolve.cpp | 2 +-
zero.hpp | 12 +++++++++++-
2 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/ihs_avsolve.cpp b/ihs_avsolve.cpp
index 0020448..88ed07a 100644
--- a/ihs_avsolve.cpp
+++ b/ihs_avsolve.cpp
@@ -457,7 +457,7 @@ currency AccountValue::Solve
std::ostream os_trace(status().rdbuf());
std::ofstream ofs_trace;
- if(contains(yare_input_.Comments, "idiosyncrasyT") &&
!SolvingForGuarPremium)
+ if(true || contains(yare_input_.Comments, "idiosyncrasyT") &&
!SolvingForGuarPremium)
{
ofs_trace.open("trace.txt", ios_out_app_binary());
os_trace.rdbuf(ofs_trace.rdbuf());
diff --git a/zero.hpp b/zero.hpp
index 2721920..2dcdea8 100644
--- a/zero.hpp
+++ b/zero.hpp
@@ -249,6 +249,7 @@ root_type lmi_root
,detail::RoundT round_dec = std::identity()
)
{
+os_trace << "Entering lmi_root() line " << __LINE__ << std::endl;
constexpr double epsilon {std::numeric_limits<double>::epsilon()};
int n_iter {0};
@@ -289,6 +290,7 @@ root_type lmi_root
if(a == b)
{
+os_trace << "Returning from lmi_root() line " << __LINE__ << std::endl;
return {a, improper_bounds, n_iter};
}
@@ -296,6 +298,7 @@ root_type lmi_root
++n_iter;
if(0.0 == fa) // Note 0.
{
+os_trace << "Returning from lmi_root() line " << __LINE__ << std::endl;
return {a, root_is_valid, n_iter};
}
@@ -304,12 +307,14 @@ root_type lmi_root
expatiate();
if(0.0 == fb) // Note 0 [bis].
{
+os_trace << "Returning from lmi_root() line " << __LINE__ << std::endl;
return {b, root_is_valid, n_iter};
}
// f(a) and f(b) must have different signs.
if((0.0 < fa) == (0.0 < fb))
{
+os_trace << "Returning from lmi_root() line " << __LINE__ << std::endl;
return {0.0, root_not_bracketed, n_iter};
}
@@ -347,10 +352,12 @@ root_type lmi_root
|| bias_higher == bias && 0.0 <= fb
)
{
+os_trace << "Returning from lmi_root() line " << __LINE__ << std::endl;
return {b, root_is_valid, n_iter};
}
else if(std::fabs(m) <= 2.0 * epsilon * std::fabs(c) + t)
{
+os_trace << "Returning from lmi_root() line " << __LINE__ << std::endl;
return {c, root_is_valid, n_iter};
}
else
@@ -479,9 +486,10 @@ root_type decimal_root
,std::ostream& os_trace = null_stream()
)
{
+os_trace << "Entering decimal_root()" << std::endl;
round_to<double> const round_dec {decimals, r_to_nearest};
- return lmi_root
+ auto z = lmi_root
(f
,bound0
,bound1
@@ -490,6 +498,8 @@ root_type decimal_root
,bias
,detail::RoundT(round_dec)
);
+os_trace << "Returning from decimal_root()" << std::endl;
+ return z;
}
/// An instrumented translation of Brent's reference implementation.
- [lmi-commits] [lmi] branch odd/eraseme_error created (now 69d06e9), Greg Chicares, 2021/07/07
- [lmi-commits] [lmi] odd/eraseme_error dd8fb62 01/10: Postpone consideration of NaN-valued objective functions, Greg Chicares, 2021/07/07
- [lmi-commits] [lmi] odd/eraseme_error 1dbe0b4 02/10: Refactor, Greg Chicares, 2021/07/07
- [lmi-commits] [lmi] odd/eraseme_error a3f38b5 03/10: Refactor instrumented reference implementation, Greg Chicares, 2021/07/07
- [lmi-commits] [lmi] odd/eraseme_error 4d0358c 04/10: Rename an enumeration, Greg Chicares, 2021/07/07
- [lmi-commits] [lmi] odd/eraseme_error 2870f56 05/10: Reenumerate root-finding techniques, Greg Chicares, 2021/07/07
- [lmi-commits] [lmi] odd/eraseme_error b19754f 06/10: Show shifts in optional trace, Greg Chicares, 2021/07/07
- [lmi-commits] [lmi] odd/eraseme_error dfd50b1 07/10: Find a root that coincides with an input bound, Greg Chicares, 2021/07/07
- [lmi-commits] [lmi] odd/eraseme_error dec4d54 09/10: Rename operations, Greg Chicares, 2021/07/07
- [lmi-commits] [lmi] odd/eraseme_error 69d06e9 10/10: Attempt to find a problem,
Greg Chicares <=
- [lmi-commits] [lmi] odd/eraseme_error b862db3 08/10: Uniformly test two functions in parallel, Greg Chicares, 2021/07/07