[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master cc2835c3 3/5: Fix defect introduced 20170428T
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master cc2835c3 3/5: Fix defect introduced 20170428T1344Z: code != comments |
Date: |
Wed, 18 May 2022 15:54:20 -0400 (EDT) |
branch: master
commit cc2835c3a3085a3c9e44e4f68ac190295a83520e
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>
Fix defect introduced 20170428T1344Z: code != comments
Commit 37188242db519 of 20170428T1344Z changed the code, but failed to
update the accompanying comments.
---
math_functions_test.cpp | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/math_functions_test.cpp b/math_functions_test.cpp
index 1931d623..2cc6d9a4 100644
--- a/math_functions_test.cpp
+++ b/math_functions_test.cpp
@@ -149,13 +149,16 @@ struct i_upper_n_over_n_from_i_T
/// This function isn't a unit test per se. Its purpose is to show
/// how a sample calculation is affected by
-/// exponential versus power method, and
+/// exponential versus power method,
+/// floating-point type (double vs. long double), and
/// hardware precision (on supported platforms).
///
-/// Define f(i,m) = (1+i)^(1/m) - 1, i.e., "i upper m over m".
-/// Let i0 = 0.0004 (forty bp).
-/// Let i1 = f(i0, 365)
-/// Then the number calculated here is f(-i1, 1/365).
+/// All methods and precisions are tested with the same constant input
+/// interest rate, which is declared as 'double', as though it were
+/// read as such from a data file containing the given string-literal.
+/// The intention here is to use exactly the same value in all cases;
+/// using a long double string literal for long double scenarios would
+/// introduce a confounder.
void sample_results()
{