[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master 3121c90 23/24: Conditionally use H.R. 6800's
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master 3121c90 23/24: Conditionally use H.R. 6800's 7702 transitional rates |
Date: |
Wed, 30 Dec 2020 18:47:02 -0500 (EST) |
branch: master
commit 3121c90ab26f760a76b15527ca99bea870972342
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>
Conditionally use H.R. 6800's 7702 transitional rates
The double condition is such as to exclude end-user experimentation:
they might guess the "pyx" setting, but lack the one password to rule
them all.
---
Makefile.am | 9 ++++++++-
irc7702_interest.cpp | 14 +++++++++++++-
objects.make | 6 ++++++
3 files changed, 27 insertions(+), 2 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index bc8185c..ed22333 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -866,12 +866,19 @@ test_interpolate_string_CXXFLAGS = $(AM_CXXFLAGS)
test_irc7702_tables_SOURCES = \
$(common_test_objects) \
+ calendar_date.cpp \
commutation_functions.cpp \
cso_table.cpp \
+ global_settings.cpp \
irc7702_interest.cpp \
irc7702_tables.cpp \
- irc7702_tables_test.cpp
+ irc7702_tables_test.cpp \
+ miscellany.cpp \
+ null_stream.cpp \
+ path_utility.cpp
test_irc7702_tables_CXXFLAGS = $(AM_CXXFLAGS)
+test_irc7702_tables_LDADD = \
+ $(BOOST_LIBS)
test_irc7702a_SOURCES = \
$(common_test_objects) \
diff --git a/irc7702_interest.cpp b/irc7702_interest.cpp
index 7b00d25..28f9ec5 100644
--- a/irc7702_interest.cpp
+++ b/irc7702_interest.cpp
@@ -23,14 +23,26 @@
#include "irc7702_interest.hpp"
+#include "contains.hpp"
+#include "global_settings.hpp"
+
/// Statutory interest rate for 7702 and 7702A (except GSP).
+///
+/// Conditionally use the H.R. 6800 transitional rates. See:
+/// https://www.congress.gov/bill/116th-congress/house-bill/6800/text
double iglp()
{
- return 0.04;
+ static bool const hr6800 =
+ global_settings::instance().ash_nazg()
+ && contains(global_settings::instance().pyx(), "HR6800")
+ ;
+ return hr6800 ? 0.02 : 0.04;
}
/// Statutory interest rate for 7702 (GSP only).
+///
+/// Implemented in terms of iglp(), q.v.
double igsp()
{
diff --git a/objects.make b/objects.make
index 9c422de..49db951 100644
--- a/objects.make
+++ b/objects.make
@@ -743,12 +743,18 @@ interpolate_string_test$(EXEEXT): \
interpolate_string_test.o \
irc7702_tables_test$(EXEEXT): \
+ $(boost_filesystem_objects) \
$(common_test_objects) \
+ calendar_date.o \
commutation_functions.o \
cso_table.o \
+ global_settings.o \
irc7702_interest.o \
irc7702_tables.o \
irc7702_tables_test.o \
+ miscellany.o \
+ null_stream.o \
+ path_utility.o \
irc7702a_test$(EXEEXT): \
$(boost_filesystem_objects) \
- [lmi-commits] [lmi] master c9da0f6 07/24: Assert "length" is same in two classes, (continued)
- [lmi-commits] [lmi] master c9da0f6 07/24: Assert "length" is same in two classes, Greg Chicares, 2020/12/30
- [lmi-commits] [lmi] master ac2e25b 03/24: Expunge an unwanted exception class, Greg Chicares, 2020/12/30
- [lmi-commits] [lmi] master f2efed6 01/24: Guard against accidental Ctrl-D, Greg Chicares, 2020/12/30
- [lmi-commits] [lmi] master bf59b33 06/24: Resolve or demote some more marked defects [326], Greg Chicares, 2020/12/30
- [lmi-commits] [lmi] master 30412af 04/24: Report a range error when a range error is caught [336], Greg Chicares, 2020/12/30
- [lmi-commits] [lmi] master e7c9da0 08/24: Prepare to move a block of code, Greg Chicares, 2020/12/30
- [lmi-commits] [lmi] master 55a3eb0 12/24: Note an apparent defect [327], Greg Chicares, 2020/12/30
- [lmi-commits] [lmi] master 53e98ab 13/24: Fix defect introduced 20100723T2339Z: wrong jurisdiction [326], Greg Chicares, 2020/12/30
- [lmi-commits] [lmi] master e4c790a 18/24: Expunge a defect marker [324], Greg Chicares, 2020/12/30
- [lmi-commits] [lmi] master d89a676 22/24: Refactor to avoid a header-only implementation, Greg Chicares, 2020/12/30
- [lmi-commits] [lmi] master 3121c90 23/24: Conditionally use H.R. 6800's 7702 transitional rates,
Greg Chicares <=
- [lmi-commits] [lmi] master 3ee0c70 15/24: Make two member functions identical, Greg Chicares, 2020/12/30
- [lmi-commits] [lmi] master d7f3337 09/24: Move a block of code as just announced, Greg Chicares, 2020/12/30
- [lmi-commits] [lmi] master d4e0291 10/24: Refactor, Greg Chicares, 2020/12/30
- [lmi-commits] [lmi] master 71d750e 14/24: Make two member functions almost identical, Greg Chicares, 2020/12/30
- [lmi-commits] [lmi] master a473a82 17/24: Expunge a duplicative member function [325], Greg Chicares, 2020/12/30
- [lmi-commits] [lmi] master 2bc3d08 02/24: Move an enum, Greg Chicares, 2020/12/30
- [lmi-commits] [lmi] master b3cbe37 11/24: Move another block of code, Greg Chicares, 2020/12/30
- [lmi-commits] [lmi] master 9180696 16/24: Change a member's type-specifier, Greg Chicares, 2020/12/30
- [lmi-commits] [lmi] master 3ee62a7 19/24: Read product data files earlier, Greg Chicares, 2020/12/30
- [lmi-commits] [lmi] master 7930f69 20/24: Set 7702 and 7702A interest rates OAOO, Greg Chicares, 2020/12/30