lmi-commits
[Top][All Lists]
Advanced

[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) \



reply via email to

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