[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master 00289fa7 25/27: Rearrange ledger formats
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master 00289fa7 25/27: Rearrange ledger formats |
Date: |
Mon, 25 Apr 2022 12:56:18 -0400 (EDT) |
branch: master
commit 00289fa76e71b0e4fd7829c978233211636bb756
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}
- [lmi-commits] [lmi] master 12192723 06/27: Add two new ledger emission options, (continued)
- [lmi-commits] [lmi] master 12192723 06/27: Add two new ledger emission options, Greg Chicares, 2022/04/25
- [lmi-commits] [lmi] master 119df7a9 13/27: Add a 'divisor' argument to LedgerBase::value_str(), Greg Chicares, 2022/04/25
- [lmi-commits] [lmi] master 2b108ed7 18/27: Avoid unnecessary rounding, Greg Chicares, 2022/04/25
- [lmi-commits] [lmi] master b7c61b4d 20/27: Regularize format names, Greg Chicares, 2022/04/25
- [lmi-commits] [lmi] master 8de190ce 17/27: Regularize whitespace, Greg Chicares, 2022/04/25
- [lmi-commits] [lmi] master 0b6a3b69 02/27: Avoid writing " \n", Greg Chicares, 2022/04/25
- [lmi-commits] [lmi] master 95b4e917 19/27: Remove an unnecessary comment, Greg Chicares, 2022/04/25
- [lmi-commits] [lmi] master 61f6a237 21/27: Reorder format-style map, Greg Chicares, 2022/04/25
- [lmi-commits] [lmi] master 299cc249 22/27: Improve documentation, Greg Chicares, 2022/04/25
- [lmi-commits] [lmi] master 6f50ad93 23/27: Transpose a ledger format, Greg Chicares, 2022/04/25
- [lmi-commits] [lmi] master 00289fa7 25/27: Rearrange ledger formats,
Greg Chicares <=
- [lmi-commits] [lmi] master 16898eb9 26/27: Use a more reasonable format for an unused field, Greg Chicares, 2022/04/25
- [lmi-commits] [lmi] master 09e00258 27/27: Mark or expunge unused fields, Greg Chicares, 2022/04/25