lmi-commits
[Top][All Lists]
Advanced

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

[lmi-commits] [5290] Enforce minimum specamt


From: Greg Chicares
Subject: [lmi-commits] [5290] Enforce minimum specamt
Date: Fri, 16 Sep 2011 13:18:17 +0000

Revision: 5290
          http://svn.sv.gnu.org/viewvc/?view=rev&root=lmi&revision=5290
Author:   chicares
Date:     2011-09-16 13:18:16 +0000 (Fri, 16 Sep 2011)
Log Message:
-----------
Enforce minimum specamt

Modified Paths:
--------------
    lmi/trunk/ChangeLog
    lmi/trunk/ihs_avstrtgy.cpp

Modified: lmi/trunk/ChangeLog
===================================================================
--- lmi/trunk/ChangeLog 2011-09-15 10:59:17 UTC (rev 5289)
+++ lmi/trunk/ChangeLog 2011-09-16 13:18:16 UTC (rev 5290)
@@ -28520,3 +28520,8 @@
 the lmi epoch. The database differentiates initial and post-initial
 minimum specamt, but only the latter was used.
 
+20110916T1318Z <address@hidden> [608]
+
+  ihs_avstrtgy.cpp
+Enforce minimum specamt.
+

Modified: lmi/trunk/ihs_avstrtgy.cpp
===================================================================
--- lmi/trunk/ihs_avstrtgy.cpp  2011-09-15 10:59:17 UTC (rev 5289)
+++ lmi/trunk/ihs_avstrtgy.cpp  2011-09-16 13:18:16 UTC (rev 5290)
@@ -61,10 +61,8 @@
 /// The result of a salary-based strategy is constrained to be
 /// nonnegative, because if 'SalarySpecifiedAmountOffset' is
 /// sufficiently large, then specamt would be negative, which cannot
-/// make any sense. Other than that, no minimum is imposed here. The
-/// actual minimum, set elsewhere, is ascertainable only during
-/// monthiversary processing because, e.g., it may depend on whether
-/// cash value is sufficient to keep a term rider in force.
+/// make any sense. Other than that, no minimum is imposed here; see
+/// PerformSpecAmtStrategy().
 
 double AccountValue::CalculateSpecAmtFromStrategy
     (int actual_year
@@ -170,14 +168,20 @@
         }
 }
 
-/// Set specamt according to selected strategy.
+/// Set specamt according to selected strategy, respecting minimum.
+///
+/// The actual minimum, set elsewhere, is ascertainable only during
+/// monthiversary processing because, e.g., it may depend on whether
+/// cash value is sufficient to keep a term rider in force.
 
 void AccountValue::PerformSpecAmtStrategy()
 {
     for(int j = 0; j < BasicValues::Length; ++j)
         {
-        double z = round_specamt()(CalculateSpecAmtFromStrategy(j, 0));
-        DeathBfts_->set_specamt(z, j, 1 + j);
+        bool t = yare_input_.TermRider && 0.0 != yare_input_.TermRiderAmount;
+        double m = minimum_specified_amount(0 == j, t);
+        double z = CalculateSpecAmtFromStrategy(j, 0);
+        DeathBfts_->set_specamt(round_specamt()(std::max(m, z)), j, 1 + j);
         }
 }
 




reply via email to

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