[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [5175] Demonstrate and explain a problem
From: |
Greg Chicares |
Subject: |
[lmi-commits] [5175] Demonstrate and explain a problem |
Date: |
Mon, 23 May 2011 10:40:31 +0000 |
Revision: 5175
http://svn.sv.gnu.org/viewvc/?view=rev&root=lmi&revision=5175
Author: chicares
Date: 2011-05-23 10:40:30 +0000 (Mon, 23 May 2011)
Log Message:
-----------
Demonstrate and explain a problem
Modified Paths:
--------------
lmi/trunk/ihs_avmly.cpp
Modified: lmi/trunk/ihs_avmly.cpp
===================================================================
--- lmi/trunk/ihs_avmly.cpp 2011-05-23 00:53:46 UTC (rev 5174)
+++ lmi/trunk/ihs_avmly.cpp 2011-05-23 10:40:30 UTC (rev 5175)
@@ -1561,14 +1561,24 @@
// that some test cases gave anomalous results--e.g., a 2% load
// on a 100000 annual premium (split into necessary and
// unnecessary pieces) came out to 1999.99 .
+ //
+ // The comment above is misleading. The first calculation isn't
+ // reachable unless premium tax is tiered in the state of domicile
+ // but not in the premium-tax state--which is weird. It made more
+ // sense when SD had a first-year-premium threshold for tiering,
+ // but that was repealed in 2008. Although the condition is now
+ // dubious, the code is valuable: the first calculation is more
+ // robust than the second, though more prone to roundoff error,
+ // so it should be preferred wherever the two materially disagree.
if
- ( !FirstYearPremiumExceedsRetaliationLimit
+ ( !FirstYearPremiumExceedsRetaliationLimit // not {AK, SD, XX}
&&
- ( PremiumTaxLoadIsTieredInPremiumTaxState_
+ ( PremiumTaxLoadIsTieredInPremiumTaxState_ // {AK, SD}
|| PremiumTaxLoadIsTieredInStateOfDomicile_
)
)
{
+ fatal_error() << "Practically unreachable." << LMI_FLUSH;
double ytd_premium_tax_reflecting_retaliation = std::max
(YearsTotalPremTaxLoadInPremiumTaxState
,YearsTotalPremTaxLoadInStateOfDomicile
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [lmi-commits] [5175] Demonstrate and explain a problem,
Greg Chicares <=