lmi-commits
[Top][All Lists]
Advanced

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

[lmi-commits] [lmi] valyuta/004 506051a 9/9: Conditionally use H.R. 6800


From: Greg Chicares
Subject: [lmi-commits] [lmi] valyuta/004 506051a 9/9: Conditionally use H.R. 6800's 7702 transitional rates
Date: Tue, 29 Dec 2020 14:46:03 -0500 (EST)

branch: valyuta/004
commit 506051aed7e026fd3979ea2f6a7c7a0a71b1389d
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 1391bca..74d3164 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 ada9a6c..ec22df3 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 eb2f731..d7bb415 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]