[Top][All Lists]

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

[lmi-commits] [lmi] master 338d589 10/14: Call set_partial_mortality() O

From: Greg Chicares
Subject: [lmi-commits] [lmi] master 338d589 10/14: Call set_partial_mortality() OAOO
Date: Sun, 6 Sep 2020 07:50:38 -0400 (EDT)

branch: master
commit 338d589d9c7f5e04ece7e207836d778aa391f8df
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>

    Call set_partial_mortality() OAOO
    Partial mortality is independent of calculation basis, so it was
    wasteful and pointless to calculate it once per basis.
    The system test would have failed to run if, instead of being moved, the
    call to set_partial_mortality() had merely been conditionalized thus:
        if(mce_run_gen_curr_sep_full == RunBasis_)
    (as seemed plausible). In that case, the function wouldn't have been
    called early enough for solves on a guaranteed basis. One basis must be
    "primary", and that's usually 'mce_run_gen_curr_sep_full', but not
    always. Such conditionals in production code should instead compare
    'RunBasis_' to that "primary" basis.
 ihs_acctval.cpp | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/ihs_acctval.cpp b/ihs_acctval.cpp
index 64c2b31..79ec645 100644
--- a/ihs_acctval.cpp
+++ b/ihs_acctval.cpp
@@ -106,6 +106,9 @@ AccountValue::AccountValue(Input const& input)
+    set_partial_mortality();
+    InvariantValues().InforceLives = partial_mortality_lx;
     // Explicitly initialize antediluvian members. It's generally
     // better to do this in the initializer-list, but here they can
     // all be kept together.
@@ -411,9 +414,6 @@ void AccountValue::InitializeLife(mcenum_run_basis a_Basis)
     double sa = specamt_for_7702(0);
-    set_partial_mortality();
-    InvariantValues().InforceLives = partial_mortality_lx;
     // It is at best superfluous to do this for every basis.
     // TAXATION !! Don't do that then.

reply via email to

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