lmi-commits
[Top][All Lists]
Advanced

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

[lmi-commits] [lmi] valyuta/005 4401725 17/17: Merge branch 'master' int


From: Greg Chicares
Subject: [lmi-commits] [lmi] valyuta/005 4401725 17/17: Merge branch 'master' into valyuta/005
Date: Sat, 16 Jan 2021 21:06:19 -0500 (EST)

branch: valyuta/005
commit 440172501d2162822ad064d1b5e3386c4605b10e
Merge: 0735250 dfdbf3c
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>

    Merge branch 'master' into valyuta/005
    
    As earlier:
      git merge --verbose --no-ff --no-commit master
    Negligible speed improvement, as expected.
---
 Speed_gcc_i686-w64-mingw32    |  12 +-
 Speed_gcc_x86_64-pc-linux-gnu |  12 +-
 Speed_gcc_x86_64-w64-mingw32  |  12 +-
 account_value.hpp             | 311 +++++++++++++++++++++---------------------
 any_member.hpp                |   2 +-
 basic_values.hpp              |  15 +-
 dbnames.xpp                   |   2 +-
 dbo_rules.cpp                 |   2 +-
 dbo_rules.hpp                 |   2 +-
 fenv_lmi_x86.hpp              |   2 +-
 gpt_specamt.cpp               |   5 +-
 ihs_avmly.cpp                 |  10 +-
 ihs_avsolve.cpp               |  12 +-
 ihs_basicval.cpp              |   2 +
 mc_enum.hpp                   |   2 +-
 report_table_test.cpp         |   2 +-
 timer.hpp                     |   2 +-
 version.hpp                   |   2 +-
 18 files changed, 209 insertions(+), 200 deletions(-)

diff --git a/Speed_gcc_i686-w64-mingw32 b/Speed_gcc_i686-w64-mingw32
index 7c97163..2d520be 100644
--- a/Speed_gcc_i686-w64-mingw32
+++ b/Speed_gcc_i686-w64-mingw32
@@ -1,7 +1,7 @@
 Test speed:
-  naic, no solve      : 5.378e-02 s mean;      52957 us least of  19 runs
-  naic, specamt solve : 1.002e-01 s mean;      99248 us least of  10 runs
-  naic, ee prem solve : 9.134e-02 s mean;      90378 us least of  11 runs
-  finra, no solve     : 1.664e-02 s mean;      16331 us least of  61 runs
-  finra, specamt solve: 5.897e-02 s mean;      58153 us least of  17 runs
-  finra, ee prem solve: 5.436e-02 s mean;      53565 us least of  19 runs
+  naic, no solve      : 5.330e-02 s mean;      52985 us least of  19 runs
+  naic, specamt solve : 9.927e-02 s mean;      98880 us least of  11 runs
+  naic, ee prem solve : 9.033e-02 s mean;      89979 us least of  12 runs
+  finra, no solve     : 1.740e-02 s mean;      16380 us least of  58 runs
+  finra, specamt solve: 5.878e-02 s mean;      57988 us least of  18 runs
+  finra, ee prem solve: 5.415e-02 s mean;      53516 us least of  19 runs
diff --git a/Speed_gcc_x86_64-pc-linux-gnu b/Speed_gcc_x86_64-pc-linux-gnu
index e3671aa..129aff9 100644
--- a/Speed_gcc_x86_64-pc-linux-gnu
+++ b/Speed_gcc_x86_64-pc-linux-gnu
@@ -1,7 +1,7 @@
 Test speed:
-  naic, no solve      : 2.062e-02 s mean;      20294 us least of  49 runs
-  naic, specamt solve : 3.719e-02 s mean;      36633 us least of  27 runs
-  naic, ee prem solve : 3.386e-02 s mean;      33575 us least of  30 runs
-  finra, no solve     : 6.020e-03 s mean;       5799 us least of 100 runs
-  finra, specamt solve: 2.112e-02 s mean;      20654 us least of  48 runs
-  finra, ee prem solve: 1.947e-02 s mean;      19002 us least of  52 runs
+  naic, no solve      : 2.051e-02 s mean;      20208 us least of  49 runs
+  naic, specamt solve : 3.693e-02 s mean;      36525 us least of  28 runs
+  naic, ee prem solve : 3.364e-02 s mean;      33349 us least of  30 runs
+  finra, no solve     : 5.936e-03 s mean;       5791 us least of 100 runs
+  finra, specamt solve: 2.091e-02 s mean;      20439 us least of  48 runs
+  finra, ee prem solve: 1.935e-02 s mean;      18944 us least of  52 runs
diff --git a/Speed_gcc_x86_64-w64-mingw32 b/Speed_gcc_x86_64-w64-mingw32
index e06ccc3..947a781 100644
--- a/Speed_gcc_x86_64-w64-mingw32
+++ b/Speed_gcc_x86_64-w64-mingw32
@@ -1,7 +1,7 @@
 Test speed:
-  naic, no solve      : 2.780e-02 s mean;      27325 us least of  36 runs
-  naic, specamt solve : 4.736e-02 s mean;      46781 us least of  22 runs
-  naic, ee prem solve : 4.344e-02 s mean;      42963 us least of  24 runs
-  finra, no solve     : 1.056e-02 s mean;      10319 us least of  95 runs
-  finra, specamt solve: 2.827e-02 s mean;      27932 us least of  36 runs
-  finra, ee prem solve: 2.633e-02 s mean;      25996 us least of  38 runs
+  naic, no solve      : 2.756e-02 s mean;      27296 us least of  37 runs
+  naic, specamt solve : 4.712e-02 s mean;      46713 us least of  22 runs
+  naic, ee prem solve : 4.321e-02 s mean;      42860 us least of  24 runs
+  finra, no solve     : 1.049e-02 s mean;      10287 us least of  96 runs
+  finra, specamt solve: 2.817e-02 s mean;      27897 us least of  36 runs
+  finra, ee prem solve: 2.626e-02 s mean;      26013 us least of  39 runs
diff --git a/account_value.hpp b/account_value.hpp
index d5bfc9d..69605f0 100644
--- a/account_value.hpp
+++ b/account_value.hpp
@@ -101,9 +101,9 @@ class LMI_SO AccountValue final
 
     int                    GetLength     () const;
 
-    double InforceLivesBoy         () const;
-    double InforceLivesEoy         () const;
-    currency GetSepAcctAssetsInforce () const;
+    double   InforceLivesBoy        () const;
+    double   InforceLivesEoy        () const;
+    currency GetSepAcctAssetsInforce() const;
 
     void process_payment          (currency);
     void IncrementAVProportionally(currency);
@@ -181,8 +181,8 @@ class LMI_SO AccountValue final
 
     // Process monthly transactions up to but excluding interest credit
     currency IncrementBOM
-        (int year
-        ,int month
+        (int    year
+        ,int    month
         ,double a_case_k_factor
         );
     // Credit interest and process all subsequent monthly transactions
@@ -209,9 +209,9 @@ class LMI_SO AccountValue final
         ,mcenum_sep_basis    a_SolveSepBasis
         );
 
-    currency SolveTest             (currency a_CandidateValue);
+    currency SolveTest               (currency a_CandidateValue);
 
-    currency SolveGuarPremium      ();
+    currency SolveGuarPremium        ();
 
     void PerformSpecAmtStrategy();
     void PerformSupplAmtStrategy();
@@ -223,8 +223,8 @@ class LMI_SO AccountValue final
         ) const;
 
     void PerformPmtStrategy(currency* a_Pmt); // Antediluvian.
-    currency PerformEePmtStrategy     () const;
-    currency PerformErPmtStrategy     () const;
+    currency PerformEePmtStrategy       () const;
+    currency PerformErPmtStrategy       () const;
     currency DoPerformPmtStrategy
         (mcenum_solve_type                       a_SolveForWhichPrem
         ,mcenum_mode                             a_CurrentMode
@@ -241,7 +241,7 @@ class LMI_SO AccountValue final
     void TxTestGPT                  ();
     void TxPmt(); // Antediluvian.
     void TxAscertainDesiredPayment  ();
-    void TxLimitPayment             (double a_maxpmt);
+    void TxLimitPayment             (double a_maxpmt); // CURRENCY !! not 
currency?
     void TxRecognizePaymentFor7702A
         (currency a_pmt
         ,bool     a_this_payment_is_unnecessary
@@ -280,17 +280,17 @@ class LMI_SO AccountValue final
         ,double   monthly_rate
         ) const;
 
-    bool   IsModalPmtDate          (mcenum_mode) const;
-    bool   IsModalPmtDate          (); // Antediluvian.
-    int    MonthsToNextModalPmtDate() const;
-    currency anticipated_deduction (mcenum_anticipated_deduction);
+    bool     IsModalPmtDate          (mcenum_mode) const;
+    bool     IsModalPmtDate          (); // Antediluvian.
+    int      MonthsToNextModalPmtDate() const;
+    currency anticipated_deduction   (mcenum_anticipated_deduction);
 
     currency minimum_specified_amount(bool issuing_now, bool term_rider) const;
-    void   ChangeSpecAmtBy         (currency delta);
-    void   ChangeSupplAmtBy        (currency delta);
+    void     ChangeSpecAmtBy         (currency delta);
+    void     ChangeSupplAmtBy        (currency delta);
 
-    currency SurrChg               () const;
-    currency CSVBoost              () const;
+    currency SurrChg                 () const;
+    currency CSVBoost                () const;
 
     void     set_list_bill_year_and_month();
     void     set_list_bill_premium();
@@ -302,9 +302,9 @@ class LMI_SO AccountValue final
 
     void   ApplyDynamicMandE       (currency assets);
 
-    void   SetMonthlyDetail(int enumerator, std::string const& s);
-    void   SetMonthlyDetail(int enumerator, double d);
-    void   SetMonthlyDetail(int enumerator, currency c);
+    void   SetMonthlyDetail(int enumerator, std::string const&);
+    void   SetMonthlyDetail(int enumerator, double);
+    void   SetMonthlyDetail(int enumerator, currency);
     void   DebugPrintInit();
     void   DebugEndBasis();
 
@@ -358,8 +358,8 @@ class LMI_SO AccountValue final
     mcenum_gen_basis GenBasis_;
     mcenum_sep_basis SepBasis_;
 
-    int         LapseMonth; // Antediluvian.
-    int         LapseYear;  // Antediluvian.
+    int      LapseMonth; // Antediluvian.
+    int      LapseYear;  // Antediluvian.
 
     currency External1035Amount;
     currency Internal1035Amount;
@@ -392,86 +392,86 @@ class LMI_SO AccountValue final
     std::vector<currency> NetPmts;
 
     // Reproposal input.
-    int       InforceYear;
-    int       InforceMonth;
-    currency  InforceAVGenAcct;
-    currency  InforceAVSepAcct;
-    currency  InforceAVRegLn;
-    currency  InforceAVPrfLn;
-    currency  InforceRegLnBal;
-    currency  InforcePrfLnBal;
-    currency  InforceCumNoLapsePrem;
-    currency  InforceBasis;
-    currency  InforceCumPmts;
-    currency  InforceTaxBasis;
-    currency  InforceLoanBalance;
+    int      InforceYear;
+    int      InforceMonth;
+    currency InforceAVGenAcct;
+    currency InforceAVSepAcct;
+    currency InforceAVRegLn;
+    currency InforceAVPrfLn;
+    currency InforceRegLnBal;
+    currency InforcePrfLnBal;
+    currency InforceCumNoLapsePrem;
+    currency InforceBasis;
+    currency InforceCumPmts;
+    currency InforceTaxBasis;
+    currency InforceLoanBalance;
 
     // Intermediate values.
-    int       Year;
-    int       Month;
-    int       MonthsSinceIssue;
-    bool      daily_interest_accounting;
-    int       days_in_policy_month;
-    int       days_in_policy_year;
-    currency  AVGenAcct;
-    currency  AVSepAcct;
-    currency  SepAcctValueAfterDeduction;
-    double    GenAcctPaymentAllocation;
-    double    SepAcctPaymentAllocation;
-    double    NAAR;
-    currency  CoiCharge;
-    currency  RiderCharges;
-    currency  NetCoiCharge;
-    currency  SpecAmtLoadBase;
-    double    DacTaxRsv;
-
-    currency  AVUnloaned; // Antediluvian.
-
-    currency  NetMaxNecessaryPremium;
-    currency  GrossMaxNecessaryPremium;
-    currency  NecessaryPremium;
-    currency  UnnecessaryPremium;
-
-    // 7702A CVAT deemed cash value.
-    double  Dcv;
-    double  DcvDeathBft;
-    double  DcvNaar;
-    double  DcvCoiCharge;
-    double  DcvTermCharge;
-    double  DcvWpCharge;
+    int      Year;
+    int      Month;
+    int      MonthsSinceIssue;
+    bool     daily_interest_accounting;
+    int      days_in_policy_month;
+    int      days_in_policy_year;
+    currency AVGenAcct;
+    currency AVSepAcct;
+    currency SepAcctValueAfterDeduction;
+    double   GenAcctPaymentAllocation;
+    double   SepAcctPaymentAllocation;
+    double   NAAR; // CURRENCY !! not currency?
+    currency CoiCharge;
+    currency RiderCharges;
+    currency NetCoiCharge;
+    currency SpecAmtLoadBase;
+    double   DacTaxRsv; // CURRENCY !! obsolete--always zero
+
+    currency AVUnloaned; // Antediluvian.
+
+    currency NetMaxNecessaryPremium;
+    currency GrossMaxNecessaryPremium;
+    currency NecessaryPremium;
+    currency UnnecessaryPremium;
+
+    // 7702A CVAT deemed cash value. CURRENCY !! not currency?
+    double   Dcv;
+    double   DcvDeathBft;
+    double   DcvNaar;
+    double   DcvCoiCharge;
+    double   DcvTermCharge;
+    double   DcvWpCharge;
     // For other riders like AD&D, charge for DCV = charge otherwise.
 
     // Honeymoon provision.
-    bool      HoneymoonActive;
-    currency  HoneymoonValue;
+    bool     HoneymoonActive;
+    currency HoneymoonValue;
 
     // 7702 GPT
-    currency  GptForceout;
-    currency  YearsTotalGptForceout;
+    currency GptForceout;
+    currency YearsTotalGptForceout;
 
     // Intermediate values within annual or monthly loop only.
     currency    pmt;       // Antediluvian.
     mcenum_mode pmt_mode;  // Antediluvian.
     int         ModeIndex; // Antediluvian.
 
-    currency  GenAcctIntCred;
-    currency  SepAcctIntCred;
-    currency  RegLnIntCred;
-    currency  PrfLnIntCred;
-    currency  AVRegLn;
-    currency  AVPrfLn;
-    currency  RegLnBal;
-    currency  PrfLnBal;
-    currency  MaxLoan;
-    currency  UnusedTargetPrem;
-    currency  AnnualTargetPrem;
-    currency  MaxWD;
-    currency  GrossWD;
-    currency  NetWD;
-    currency  CumWD;
-
-    currency     wd;           // Antediluvian.
-    double       mlyguarv;     // Antediluvian.
+    currency GenAcctIntCred;
+    currency SepAcctIntCred;
+    currency RegLnIntCred;
+    currency PrfLnIntCred;
+    currency AVRegLn;
+    currency AVPrfLn;
+    currency RegLnBal;
+    currency PrfLnBal;
+    currency MaxLoan;
+    currency UnusedTargetPrem;
+    currency AnnualTargetPrem;
+    currency MaxWD;
+    currency GrossWD;
+    currency NetWD;
+    currency CumWD;
+
+    currency wd;           // Antediluvian.
+    double   mlyguarv;     // Antediluvian.
 
     // For GPT: SA, DB, and DBOpt before the day's transactions are applied.
     currency     OldSA;
@@ -520,80 +520,81 @@ class LMI_SO AccountValue final
     double       YearsSalesLoadRefundRate;
     double       YearsDacTaxLoadRate;
 
-    currency  MonthsPolicyFees;
-    currency  SpecAmtLoad;
-    double    premium_load_;
-    double    sales_load_;
-    double    premium_tax_load_;
-    double    dac_tax_load_;
+    currency MonthsPolicyFees;
+    currency SpecAmtLoad;
+    // Premium load is (rounded) currency; its components are not.
+    double   premium_load_;
+    double   sales_load_;
+    double   premium_tax_load_;
+    double   dac_tax_load_;
 
     // Stratified loads are determined by assets and cumulative
     // payments immediately after the monthly deduction. Both are
     // stored at the proper moment, where they're constrained to be
     // nonnegative. Stratified loads happen to be used only for the
     // separate account.
-    currency  AssetsPostBom;
-    currency  CumPmtsPostBom;
-    currency  SepAcctLoad;
-
-    double    case_k_factor;
-    double    ActualCoiRate;
-
-    bool      SplitMinPrem;
-    bool      UnsplitSplitMinPrem;
-
-    int       list_bill_year_  {methuselah};
-    int       list_bill_month_ {13};
-
-    bool      TermCanLapse;
-    bool      TermRiderActive;
-    currency  ActualSpecAmt;
-    currency  TermSpecAmt;
-    currency  TermDB;
-    currency  DB7702A;
-    currency  DBIgnoringCorr;
-    currency  DBReflectingCorr;
-
-    currency  deathbft; // Antediluvian.
-    bool      haswp;    // Antediluvian.
-    bool      hasadb;   // Antediluvian.
-
-    currency  ActualLoan;
-    currency  RequestedLoan;
-    currency  RequestedWD;
-
-    currency  AdbCharge;
-    currency  SpouseRiderCharge;
-    currency  ChildRiderCharge;
-    currency  WpCharge;
-    currency  TermCharge;
-
-    currency  MlyDed;
-    currency  mlydedtonextmodalpmtdate; // Antediluvian.
-
-    currency  YearsTotalCoiCharge;
-    currency  YearsTotalRiderCharges;
-    double    YearsAVRelOnDeath;
-    double    YearsLoanRepaidOnDeath;
-    double    YearsGrossClaims;
-    double    YearsDeathProceeds;
-    double    YearsNetClaims;
-    currency  YearsTotalNetIntCredited;
-    currency  YearsTotalGrossIntCredited;
-    currency  YearsTotalLoanIntAccrued;
-    currency  YearsTotalPolicyFee;
-    double    YearsTotalDacTaxLoad;
-    currency  YearsTotalSpecAmtLoad;
-    currency  YearsTotalSepAcctLoad;
+    currency AssetsPostBom;
+    currency CumPmtsPostBom;
+    currency SepAcctLoad;
+
+    double   case_k_factor;
+    double   ActualCoiRate;
+
+    bool     SplitMinPrem;
+    bool     UnsplitSplitMinPrem;
+
+    int      list_bill_year_  {methuselah};
+    int      list_bill_month_ {13};
+
+    bool     TermCanLapse;
+    bool     TermRiderActive;
+    currency ActualSpecAmt;
+    currency TermSpecAmt;
+    currency TermDB;
+    currency DB7702A;
+    currency DBIgnoringCorr;
+    currency DBReflectingCorr;
+
+    currency deathbft; // Antediluvian.
+    bool     haswp;    // Antediluvian.
+    bool     hasadb;   // Antediluvian.
+
+    currency ActualLoan;
+    currency RequestedLoan;
+    currency RequestedWD;
+
+    currency AdbCharge;
+    currency SpouseRiderCharge;
+    currency ChildRiderCharge;
+    currency WpCharge;
+    currency TermCharge;
+
+    currency MlyDed;
+    currency mlydedtonextmodalpmtdate; // Antediluvian.
+
+    currency YearsTotalCoiCharge;
+    currency YearsTotalRiderCharges;
+    double   YearsAVRelOnDeath;
+    double   YearsLoanRepaidOnDeath;
+    double   YearsGrossClaims;
+    double   YearsDeathProceeds;
+    double   YearsNetClaims;
+    currency YearsTotalNetIntCredited;
+    currency YearsTotalGrossIntCredited;
+    currency YearsTotalLoanIntAccrued;
+    currency YearsTotalPolicyFee;
+    double   YearsTotalDacTaxLoad; // cumulative (unrounded) 'dac_tax_load_'
+    currency YearsTotalSpecAmtLoad;
+    currency YearsTotalSepAcctLoad;
 
     // For experience rating.
-    double  CoiRetentionRate;
-    double  ExperienceRatingAmortizationYears;
-    double  IbnrAsMonthsOfMortalityCharges;
-    double  NextYearsProjectedCoiCharge;
-    double  YearsTotalNetCoiCharge;
+    double   CoiRetentionRate;
+    double   ExperienceRatingAmortizationYears;
+    double   IbnrAsMonthsOfMortalityCharges;
+    double   NextYearsProjectedCoiCharge;
+    double   YearsTotalNetCoiCharge;
 
-    currency  CumulativeSalesLoad;
+    currency CumulativeSalesLoad;
 
     // Illustrated outlay must be the same for current, guaranteed,
     // and all other bases. Outlay components are set on whichever
diff --git a/any_member.hpp b/any_member.hpp
index c462a82..0bceddc 100644
--- a/any_member.hpp
+++ b/any_member.hpp
@@ -113,7 +113,7 @@ class holder final
 {
     // Friendship is extended to class any_member only to support its
     // cast operations.
-    template<typename T> friend class any_member;
+    template<typename> friend class any_member;
 
   public:
     holder(ClassType*, ValueType const&);
diff --git a/basic_values.hpp b/basic_values.hpp
index 1642fcb..f3847a9 100644
--- a/basic_values.hpp
+++ b/basic_values.hpp
@@ -332,13 +332,13 @@ class LMI_SO BasicValues
     int                          TermForcedConvDur;
     bool                         TermIsDbFor7702;
     bool                         TermIsDbFor7702A;
-    double                       ExpPerKLimit;
+    double                       ExpPerKLimit; // CURRENCY !! may be infinity
     oenum_modal_prem_type        MinPremType;
     oenum_modal_prem_type        TgtPremType;
     bool                         TgtPremFixedAtIssue;
     currency                     TgtPremMonthlyPolFee;
-    double                       CurrCoiTable0Limit;
-    double                       CurrCoiTable1Limit;
+    double                       CurrCoiTable0Limit; // CURRENCY !! may be 
infinity
+    double                       CurrCoiTable1Limit; // CURRENCY !! may be 
infinity
     e_actuarial_table_method     CoiInforceReentry;
     mcenum_anticipated_deduction MaxWDDed_;
     double                       MaxWdGenAcctValMult;
@@ -356,9 +356,9 @@ class LMI_SO BasicValues
     bool                         SurrChgOnDecr;
     std::vector<double>          FreeWDProportion;
 
-    double                  AdbLimit;
-    double                  WpLimit;
-    double                  SpecAmtLoadLimit;
+    double                  AdbLimit; // CURRENCY !! may be infinity
+    double                  WpLimit; // CURRENCY !! may be infinity
+    double                  SpecAmtLoadLimit; // CURRENCY !! may be infinity
     currency                MinWD;
     currency                WDFee;
     double                  WDFeeRate;
@@ -439,6 +439,9 @@ class LMI_SO BasicValues
     std::vector<double> partial_mortality_tpx_;
     std::vector<double> partial_mortality_lx_;
 
+    // This data member is not of type 'currency' because it merely
+    // stores an input parameter for the GPT server, and is used for
+    // no other purpose.
     double              InitialTargetPremium;
 
     void                Init7702();
diff --git a/dbnames.xpp b/dbnames.xpp
index b62870d..4017a87 100644
--- a/dbnames.xpp
+++ b/dbnames.xpp
@@ -347,7 +347,7 @@
 {DB_LedgerType,DB_Topic_Miscellanea,"LedgerType","Ledger type: 0=illustration 
reg, 1=FINRA, 3=group private placement, 6=individual private placement",}, \
 {DB_Nonillustrated,DB_Topic_Miscellanea,"Nonillustrated","Forbid all 
illustrations: 0=no, 1=yes",}, \
 {DB_NoLongerIssued,DB_Topic_Miscellanea,"NoLongerIssued","Forbid new-business 
illustrations: 0=no, 1=yes",}, \
-{DB_AgeLastOrNearest,DB_Topic_Miscellanea,"AgeLastOrNearest","Age calculated 
as of last or nearest birthday: 0=ALB, 1=ANB (ties --> older), 2=ANB (ties --> 
younger)",}, \
+{DB_AgeLastOrNearest,DB_Topic_Miscellanea,"AgeLastOrNearest","Age calculated 
as of last or nearest birthday: 0=ALB, 1=ANB (ties --> younger), 2=ANB (ties 
--> older)",}, \
 {DB_MaturityAge,DB_Topic_Miscellanea,"MaturityAge","Normal maturity age",}, \
 {DB_CashValueEnhMult,DB_Topic_Miscellanea,"CashValueEnhMult","Cash value 
enhancement multiple: e.g. 0.03 to make cash value three percent higher than 
account value",}, \
 {DB_LapseIgnoresSurrChg,DB_Topic_Miscellanea,"LapseIgnoresSurrChg","Ignore 
tabular surrender charge for lapse processing",}, \
diff --git a/dbo_rules.cpp b/dbo_rules.cpp
index 84be0b2..0fa52f0 100644
--- a/dbo_rules.cpp
+++ b/dbo_rules.cpp
@@ -96,7 +96,7 @@ bool dbo_transition_is_allowed(mce_dbopt from, mce_dbopt to)
 
 // The return value is fairly useless, and may later be removed.
 
-bool dbo_sequence_is_allowed(std::vector<mce_dbopt> v)
+bool dbo_sequence_is_allowed(std::vector<mce_dbopt> const& v)
 {
     if(0 == lmi::ssize(v))
         {
diff --git a/dbo_rules.hpp b/dbo_rules.hpp
index 205767d..4206326 100644
--- a/dbo_rules.hpp
+++ b/dbo_rules.hpp
@@ -32,6 +32,6 @@
 
 bool dbo_at_issue_is_allowed(mce_dbopt);
 bool dbo_transition_is_allowed(mce_dbopt from, mce_dbopt to);
-bool dbo_sequence_is_allowed(std::vector<mce_dbopt>);
+bool dbo_sequence_is_allowed(std::vector<mce_dbopt> const&);
 
 #endif // dbo_rules_hpp
diff --git a/fenv_lmi_x86.hpp b/fenv_lmi_x86.hpp
index c74c41b..4267344 100644
--- a/fenv_lmi_x86.hpp
+++ b/fenv_lmi_x86.hpp
@@ -212,7 +212,7 @@ struct msvc_control_word_parameters
 template<typename ControlWordType>
 class control_word
 {
-    template<typename T> friend class control_word;
+    template<typename> friend class control_word;
     friend int test_main(int, char*[]);
 
     typedef typename ControlWordType::integer_type integer_type;
diff --git a/gpt_specamt.cpp b/gpt_specamt.cpp
index f30d858..9249c74 100644
--- a/gpt_specamt.cpp
+++ b/gpt_specamt.cpp
@@ -70,7 +70,7 @@ class FindSpecAmt
     Irc7702     const& Irc7702_;
     EIOBasis    const  EIOBasis_;
     int         const  Duration;
-    double      const  Premium;
+    double      const  Premium; // CURRENCY !! not currency?
     double      const  NetPmtFactorTgt;
     double      const  NetPmtFactorExc;
     currency           SpecAmt;
@@ -81,7 +81,7 @@ class FindSpecAmt
         ,Irc7702 const&     a_IRC7702
         ,EIOBasis           a_EIOBasis
         ,int                a_Duration
-        ,double             a_Premium
+        ,double             a_Premium // CURRENCY !! not currency?
         ,double             a_NetPmtFactorTgt
         ,double             a_NetPmtFactorExc
         )
@@ -95,6 +95,7 @@ class FindSpecAmt
         ,SpecAmt         {C0}
         {
         }
+    // CURRENCY !! decimal_root() expects this; but see 'ihs_avsolve.cpp'.
     double operator()(double a_Trial)
         {
         SpecAmt = Values_.round_min_specamt().c(a_Trial);
diff --git a/ihs_avmly.cpp b/ihs_avmly.cpp
index 364a321..13ec3ed 100644
--- a/ihs_avmly.cpp
+++ b/ihs_avmly.cpp
@@ -369,7 +369,7 @@ void AccountValue::IncrementAVProportionally(currency 
increment)
 //============================================================================
 // Apply increments to account value to the preferred account.
 void AccountValue::IncrementAVPreferentially
-    (currency                             increment
+    (currency                           increment
     ,oenum_increment_account_preference preferred_account
     )
 {
@@ -507,7 +507,7 @@ void AccountValue::DecrementAVProportionally(currency 
decrement)
 /// value due to catastrophic cancellation, improperly causing lapse.
 
 void AccountValue::DecrementAVProgressively
-    (currency                             decrement
+    (currency                           decrement
     ,oenum_increment_account_preference preferred_account
     )
 {
@@ -685,7 +685,7 @@ double AccountValue::ActualMonthlyRate(double monthly_rate) 
const
 // Rounded interest increment.
 currency AccountValue::InterestCredited
     (currency principal
-    ,double monthly_rate
+    ,double   monthly_rate
     ) const
 {
     return round_interest_credit().c(principal * 
ActualMonthlyRate(monthly_rate));
@@ -1298,7 +1298,7 @@ void AccountValue::TxAscertainDesiredPayment()
 /// Limit payment (e.g., to the non-MEC maximum).
 ///
 /// The limit argument is of type double because the taxation code may
-/// return DBL_MAX.
+/// return DBL_MAX. CURRENCY !! Can currency work with such values?
 ///
 /// TAXATION !! Should this be called for gpt? or, if it's called,
 /// should it assert that it has no effect?
@@ -1356,7 +1356,7 @@ void AccountValue::TxLimitPayment(double a_maxpmt)
 //============================================================================
 void AccountValue::TxRecognizePaymentFor7702A
     (currency a_pmt
-    ,bool   a_this_payment_is_unnecessary
+    ,bool     a_this_payment_is_unnecessary
     )
 {
     if(C0 == a_pmt)
diff --git a/ihs_avsolve.cpp b/ihs_avsolve.cpp
index 0fd0e56..5a28c92 100644
--- a/ihs_avsolve.cpp
+++ b/ihs_avsolve.cpp
@@ -60,11 +60,13 @@ class SolveHelper
         :av {a_av}
         {
         }
-
-    // decimal_root() calls this thus:
-    //   static_cast<double>(f(double));
-    // so double f(double) is most natural here:
-//  double operator()(currency a_CandidateValue)
+    // CURRENCY !! decimal_root() invokes this thus:
+    //   static_cast<double>(function(double));
+    // so
+    //   double function(double)
+    // is the appropriate signature here. Someday it might make sense
+    // to modify decimal_root to work with currency types directly,
+    // or at least to make this function take a 'currency' argument.
     double operator()(double a_CandidateValue)
         {
 // CURRENCY !! Consider using zero<currency> instead of double.
diff --git a/ihs_basicval.cpp b/ihs_basicval.cpp
index 69fe0e7..ae8bb7c 100644
--- a/ihs_basicval.cpp
+++ b/ihs_basicval.cpp
@@ -1220,6 +1220,8 @@ std::pair<double,double> BasicValues::approx_mly_ded
 /// (e.g., a fee to offset underwriting costs for private placements)
 /// are extraordinary, and occur only on products for which a split
 /// between ee and er would not be wanted.
+///
+/// Returns a pair of deliberately unrounded doubles.
 
 std::pair<double,double> BasicValues::approx_mly_ded_ex
     (int      year
diff --git a/mc_enum.hpp b/mc_enum.hpp
index 760ae80..ef2fff5 100644
--- a/mc_enum.hpp
+++ b/mc_enum.hpp
@@ -95,7 +95,7 @@ class mc_enum final
     static_assert(std::is_enum_v<T>);
 
     friend class mc_enum_test;
-    template<typename U> friend std::vector<std::string> const& all_strings();
+    template<typename> friend std::vector<std::string> const& all_strings();
 
   public:
     typedef T enum_type;
diff --git a/report_table_test.cpp b/report_table_test.cpp
index b10b3c8..3beadbb 100644
--- a/report_table_test.cpp
+++ b/report_table_test.cpp
@@ -69,7 +69,7 @@ std::vector<table_column_info> bloat
     return v;
 }
 
-int sum(std::vector<int> z)
+int sum(std::vector<int> const& z)
 {
     return std::accumulate(z.begin(), z.end(), 0);
 }
diff --git a/timer.hpp b/timer.hpp
index 35bab00..c6bb760 100644
--- a/timer.hpp
+++ b/timer.hpp
@@ -47,7 +47,7 @@ void lmi_sleep(int seconds);
 class LMI_SO Timer
 {
     friend class TimerTest;
-    template<typename F> friend class AliquotTimer;
+    template<typename> friend class AliquotTimer;
 
   public:
     Timer();
diff --git a/version.hpp b/version.hpp
index 59014cb..770587f 100644
--- a/version.hpp
+++ b/version.hpp
@@ -22,6 +22,6 @@
 
 #include "config.hpp"
 
-#define LMI_VERSION "20210108T1700Z"
+#define LMI_VERSION "20210115T1908Z"
 
 #endif // version_hpp



reply via email to

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