[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] valyuta/002 7481c2b 09/65: discard--throwaway assert
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] valyuta/002 7481c2b 09/65: discard--throwaway assertions |
Date: |
Wed, 16 Sep 2020 16:55:12 -0400 (EDT) |
branch: valyuta/002
commit 7481c2bfe8db077847475a8fd97c39cf47ab6b20
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>
discard--throwaway assertions
---
ihs_acctval.cpp | 2 ++
ihs_avmly.cpp | 46 +++++++++++++++++++++++++++++++++++++++++++++-
2 files changed, 47 insertions(+), 1 deletion(-)
diff --git a/ihs_acctval.cpp b/ihs_acctval.cpp
index 0d0570e..a737fff 100644
--- a/ihs_acctval.cpp
+++ b/ihs_acctval.cpp
@@ -1332,6 +1332,7 @@ void AccountValue::FinalizeYear()
{
InvariantValues().InitPrem = InvariantValues().GrossPmt[Year];
}
+#if 1
LMI_ASSERT
(materially_equal
( InvariantValues().GrossPmt [Year]
@@ -1339,6 +1340,7 @@ void AccountValue::FinalizeYear()
+ InvariantValues().ErGrossPmt[Year]
)
);
+#endif // 0
InvariantValues().Outlay[Year] =
InvariantValues().GrossPmt [Year]
- InvariantValues().NetWD [Year]
diff --git a/ihs_avmly.cpp b/ihs_avmly.cpp
index 2cbc68b..734ffa2 100644
--- a/ihs_avmly.cpp
+++ b/ihs_avmly.cpp
@@ -218,6 +218,9 @@ void AccountValue::DoMonthDR()
UnnecessaryPremium = unnecessary_premium;
if(necessary_premium < 0.0 || unnecessary_premium < 0.0)
warning()
+// << GrossPmts[Month] << " GrossPmts[Month]\n"
+// << gross_1035 << " gross_1035\n"
+// << GrossPmts[Month] - gross_1035 << " GrossPmts[Month] -
gross_1035\n"
<< necessary_premium << " necessary_premium\n"
<< unnecessary_premium << " unnecessary_premium\n"
<< Year << " Year\n"
@@ -1213,6 +1216,16 @@ void AccountValue::TxAscertainDesiredPayment()
return;
}
+ if(!(materially_equal(GrossPmts[Month], EeGrossPmts[Month] +
ErGrossPmts[Month])))
+ warning()
+ << GrossPmts[Month] << " GrossPmts[Month]\n"
+ << EeGrossPmts[Month] + ErGrossPmts[Month] << " EeGrossPmts[Month]
+ ErGrossPmts[Month]\n"
+ << EeGrossPmts[Month] << " EeGrossPmts[Month]\n"
+ << ErGrossPmts[Month] << " ErGrossPmts[Month]\n"
+ << Year << " Year\n"
+ << Month << " Month\n"
+ << LMI_FLUSH
+ ;
LMI_ASSERT(materially_equal(GrossPmts[Month], EeGrossPmts[Month] +
ErGrossPmts[Month]));
currency eepmt = currency(0);
@@ -1245,6 +1258,16 @@ void AccountValue::TxAscertainDesiredPayment()
GrossPmts [Month] += erpmt;
}
+ if(!(materially_equal(GrossPmts[Month], EeGrossPmts[Month] +
ErGrossPmts[Month])))
+ warning()
+ << GrossPmts[Month] << " GrossPmts[Month]\n"
+ << EeGrossPmts[Month] + ErGrossPmts[Month] << " EeGrossPmts[Month]
+ ErGrossPmts[Month]\n"
+ << EeGrossPmts[Month] << " EeGrossPmts[Month]\n"
+ << ErGrossPmts[Month] << " ErGrossPmts[Month]\n"
+ << Year << " Year\n"
+ << Month << " Month\n"
+ << LMI_FLUSH
+ ;
LMI_ASSERT(materially_equal(GrossPmts[Month], EeGrossPmts[Month] +
ErGrossPmts[Month]));
LMI_ASSERT(GrossPmts[Month] < 1.0e100);
@@ -1261,6 +1284,16 @@ void AccountValue::TxAscertainDesiredPayment()
GrossPmts [Month] += Dumpin;
}
+ if(!(materially_equal(GrossPmts[Month], EeGrossPmts[Month] +
ErGrossPmts[Month])))
+ warning()
+ << GrossPmts[Month] << " GrossPmts[Month]\n"
+ << EeGrossPmts[Month] + ErGrossPmts[Month] << " EeGrossPmts[Month]
+ ErGrossPmts[Month]\n"
+ << EeGrossPmts[Month] << " EeGrossPmts[Month]\n"
+ << ErGrossPmts[Month] << " ErGrossPmts[Month]\n"
+ << Year << " Year\n"
+ << Month << " Month\n"
+ << LMI_FLUSH
+ ;
LMI_ASSERT(materially_equal(GrossPmts[Month], EeGrossPmts[Month] +
ErGrossPmts[Month]));
}
@@ -1277,6 +1310,16 @@ void AccountValue::TxLimitPayment(double a_maxpmt)
// we shouldn't.
// TODO ?? TAXATION !! Clean this up, and put GPT limit here, on prem net of
WD.
+ if(!(materially_equal(GrossPmts[Month], EeGrossPmts[Month] +
ErGrossPmts[Month])))
+ warning()
+ << GrossPmts[Month] << " GrossPmts[Month]\n"
+ << EeGrossPmts[Month] + ErGrossPmts[Month] << " EeGrossPmts[Month]
+ ErGrossPmts[Month]\n"
+ << EeGrossPmts[Month] << " EeGrossPmts[Month]\n"
+ << ErGrossPmts[Month] << " ErGrossPmts[Month]\n"
+ << Year << " Year\n"
+ << Month << " Month\n"
+ << LMI_FLUSH
+ ;
LMI_ASSERT(materially_equal(GrossPmts[Month], EeGrossPmts[Month] +
ErGrossPmts[Month]));
if(mce_reduce_prem == yare_input_.AvoidMecMethod &&
!Irc7702A_->IsMecAlready())
@@ -1490,6 +1533,7 @@ currency AccountValue::GetPremLoad
;
LMI_ASSERT(0.0 <= sum_of_separate_loads);
+#if 1
double total_load =
target_portion * YearsTotLoadTgt
+ excess_portion * YearsTotLoadExc
@@ -1499,7 +1543,7 @@ currency AccountValue::GetPremLoad
( PremiumTax_->is_tiered()
|| materially_equal(total_load, sum_of_separate_loads)
);
-
+#endif // 0
return currency(round_net_premium()(sum_of_separate_loads));
}
- [lmi-commits] [lmi] valyuta/002 39eb954 36/65: symmetric binary operators, (continued)
- [lmi-commits] [lmi] valyuta/002 39eb954 36/65: symmetric binary operators, Greg Chicares, 2020/09/16
- [lmi-commits] [lmi] valyuta/002 6381b2f 44/65: Throw on overflow, Greg Chicares, 2020/09/16
- [lmi-commits] [lmi] valyuta/002 e0c5136 45/65: improve documentation, Greg Chicares, 2020/09/16
- [lmi-commits] [lmi] valyuta/002 7bac50c 50/65: default-initialize currency, Greg Chicares, 2020/09/16
- [lmi-commits] [lmi] valyuta/002 f7f87b2 42/65: unit test: overflow, Greg Chicares, 2020/09/16
- [lmi-commits] [lmi] valyuta/002 9ea1df7 54/65: further improve preceding commit, Greg Chicares, 2020/09/16
- [lmi-commits] [lmi] valyuta/002 ba43414 61/65: Record 64-bit timings, Greg Chicares, 2020/09/16
- [lmi-commits] [lmi] valyuta/002 fb82290 63/65: Use maximal 64-bit rather than 32-bit integer value, Greg Chicares, 2020/09/16
- [lmi-commits] [lmi] valyuta/002 8fd00bb 34/65: rework operator*(), Greg Chicares, 2020/09/16
- [lmi-commits] [lmi] valyuta/002 bf1943b 03/65: reformat, Greg Chicares, 2020/09/16
- [lmi-commits] [lmi] valyuta/002 7481c2b 09/65: discard--throwaway assertions,
Greg Chicares <=
- [lmi-commits] [lmi] valyuta/002 998fdf5 35/65: operator/(), Greg Chicares, 2020/09/16
- [lmi-commits] [lmi] valyuta/002 c105c78 29/65: Currency: implement binary operator-, Greg Chicares, 2020/09/16
- [lmi-commits] [lmi] valyuta/002 9cf4517 46/65: c(), Greg Chicares, 2020/09/16
- [lmi-commits] [lmi] valyuta/002 9da6616 55/65: Round explicitly in a few more cases, Greg Chicares, 2020/09/16
- [lmi-commits] [lmi] valyuta/002 0e8c429 12/65: rounding, Greg Chicares, 2020/09/16
- [lmi-commits] [lmi] valyuta/002 794727e 22/65: Round when converting from double to currency, Greg Chicares, 2020/09/16
- [lmi-commits] [lmi] valyuta/002 d137177 02/65: Currency, Greg Chicares, 2020/09/16
- [lmi-commits] [lmi] valyuta/002 ba6a8d1 31/65: implement currency comparisons as free functions, Greg Chicares, 2020/09/16
- [lmi-commits] [lmi] valyuta/002 28a5e54 39/65: make data_type public, Greg Chicares, 2020/09/16
- [lmi-commits] [lmi] valyuta/002 e9f5447 30/65: round currency to currency? huh?, Greg Chicares, 2020/09/16