[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master e143602 3/7: Hard-code 7702 i for another uni
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master e143602 3/7: Hard-code 7702 i for another unit test |
Date: |
Mon, 22 Feb 2021 07:46:30 -0500 (EST) |
branch: master
commit e1436028db7522eaecd77eb8fa04cc64053d0a30
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>
Hard-code 7702 i for another unit test
Class gpt_test cannot independently know what interest rates to use,
so the original 1984 statutory rates are hardcoded.
---
Makefile.am | 1 -
gpt_test.cpp | 7 ++++---
objects.make | 1 -
3 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index 3941183..19af219 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -780,7 +780,6 @@ test_gpt_SOURCES = \
gpt_commutation_functions.cpp \
gpt_test.cpp \
ihs_irc7702.cpp \
- irc7702_interest.cpp \
miscellany.cpp \
null_stream.cpp \
path_utility.cpp \
diff --git a/gpt_test.cpp b/gpt_test.cpp
index 07fffca..92620c3 100644
--- a/gpt_test.cpp
+++ b/gpt_test.cpp
@@ -27,7 +27,6 @@
#include "assert_lmi.hpp"
#include "cso_table.hpp"
#include "et_vector.hpp"
-#include "irc7702_interest.hpp" // iglp(), igsp()
#include "materially_equal.hpp"
#include "math_functions.hpp"
#include "ssize_lmi.hpp"
@@ -238,8 +237,10 @@ class gpt_test
void gpt_test::initialize(int issue_age)
{
- static double const i12glp = i_upper_12_over_12_from_i<double>()(iglp());
- static double const i12gsp = i_upper_12_over_12_from_i<double>()(igsp());
+ double constexpr iglp = 0.04;
+ double constexpr igsp = 0.06;
+ static double const i12glp = i_upper_12_over_12_from_i<double>()(iglp);
+ static double const i12gsp = i_upper_12_over_12_from_i<double>()(igsp);
q_m = sample_q(issue_age);
int const length = lmi::ssize(q_m);
glp_ic .assign(length, i12glp);
diff --git a/objects.make b/objects.make
index 497ae71..111c9a9 100644
--- a/objects.make
+++ b/objects.make
@@ -669,7 +669,6 @@ gpt_test$(EXEEXT): \
gpt_commutation_functions.o \
gpt_test.o \
ihs_irc7702.o \
- irc7702_interest.o \
miscellany.o \
null_stream.o \
path_utility.o \
- [lmi-commits] [lmi] master updated (dc99d2e -> a62fbec), Greg Chicares, 2021/02/22
- [lmi-commits] [lmi] master d162b18 1/7: Improve documentation, Greg Chicares, 2021/02/22
- [lmi-commits] [lmi] master e143602 3/7: Hard-code 7702 i for another unit test,
Greg Chicares <=
- [lmi-commits] [lmi] master 6c4deff 4/7: Use 7702 statutory i from database, Greg Chicares, 2021/02/22
- [lmi-commits] [lmi] master 7b18d1d 2/7: Hard-code 7702 i for a unit test, Greg Chicares, 2021/02/22
- [lmi-commits] [lmi] master b7b20c4 5/7: Resurrect ancient code for 7702 (loan) interest, Greg Chicares, 2021/02/22
- [lmi-commits] [lmi] master 1a3d3e6 6/7: Fix defect introduced 20050114T1947Z: used the wrong variable [301], Greg Chicares, 2021/02/22
- [lmi-commits] [lmi] master a62fbec 7/7: Loan rate affects 7702 if loans allowed, not only if elected, Greg Chicares, 2021/02/22