[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)
)
);
- [lmi-commits] [lmi] master updated (926d9f91 -> 82468e66), Greg Chicares, 2022/05/21
- [lmi-commits] [lmi] master b52923fa 2/9: Make further use of values known to be correctly rounded,
Greg Chicares <=
- [lmi-commits] [lmi] master fdf41a42 4/9: Reorganize unit tests, Greg Chicares, 2022/05/21
- [lmi-commits] [lmi] master 82468e66 9/9: Show architectural context at start of main test function, Greg Chicares, 2022/05/21
- [lmi-commits] [lmi] master e59c42d3 7/9: Rearrange unit-test functions in invocation order, Greg Chicares, 2022/05/21
- [lmi-commits] [lmi] master d393cd47 3/9: Move a block to make an incipient refactoring simpler, Greg Chicares, 2022/05/21
- [lmi-commits] [lmi] master ff833df3 1/9: Verify against independent calculations, Greg Chicares, 2022/05/21
- [lmi-commits] [lmi] master 0c667ac5 5/9: Move an output line, Greg Chicares, 2022/05/21
- [lmi-commits] [lmi] master 3ebab874 8/9: Test fdlibm against C RTL, Greg Chicares, 2022/05/21
- [lmi-commits] [lmi] master 4e300fbc 6/9: Rearrange a unit test's output, Greg Chicares, 2022/05/21