[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master 3c341a6 10/25: Remove more dead code
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master 3c341a6 10/25: Remove more dead code |
Date: |
Wed, 24 Feb 2021 19:00:52 -0500 (EST) |
branch: master
commit 3c341a634db80c4d7111b4331ac60d375fe0f26a
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>
Remove more dead code
7702 rates are sui generis: they don't follow the {guar, curr, mdpt}
paradigm, but obey rules of their own, so they don't really belong in
class InterestRates.
In commit 9b46a92129ad of 20210214T1413Z it was already decided that
"loans are always needed".
---
interest_rates.cpp | 35 -----------------------------------
interest_rates.hpp | 2 --
2 files changed, 37 deletions(-)
diff --git a/interest_rates.cpp b/interest_rates.cpp
index c5867e6..d063bdf 100644
--- a/interest_rates.cpp
+++ b/interest_rates.cpp
@@ -42,8 +42,6 @@
//
// Permit variable loan rate.
//
-// Calculate all 7702 and 7702A interest rates here.
-//
// The InterestRates(BasicValues) ctor requires many headers; improve
// physical design by replacing it with a ctor that takes all required
// data as arguments. That redesign is more conducive to unit tests,
@@ -246,32 +244,6 @@ void convert_interest_rates
monthly_gross_rate[j] = cached_monthly_gross_rate;
}
}
-
-#if 0
-/// Determine whether loan rates are needed; else they can be zero.
-///
-/// Loan rates can potentially affect GPT calculations.
-///
-/// SOMEDAY !! Is this function worthwhile, or should it be expunged?
-/// An error in its implementation could have severe consequences, and
-/// the benefit seems slight. At present, it's never called anyway,
-/// because BasicValues::Init7702() is called unconditionally--so the
-/// test for 'DefinitionOfLifeInsurance' is incorrect.
-
-bool need_loan_rates(yare_input const& yi)
-{
- return
- mce_gpt == yi.DefinitionOfLifeInsurance
- || mce_solve_loan == yi.SolveType
- || true == yi.WithdrawToBasisThenLoan
- || 0.0 != yi.InforceRegularLoanValue
- || 0.0 != yi.InforcePreferredLoanValue
- || 0.0 != yi.InforceRegularLoanBalance
- || 0.0 != yi.InforcePreferredLoanBalance
- || !each_equal(yi.NewLoan, 0.0)
- ;
-}
-#endif // 0
} // Unnamed namespace.
#if 0
@@ -281,14 +253,12 @@ instead of passing BasicValues, pass these requirements
only:
v.InvestmentManagementFee()
v.GetLength()
v.round_interest_rate()
- v.round_interest_rate_7702()
v.IsSubjectToIllustrationReg()
#endif // 0
InterestRates::InterestRates(BasicValues const& v)
:Length_ {v.GetLength()}
,RoundIntRate_ {v.round_interest_rate()}
- ,Round7702Rate_ {v.round_interest_rate_7702()}
,Zero_ (Length_)
,NeedMidpointRates_ {v.IsSubjectToIllustrationReg()}
,GenAcctRateType_ {v.yare_input_.GeneralAccountRateType}
@@ -394,7 +364,6 @@ void InterestRates::Initialize(BasicValues const& v)
InitializeSeparateAccountRates();
InitializeLoanRates();
InitializeHoneymoonRates();
- Initialize7702Rates();
// Paranoid check.
for(int i = mce_annual_rate; i < mc_n_rate_periods; ++i)
@@ -795,7 +764,3 @@ void InterestRates::DynamicMlySepAcctRate
}
}
}
-
-void InterestRates::Initialize7702Rates()
-{
-}
diff --git a/interest_rates.hpp b/interest_rates.hpp
index 34fe220..5213a18 100644
--- a/interest_rates.hpp
+++ b/interest_rates.hpp
@@ -213,11 +213,9 @@ class InterestRates
void InitializeSeparateAccountRates();
void InitializeLoanRates();
void InitializeHoneymoonRates();
- void Initialize7702Rates();
int Length_;
round_to<double> RoundIntRate_;
- round_to<double> Round7702Rate_;
std::vector<double> Zero_;
- [lmi-commits] [lmi] master updated (a62fbec -> 2f74b41), Greg Chicares, 2021/02/24
- [lmi-commits] [lmi] master 04484e6 03/25: Remove a duplicative defect marker [300], Greg Chicares, 2021/02/24
- [lmi-commits] [lmi] master 671e3f2 05/25: Almost move two blocks of code, Greg Chicares, 2021/02/24
- [lmi-commits] [lmi] master 3ba52f9 01/25: Add a '7702 !!' marker for new 7702 issues, Greg Chicares, 2021/02/24
- [lmi-commits] [lmi] master 447290e 04/25: Move an assertion; rewrite and duplicate its comment, Greg Chicares, 2021/02/24
- [lmi-commits] [lmi] master 5dbf2e3 06/25: Validate class i7702, Greg Chicares, 2021/02/24
- [lmi-commits] [lmi] master 2f74b41 25/25: Improve encapsulation of 7702 "spread", Greg Chicares, 2021/02/24
- [lmi-commits] [lmi] master 3a06237 08/25: Deduplicate, Greg Chicares, 2021/02/24
- [lmi-commits] [lmi] master 3c341a6 10/25: Remove more dead code,
Greg Chicares <=
- [lmi-commits] [lmi] master e6f9397 14/25: Obtain DCV interest rate from i7702 object, Greg Chicares, 2021/02/24
- [lmi-commits] [lmi] master d17fda2 20/25: Bring bogosity into focus before eradicating it, Greg Chicares, 2021/02/24
- [lmi-commits] [lmi] master bbe2802 21/25: Reduce bogosity ever so slightly, Greg Chicares, 2021/02/24
- [lmi-commits] [lmi] master 8c27092 24/25: Use correct interest rates for '.mec' input, Greg Chicares, 2021/02/24
- [lmi-commits] [lmi] master 7cf8204 02/25: Add a 7702 interest-rate class, Greg Chicares, 2021/02/24
- [lmi-commits] [lmi] master ef22f46 07/25: Deduplicate [295], Greg Chicares, 2021/02/24
- [lmi-commits] [lmi] master 6bde573 12/25: Make certain shared_ptr members const, Greg Chicares, 2021/02/24
- [lmi-commits] [lmi] master ee8667d 13/25: Turn a local variable into a member, Greg Chicares, 2021/02/24
- [lmi-commits] [lmi] master 9f5c39d 15/25: Expunge disused accessors, Greg Chicares, 2021/02/24
- [lmi-commits] [lmi] master 8db602c 16/25: Turn several members into local variables, Greg Chicares, 2021/02/24