lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [lmi] master d8a8b60 3/3: Make an improvement deferred sin


From: Greg Chicares
Subject: [lmi-commits] [lmi] master d8a8b60 3/3: Make an improvement deferred since 20100428T1231Z
Date: Wed, 3 Mar 2021 17:25:14 -0500 (EST)

branch: master
commit d8a8b60a414124a6b0f673da2e6c853cb124b4a4
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>

    Make an improvement deferred since 20100428T1231Z
    
    This improvement was mentioned in commit ec606b9c7577 of 20100428T1231Z
    but deferred because it would have caused many minuscule regressions
    at any point before the immediately preceding commit--but it causes no
    regression now that DCV calculations are performed in whole cents.
    
    Of course, that's not a guaranteed effect of such quantization, just a
    highly probable one.
---
 ihs_basicval.cpp | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/ihs_basicval.cpp b/ihs_basicval.cpp
index 31e2d24..b55cbee 100644
--- a/ihs_basicval.cpp
+++ b/ihs_basicval.cpp
@@ -597,13 +597,7 @@ void BasicValues::SetPermanentInvariants()
 
     database().query_into(DB_NaarDiscount         , DBDiscountRate);
     LMI_ASSERT(!contains(DBDiscountRate, -1.0));
-// This would be more natural:
-//    assign(DBDiscountRate, 1.0 / (1.0 + DBDiscountRate));
-// but we avoid it for the nonce because it causes slight regression errors.
-// 7702 !! Use the more natural (and more accurate) version once DCV
-// has been changed from double to currency.
-    assign(DBDiscountRate, 1.0 + DBDiscountRate);
-    assign(DBDiscountRate, 1.0 / DBDiscountRate);
+    assign(DBDiscountRate, 1.0 / (1.0 + DBDiscountRate));
 
     database().query_into(DB_DynamicMandE         , MandEIsDynamic);
     database().query_into(DB_DynamicSepAcctLoad   , SepAcctLoadIsDynamic);



reply via email to

[Prev in Thread] Current Thread [Next in Thread]