lmi-commits
[Top][All Lists]
Advanced

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

[lmi-commits] [lmi] valyuta/007 2dfc93c1 14/18: Rearrange ledger formats


From: Greg Chicares
Subject: [lmi-commits] [lmi] valyuta/007 2dfc93c1 14/18: Rearrange ledger formats
Date: Sun, 24 Apr 2022 18:46:15 -0400 (EDT)

branch: valyuta/007
commit 2dfc93c13ccc68688b5b12ec7c8b33f113f9a618
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>

    Rearrange ledger formats
    
    The order of /f[0-6]/ (for scalars and vectors separately) isn't
    necessarily ideal, but any reasonable order is better than none.
---
 ledger_evaluator.cpp | 158 +++++++++++++++++++++++++--------------------------
 1 file changed, 76 insertions(+), 82 deletions(-)

diff --git a/ledger_evaluator.cpp b/ledger_evaluator.cpp
index f97cd49b..f6749add 100644
--- a/ledger_evaluator.cpp
+++ b/ledger_evaluator.cpp
@@ -441,52 +441,9 @@ format_map_t static_formats()
 
 // Special Formatting for Scalar Items
     static format_map_t const format_map =
-// F4: scaled by 100, two decimals, with '%' at end:
-// > Format as percentage "0.00%"
-    {{"GuarMaxMandE"                    , f4}
-    ,{"InitAnnGenAcctInt"               , f4}
-    ,{"InitAnnLoanCredRate"             , f4}
-    ,{"InitAnnSepAcctCurrGross0Rate"    , f4}
-    ,{"InitAnnSepAcctCurrGrossHalfRate" , f4}
-    ,{"InitAnnSepAcctCurrNet0Rate"      , f4}
-    ,{"InitAnnSepAcctCurrNetHalfRate"   , f4}
-    ,{"InitAnnSepAcctGrossInt"          , f4}
-    ,{"InitAnnSepAcctGuarGross0Rate"    , f4}
-    ,{"InitAnnSepAcctGuarGrossHalfRate" , f4}
-    ,{"InitAnnSepAcctGuarNet0Rate"      , f4}
-    ,{"InitAnnSepAcctGuarNetHalfRate"   , f4}
-    ,{"InitAnnSepAcctNetInt"            , f4}
-    ,{"MaxAnnCurrLoanDueRate"           , f4}
-    ,{"MaxAnnGuarLoanSpread"            , f4}
-    ,{"PostHoneymoonSpread"             , f4}
-    ,{"Preferred"                       , f4}
-    ,{"PremTaxRate"                     , f4}
-
-// F3: scaled by 100, zero decimals, with '%' at end:
-// > Format as percentage with no decimal places (##0%)
-    ,{"GenAcctAllocation"               , f3}
-    ,{"SalesLoadRefundRate0"            , f3}
-    ,{"SalesLoadRefundRate1"            , f3}
-
-// F2: two decimals, commas
-// > Format as a number with thousand separators and two decimal places 
(#,###,###.00)
-    ,{"CurrentCoiMultiplier"            , f2}
-    ,{"GuarPrem"                        , f2}
-    ,{"InforceTaxBasis"                 , f2}
-    ,{"InforceTotalAV"                  , f2}
-    ,{"InitSevenPayPrem"                , f2}
-// F6: two decimals, commas, cents to dollars
-// > Format as a number with thousand separators and two decimal places 
(#,###,###.00)
-    ,{"EeListBillPremium"               , f6}
-    ,{"ErListBillPremium"               , f6}
-    ,{"InitGLP"                         , f6}
-    ,{"InitGSP"                         , f6}
-    ,{"InitPrem"                        , f6}
-    ,{"InitTgtPrem"                     , f6}
-    ,{"ListBillPremium"                 , f6}
 // F0: zero decimals
 // > Format as a number with no thousand separator or decimal point (##0)
-    ,{"Age"                             , f1}
+    {{"Age"                             , f1}
     ,{"AllowGroupQuote"                 , f1}
     ,{"AvgFund"                         , f1}
     ,{"Composite"                       , f1}
@@ -537,6 +494,38 @@ format_map_t static_formats()
 // F1: zero decimals, commas
 // > Format as a number with thousand separators and no decimal places 
(#,###,###)
     ,{"ChildRiderAmount"                , f1}
+// F2: two decimals, commas
+// > Format as a number with thousand separators and two decimal places 
(#,###,###.00)
+    ,{"CurrentCoiMultiplier"            , f2}
+    ,{"GuarPrem"                        , f2}
+    ,{"InforceTaxBasis"                 , f2}
+    ,{"InforceTotalAV"                  , f2}
+    ,{"InitSevenPayPrem"                , f2}
+// F3: scaled by 100, zero decimals, with '%' at end:
+// > Format as percentage with no decimal places (##0%)
+    ,{"GenAcctAllocation"               , f3}
+    ,{"SalesLoadRefundRate0"            , f3}
+    ,{"SalesLoadRefundRate1"            , f3}
+// F4: scaled by 100, two decimals, with '%' at end:
+// > Format as percentage "0.00%"
+    ,{"GuarMaxMandE"                    , f4}
+    ,{"InitAnnGenAcctInt"               , f4}
+    ,{"InitAnnLoanCredRate"             , f4}
+    ,{"InitAnnSepAcctCurrGross0Rate"    , f4}
+    ,{"InitAnnSepAcctCurrGrossHalfRate" , f4}
+    ,{"InitAnnSepAcctCurrNet0Rate"      , f4}
+    ,{"InitAnnSepAcctCurrNetHalfRate"   , f4}
+    ,{"InitAnnSepAcctGrossInt"          , f4}
+    ,{"InitAnnSepAcctGuarGross0Rate"    , f4}
+    ,{"InitAnnSepAcctGuarGrossHalfRate" , f4}
+    ,{"InitAnnSepAcctGuarNet0Rate"      , f4}
+    ,{"InitAnnSepAcctGuarNetHalfRate"   , f4}
+    ,{"InitAnnSepAcctNetInt"            , f4}
+    ,{"MaxAnnCurrLoanDueRate"           , f4}
+    ,{"MaxAnnGuarLoanSpread"            , f4}
+    ,{"PostHoneymoonSpread"             , f4}
+    ,{"Preferred"                       , f4}
+    ,{"PremTaxRate"                     , f4}
 // F5: zero decimals, commas, cents to dollars
 // > Format as a number with thousand separators and no decimal places 
(#,###,###)
     ,{"Dumpin"                          , f5}
@@ -545,9 +534,52 @@ format_map_t static_formats()
     ,{"InitTermSpecAmt"                 , f5}
     ,{"InitTotalSA"                     , f5}
     ,{"Internal1035Amount"              , f5}
+// F6: two decimals, commas, cents to dollars
+// > Format as a number with thousand separators and two decimal places 
(#,###,###.00)
+    ,{"EeListBillPremium"               , f6}
+    ,{"ErListBillPremium"               , f6}
+    ,{"InitGLP"                         , f6}
+    ,{"InitGSP"                         , f6}
+    ,{"InitPrem"                        , f6}
+    ,{"InitTgtPrem"                     , f6}
+    ,{"ListBillPremium"                 , f6}
 
 // > Vector Formatting
 
+// F0: zero decimals
+// > Format as a number with no thousand separator or decimal point (##0)
+    ,{"AttainedAge"                     , f1}
+    ,{"Duration"                        , f1}
+    ,{"FundNumbers"                     , f1}
+    ,{"PolicyYear"                      , f1}
+// F1: zero decimals, commas
+// > Format as a number with thousand separators and no decimal places 
(#,###,##0)
+    ,{"AVRelOnDeath"                    , f1}
+    ,{"AccumulatedPremium"              , f1}
+    ,{"AddonCompOnAssets"               , f1}
+    ,{"AddonCompOnPremium"              , f1}
+    ,{"AvgDeathBft"                     , f1}
+    ,{"BOYAssets"                       , f1}
+    ,{"ClaimsPaid"                      , f1}
+    ,{"DacTaxLoad"                      , f1}
+    ,{"DacTaxRsv"                       , f1}
+    ,{"DeathProceedsPaid"               , f1}
+//  ,{"EeMode"                          , f1} // Not numeric.
+//  ,{"ErMode"                          , f1} // Not numeric.
+    ,{"ExpenseCharges"                  , f1}
+    ,{"Loads"                           , f1}
+    ,{"NaarForceout"                    , f1}
+    ,{"NetClaims"                       , f1}
+    ,{"PremTaxLoad"                     , f1}
+    ,{"RefundableSalesLoad"             , f1}
+    ,{"Salary"                          , f1}
+    ,{"SpouseRiderAmount"               , f1}
+// F2: two decimals, commas
+// > Format as a number with thousand separators and two decimal places 
(#,###,###.00)
+    ,{"AddonMonthlyFee"                 , f2}
+    ,{"AnnualFlatExtra"                 , f2}
+// TODO ?? The precision of 'InforceLives' is inadequate. Is every other 
format OK?
+    ,{"InforceLives"                    , f2}
 // F3: scaled by 100, zero decimals, with '%' at end:
 // > Format as percentage with no decimal places (##0%)
     ,{"CorridorFactor"                  , f3}
@@ -555,7 +587,6 @@ format_map_t static_formats()
     ,{"MaleProportion"                  , f3}
     ,{"NonsmokerProportion"             , f3}
     ,{"PartMortTableMult"               , f3}
-
 // F4: scaled by 100, two decimals, with '%' at end:
 // > Format as percentage with two decimal places (##0.00%)
     ,{"AnnGAIntRate"                    , f4}
@@ -568,14 +599,12 @@ format_map_t static_formats()
     ,{"HoneymoonValueSpread"            , f4}
     ,{"IndvTaxBracket"                  , f4}
     ,{"InforceHMVector"                 , f4}
-
     ,{"Irc7702ic_usual"                 , f4}
     ,{"Irc7702ic_glp"                   , f4}
     ,{"Irc7702ic_gsp"                   , f4}
     ,{"Irc7702ig_usual"                 , f4}
     ,{"Irc7702ig_glp"                   , f4}
     ,{"Irc7702ig_gsp"                   , f4}
-
     ,{"IrrCsv_Current"                  , f4}
     ,{"IrrCsv_CurrentZero"              , f4}
     ,{"IrrCsv_Guaranteed"               , f4}
@@ -584,46 +613,11 @@ format_map_t static_formats()
     ,{"IrrDb_CurrentZero"               , f4}
     ,{"IrrDb_Guaranteed"                , f4}
     ,{"IrrDb_GuaranteedZero"            , f4}
-
     ,{"MlyGAIntRate"                    , f4}
     ,{"MlyHoneymoonValueRate"           , f4}
     ,{"MlyPostHoneymoonRate"            , f4}
     ,{"MlySAIntRate"                    , f4}
     ,{"TotalIMF"                        , f4}
-// F0: zero decimals
-// > Format as a number with no thousand separator or decimal point (##0)
-    ,{"AttainedAge"                     , f1}
-    ,{"Duration"                        , f1}
-    ,{"FundNumbers"                     , f1}
-    ,{"PolicyYear"                      , f1}
-// F2: two decimals, commas
-// > Format as a number with thousand separators and two decimal places 
(#,###,###.00)
-    ,{"AddonMonthlyFee"                 , f2}
-    ,{"AnnualFlatExtra"                 , f2}
-// TODO ?? The precision of 'InforceLives' is inadequate. Is every other 
format OK?
-    ,{"InforceLives"                    , f2}
-// F1: zero decimals, commas
-// > Format as a number with thousand separators and no decimal places 
(#,###,##0)
-    ,{"AVRelOnDeath"                    , f1}
-    ,{"AccumulatedPremium"              , f1}
-    ,{"AddonCompOnAssets"               , f1}
-    ,{"AddonCompOnPremium"              , f1}
-    ,{"AvgDeathBft"                     , f1}
-    ,{"BOYAssets"                       , f1}
-    ,{"ClaimsPaid"                      , f1}
-    ,{"DacTaxLoad"                      , f1}
-    ,{"DacTaxRsv"                       , f1}
-    ,{"DeathProceedsPaid"               , f1}
-//  ,{"EeMode"                          , f1} // Not numeric.
-//  ,{"ErMode"                          , f1} // Not numeric.
-    ,{"ExpenseCharges"                  , f1}
-    ,{"Loads"                           , f1}
-    ,{"NaarForceout"                    , f1}
-    ,{"NetClaims"                       , f1}
-    ,{"PremTaxLoad"                     , f1}
-    ,{"RefundableSalesLoad"             , f1}
-    ,{"Salary"                          , f1}
-    ,{"SpouseRiderAmount"               , f1}
 // F5: zero decimals, commas, cents to dollars
 // > Format as a number with thousand separators and no decimal places 
(#,###,##0)
     ,{"AVGenAcct"                       , f5}



reply via email to

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