lmi-commits
[Top][All Lists]
Advanced

[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();



reply via email to

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