[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master 484ed01 5/6: Refine rounding of specamt strat
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master 484ed01 5/6: Refine rounding of specamt strategies |
Date: |
Fri, 29 Jan 2021 15:44:16 -0500 (EST) |
branch: master
commit 484ed01cc9189e3d454b1795fd1cbce50db5ce0b
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>
Refine rounding of specamt strategies
Every function that calculates specamt by a strategy already rounded
its result in some way appropriate for specamt, so it didn't need to
be rounded again when applied. Chose among the specamt rounding rules
more carefully:
round_specamt(): follow product rules
round_min_specamt(): follow product rules and 7702 rules
---
ihs_avstrtgy.cpp | 4 ++--
ihs_basicval.cpp | 6 +++---
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/ihs_avstrtgy.cpp b/ihs_avstrtgy.cpp
index add1867..83a445f 100644
--- a/ihs_avstrtgy.cpp
+++ b/ihs_avstrtgy.cpp
@@ -145,7 +145,7 @@ void AccountValue::PerformSpecAmtStrategy()
strategy = mce_sa_input_scalar;
}
currency z = CalculateSpecAmtFromStrategy(j, 0, explicit_value,
strategy);
- DeathBfts_->set_specamt(round_specamt().c(std::max(m, z)), j, 1 + j);
+ DeathBfts_->set_specamt(std::max(m, z), j, 1 + j);
if
( j == InforceYear
&& yare_input_.EffectiveDate != yare_input_.InforceAsOfDate
@@ -176,7 +176,7 @@ void AccountValue::PerformSupplAmtStrategy()
currency explicit_value = DeathBfts_->supplamt()[j];
mcenum_sa_strategy strategy =
yare_input_.SupplementalAmountStrategy[j];
currency z = CalculateSpecAmtFromStrategy(j, 0, explicit_value,
strategy);
- DeathBfts_->set_supplamt(round_specamt().c(std::max(m, z)), j, 1 + j);
+ DeathBfts_->set_supplamt(std::max(m, z), j, 1 + j);
}
}
diff --git a/ihs_basicval.cpp b/ihs_basicval.cpp
index bdc1cfa..d039a28 100644
--- a/ihs_basicval.cpp
+++ b/ihs_basicval.cpp
@@ -1408,7 +1408,7 @@ currency BasicValues::GetModalSpecAmtMax(currency
annualized_pmt) const
case oe_modal_nonmec:
return GetModalSpecAmtMinNonMec(annualized_pmt);
case oe_modal_table:
- return round_min_specamt().c
+ return round_specamt().c
(
annualized_pmt
/ MortalityRates_->MinimumPremiumRates()[0]
@@ -1432,7 +1432,7 @@ currency BasicValues::GetModalSpecAmtTgt(currency
annualized_pmt) const
case oe_modal_nonmec:
return GetModalSpecAmtMinNonMec(annualized_pmt);
case oe_modal_table:
- return round_min_specamt().c
+ return round_specamt().c
(
(annualized_pmt - TgtPremMonthlyPolFee * 12)
/ MortalityRates_->TargetPremiumRates()[0]
@@ -1528,7 +1528,7 @@ currency BasicValues::GetModalSpecAmtSalary(int a_year)
const
z = std::min(z, yare_input_.SalarySpecifiedAmountCap);
}
z -= yare_input_.SalarySpecifiedAmountOffset;
- return round_min_specamt().c(std::max(0.0, z));
+ return round_specamt().c(std::max(0.0, z));
}
/// In general, strategies linking specamt and premium commute. The
- [lmi-commits] [lmi] master updated (6620be4 -> ef8f7b4), Greg Chicares, 2021/01/29
- [lmi-commits] [lmi] master 183844a 2/6: Round only when necessary, Greg Chicares, 2021/01/29
- [lmi-commits] [lmi] master f0cdf93 3/6: Round halfway cases consistently to even, Greg Chicares, 2021/01/29
- [lmi-commits] [lmi] master 780be3c 1/6: Mark uncached product-file instances, Greg Chicares, 2021/01/29
- [lmi-commits] [lmi] master 417af8e 4/6: Simplify, Greg Chicares, 2021/01/29
- [lmi-commits] [lmi] master ef8f7b4 6/6: Record speed measurements, Greg Chicares, 2021/01/29
- [lmi-commits] [lmi] master 484ed01 5/6: Refine rounding of specamt strategies,
Greg Chicares <=