lmi-commits
[Top][All Lists]
Advanced

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

[lmi-commits] [lmi] odd/eraseme_error 35f8824 1/9: Trace IRR calculation


From: Greg Chicares
Subject: [lmi-commits] [lmi] odd/eraseme_error 35f8824 1/9: Trace IRR calculations
Date: Thu, 8 Jul 2021 16:26:46 -0400 (EDT)

branch: odd/eraseme_error
commit 35f8824d6966f330a0ddb2e500ace9fb6f28aa5c
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>

    Trace IRR calculations
---
 financial.hpp | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/financial.hpp b/financial.hpp
index 538dcf2..70b8938 100644
--- a/financial.hpp
+++ b/financial.hpp
@@ -27,8 +27,10 @@
 #include "assert_lmi.hpp"
 #include "bourn_cast.hpp"
 #include "mc_enum_type_enums.hpp"       // mcenum_mode
+#include "miscellany.hpp"               // ios_out_app_binary()
 #include "zero.hpp"
 
+#include <fstream>
 #include <iterator>                     // iterator_traits
 
 class calendar_date;
@@ -115,12 +117,16 @@ class irr_helper
 
     long double operator()()
         {
+    std::ofstream ofs_trace;
+    ofs_trace.open("trace_irr.txt", ios_out_app_binary());
+    std::ostream os_trace(ofs_trace.rdbuf());
         root_type const z = decimal_root
             (*this
             ,-1.0       // A priori lower bound.
             ,1000.0     // Assumed upper bound.
             ,bias_lower // Return the final bound with the lower fv.
             ,decimals_
+            ,os_trace
             );
         switch(z.validity)
             {



reply via email to

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