lmi-commits
[Top][All Lists]
Advanced

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

[lmi-commits] [lmi] master b52923fa 2/9: Make further use of values know


From: Greg Chicares
Subject: [lmi-commits] [lmi] master b52923fa 2/9: Make further use of values known to be correctly rounded
Date: Sat, 21 May 2022 20:13:51 -0400 (EDT)

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

    Make further use of values known to be correctly rounded
    
    Apparently this value:
    -            (0.0032737397821988642
    was copied from some print statement; this one's better:
    +            (0.0032737397821988637 // Correctly rounded.
    These tests for material equality passed because both values are
    correct to fifteen digits, but the correctly rounded value is the
    preferable touchstone.
---
 math_functions_test.cpp | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/math_functions_test.cpp b/math_functions_test.cpp
index 1658856b..d077a517 100644
--- a/math_functions_test.cpp
+++ b/math_functions_test.cpp
@@ -536,13 +536,13 @@ int test_main(int, char*[])
 
     LMI_TEST
         (materially_equal
-            (0.0032737397821988637 // Not very accurate.
+            (0.0032737397821988637 // Correctly rounded.
             ,i_upper_12_over_12_from_i_naive<double>()(0.04)
             )
         );
     LMI_TEST
         (materially_equal
-            (0.0032737397821988642
+            (0.0032737397821988637 // Correctly rounded.
             ,i_upper_12_over_12_from_i<double>()(0.04)
             )
         );
@@ -550,13 +550,13 @@ int test_main(int, char*[])
     LMI_TEST
         (materially_equal
             (0.04
-            ,i_from_i_upper_12_over_12_naive<double>()(0.0032737397821988642)
+            ,i_from_i_upper_12_over_12_naive<double>()(0.0032737397821988637)
             )
         );
     LMI_TEST
         (materially_equal
             (0.04
-            ,i_from_i_upper_12_over_12<double>()(0.0032737397821988642)
+            ,i_from_i_upper_12_over_12<double>()(0.0032737397821988637)
             )
         );
 



reply via email to

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