[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] valyuta/002 2dabfcf 62/65: Try to make something a l
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] valyuta/002 2dabfcf 62/65: Try to make something a little less arcane |
Date: |
Wed, 16 Sep 2020 16:55:23 -0400 (EDT) |
branch: valyuta/002
commit 2dabfcf65ccda3787443b159336d2df18d1e84c7
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>
Try to make something a little less arcane
---
ihs_acctval.cpp | 8 +++++++-
ihs_avmly.cpp | 8 +++++++-
2 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/ihs_acctval.cpp b/ihs_acctval.cpp
index 663a371..e4d3a3d 100644
--- a/ihs_acctval.cpp
+++ b/ihs_acctval.cpp
@@ -611,7 +611,13 @@ void AccountValue::SetInitialValues()
DcvWpCharge = 0.0;
HoneymoonActive = false;
- HoneymoonValue = currency(-std::numeric_limits<int>::max());
// yick
+ // -2147483647 is
+ // -std::numeric_limits<int>::max())
+ // The apparent intention was to choose an implausibly large
+ // negative number that can be negated without the sort of
+ // surprising result seen with INT_MIN, which is -2147483648.
+ // Why that intention makes sense is another matter.
+ HoneymoonValue = currency(-2147483647);
if(mce_gen_curr == GenBasis_)
{
HoneymoonActive = yare_input_.HoneymoonEndorsement;
diff --git a/ihs_avmly.cpp b/ihs_avmly.cpp
index f2367ce..b822e5f 100644
--- a/ihs_avmly.cpp
+++ b/ihs_avmly.cpp
@@ -2057,7 +2057,13 @@ void AccountValue::TxTestHoneymoonForExpiration()
if(HoneymoonValue <= currency() || HoneymoonValue < csv_ignoring_loan)
{
HoneymoonActive = false;
- HoneymoonValue = currency(-std::numeric_limits<int>::max()); // yick
+ // -2147483647 is
+ // -std::numeric_limits<int>::max())
+ // The apparent intention was to choose an implausibly large
+ // negative number that can be negated without the sort of
+ // surprising result seen with INT_MIN, which is -2147483648.
+ // Why that intention makes sense is another matter.
+ HoneymoonValue = currency(-2147483647);
}
}
- [lmi-commits] [lmi] valyuta/002 9cf4517 46/65: c(), (continued)
- [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
- [lmi-commits] [lmi] valyuta/002 90773f3 47/65: currency() rather than currency(0.0), Greg Chicares, 2020/09/16
- [lmi-commits] [lmi] valyuta/002 5f00c5a 43/65: Add a commented-out idea, Greg Chicares, 2020/09/16
- [lmi-commits] [lmi] valyuta/002 2dabfcf 62/65: Try to make something a little less arcane,
Greg Chicares <=
- [lmi-commits] [lmi] valyuta/002 9433c8e 65/65: Discuss timing, and philosophical and political questions, Greg Chicares, 2020/09/16
- [lmi-commits] [lmi] valyuta/002 9bee994 19/65: use currency type, Greg Chicares, 2020/09/16
- [lmi-commits] [lmi] valyuta/002 0bf83a4 18/65: augment, Greg Chicares, 2020/09/16
- [lmi-commits] [lmi] valyuta/002 615a24c 48/65: round.c(), Greg Chicares, 2020/09/16
- [lmi-commits] [lmi] valyuta/002 9a4b91d 51/65: Speed measurements, Greg Chicares, 2020/09/16
- [lmi-commits] [lmi] valyuta/002 49f84a1 60/65: Don't convert type with operator=(), Greg Chicares, 2020/09/16
- [lmi-commits] [lmi] valyuta/002 9a9665c 58/65: Record some speed improvements, Greg Chicares, 2020/09/16
- [lmi-commits] [lmi] valyuta/002 ce34d89 04/65: improve, Greg Chicares, 2020/09/16
- [lmi-commits] [lmi] valyuta/002 8331a5c 07/65: avoid catastrophic cancellation, Greg Chicares, 2020/09/16
- [lmi-commits] [lmi] valyuta/002 0856081 20/65: improve currency, Greg Chicares, 2020/09/16