lmi-commits
[Top][All Lists]
Advanced

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

[lmi-commits] [4860] Fix defect introduced 20070221T0307Z


From: Greg Chicares
Subject: [lmi-commits] [4860] Fix defect introduced 20070221T0307Z
Date: Sat, 24 Apr 2010 23:50:17 +0000

Revision: 4860
          http://svn.sv.gnu.org/viewvc/?view=rev&root=lmi&revision=4860
Author:   chicares
Date:     2010-04-24 23:50:16 +0000 (Sat, 24 Apr 2010)
Log Message:
-----------
Fix defect introduced 20070221T0307Z

Modified Paths:
--------------
    lmi/trunk/ChangeLog
    lmi/trunk/rounding_rules.cpp

Modified: lmi/trunk/ChangeLog
===================================================================
--- lmi/trunk/ChangeLog 2010-04-24 22:49:15 UTC (rev 4859)
+++ lmi/trunk/ChangeLog 2010-04-24 23:50:16 UTC (rev 4860)
@@ -25024,3 +25024,27 @@
   rounding_rules.hpp
 Refactor, merging two classes into one.
 
+20100424T0107Z <address@hidden> [755]
+
+  my_rnd.cpp
+Fix defect introduced 20050409T1620Z, from an original file predating
+the lmi epoch.
+
+20100424T0108Z <address@hidden> [755]
+
+  my_prod.cpp
+Make 'sample' files independent of proprietary products.
+
+20100424T2249Z <address@hidden> [755]
+
+  rounding_rules.cpp
+Fix defect introduced 20070221T0307Z. See (A) here:
+  http://lists.nongnu.org/archive/html/lmi/2010-04/msg00040.html
+
+20100424T2350Z <address@hidden> [755]
+
+  rounding_rules.cpp
+  rounding_rules.hpp
+Fix defect introduced 20070221T0307Z. See (B) here:
+  http://lists.nongnu.org/archive/html/lmi/2010-04/msg00040.html
+

Modified: lmi/trunk/rounding_rules.cpp
===================================================================
--- lmi/trunk/rounding_rules.cpp        2010-04-24 22:49:15 UTC (rev 4859)
+++ lmi/trunk/rounding_rules.cpp        2010-04-24 23:50:16 UTC (rev 4860)
@@ -29,6 +29,7 @@
 #include "rounding_rules.hpp"
 
 #include "alert.hpp"
+#include "assert_lmi.hpp"
 #include "data_directory.hpp"
 #include "mc_enum.hpp"
 #include "mc_enum_types.hpp"
@@ -88,11 +89,11 @@
 rounding_rules::rounding_rules(std::string const& filename)
 {
     Read(filename);
-    round_min_specamt_        = round_to<double>(round_specamt_      
.decimals(), r_upward);
-    round_max_specamt_        = round_to<double>(round_specamt_      
.decimals(), r_downward);
-    round_min_premium_        = 
round_to<double>(round_gross_premium_.decimals(), r_upward);
-    round_max_premium_        = 
round_to<double>(round_gross_premium_.decimals(), r_downward);
-    round_interest_rate_7702_ = 
round_to<double>(round_interest_rate_.decimals(), r_upward);
+    LMI_ASSERT(r_not_at_all == round_min_specamt_       .style() || r_upward   
== round_min_specamt_       .style());
+    LMI_ASSERT(r_not_at_all == round_max_specamt_       .style() || r_downward 
== round_max_specamt_       .style());
+    LMI_ASSERT(r_not_at_all == round_min_premium_       .style() || r_upward   
== round_min_premium_       .style());
+    LMI_ASSERT(r_not_at_all == round_max_premium_       .style() || r_downward 
== round_max_premium_       .style());
+    LMI_ASSERT(r_not_at_all == round_interest_rate_7702_.style() || r_upward   
== round_interest_rate_7702_.style());
 }
 
 namespace





reply via email to

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