[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}
- [lmi-commits] [lmi] valyuta/007 ba639668 08/18: Reorder format-style map, (continued)
- [lmi-commits] [lmi] valyuta/007 ba639668 08/18: Reorder format-style map, Greg Chicares, 2022/04/24
- [lmi-commits] [lmi] valyuta/007 b480490b 13/18: Distinguish two ledger formats, Greg Chicares, 2022/04/24
- [lmi-commits] [lmi] valyuta/007 9bc66a02 18/18: Revert "Temporarily filter out factor-of-100 errors", Greg Chicares, 2022/04/24
- [lmi-commits] [lmi] valyuta/007 e8a5d1a4 17/18: Temporarily filter out factor-of-100 errors, Greg Chicares, 2022/04/24
- [lmi-commits] [lmi] valyuta/007 f77d9219 05/18: Add two new ledger emission options, Greg Chicares, 2022/04/24
- [lmi-commits] [lmi] valyuta/007 7e2c48ae 03/18: Filter unexpectedly small system-test discrepancies, Greg Chicares, 2022/04/24
- [lmi-commits] [lmi] valyuta/007 e3830e7a 07/18: Fix omissions earlier on this branch, Greg Chicares, 2022/04/24
- [lmi-commits] [lmi] valyuta/007 2a247e37 16/18: Mark or expunge unused fields, Greg Chicares, 2022/04/24
- [lmi-commits] [lmi] valyuta/007 6fa464d3 02/18: Avoid writing " \n", Greg Chicares, 2022/04/24
- [lmi-commits] [lmi] valyuta/007 e2f2679c 09/18: Clean up beforehand, not afterward, Greg Chicares, 2022/04/24
- [lmi-commits] [lmi] valyuta/007 2dfc93c1 14/18: Rearrange ledger formats,
Greg Chicares <=
- [lmi-commits] [lmi] valyuta/007 847f3e0f 15/18: Use a more reasonable format for an unused field, Greg Chicares, 2022/04/24