[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master e7ab330 2/8: Store currency as such
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master e7ab330 2/8: Store currency as such |
Date: |
Tue, 26 Jan 2021 08:12:30 -0500 (EST) |
branch: master
commit e7ab3308bcfad647d89a439507b0fd2ef37b8678
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>
Store currency as such
Prefer to call dblize() only when passing arguments to a 7702 function.
This change results in calling dblize() thrice rather than twice, but
purity is more important than that micropessimization, and the reason
why two Initialize7702() arguments are distinct is that someday they
will differ, requiring three dblize() calls anyway.
---
ihs_acctval.cpp | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/ihs_acctval.cpp b/ihs_acctval.cpp
index 32b344c..d86d3dc 100644
--- a/ihs_acctval.cpp
+++ b/ihs_acctval.cpp
@@ -424,20 +424,20 @@ void AccountValue::InitializeLife(mcenum_run_basis
a_Basis)
SurrChg_.assign(BasicValues::GetLength(), C0);
// TAXATION !! Input::InforceAnnualTargetPremium should be used here.
- double annual_target_premium = dblize(GetModalTgtPrem
+ currency annual_target_premium = GetModalTgtPrem
(0
,mce_annual
,base_specamt(0)
- ));
- double sa = dblize(specamt_for_7702(0));
+ );
+ currency sa = specamt_for_7702(0);
// It is at best superfluous to do this for every basis.
// TAXATION !! Don't do that then.
Irc7702_->Initialize7702
- (sa
- ,sa
+ (dblize(sa)
+ ,dblize(sa)
,effective_dbopt_7702(DeathBfts_->dbopt()[0], Effective7702DboRop)
- ,annual_target_premium
+ ,dblize(annual_target_premium)
);
InvariantValues().InitGLP = Irc7702_->RoundedGLP();
- [lmi-commits] [lmi] master updated (15ef269 -> 7066049), Greg Chicares, 2021/01/26
- [lmi-commits] [lmi] master 557ac6e 3/8: Assert rather than assign, Greg Chicares, 2021/01/26
- [lmi-commits] [lmi] master 026214c 4/8: Solve for currency rather than double, Greg Chicares, 2021/01/26
- [lmi-commits] [lmi] master 62b80c4 7/8: Initialize honeymoon value as currency, not double, Greg Chicares, 2021/01/26
- [lmi-commits] [lmi] master 0b4b7ec 1/8: Don't use currency for amounts always converted to double, Greg Chicares, 2021/01/26
- [lmi-commits] [lmi] master 01886b2 5/8: Round CSV "boost", Greg Chicares, 2021/01/26
- [lmi-commits] [lmi] master e507882 6/8: Remove a useless assertion, Greg Chicares, 2021/01/26
- [lmi-commits] [lmi] master 7066049 8/8: Record speed measurements, Greg Chicares, 2021/01/26
- [lmi-commits] [lmi] master e7ab330 2/8: Store currency as such,
Greg Chicares <=