[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master 699308ab 01/11: Improve documentation
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master 699308ab 01/11: Improve documentation |
Date: |
Thu, 26 May 2022 18:14:24 -0400 (EDT) |
branch: master
commit 699308ab676603b70d30211a1b4f89afc76485ad
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>
Improve documentation
Don't refer to std::expm1() and std::log1p() in comments within files
that don't use them directly, lest those comments become misleading
when those functions in namespace std are replaced with implementations
in namespace lmi.
---
interest_rates.cpp | 4 ++--
mortality_rates_test.cpp | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/interest_rates.cpp b/interest_rates.cpp
index e9d357cd..6e781601 100644
--- a/interest_rates.cpp
+++ b/interest_rates.cpp
@@ -91,8 +91,8 @@ namespace
// For the annual-effective method, transformation from annual to
// daily and back again by naive methods would lose considerable
// precision even when the spread and fee are zero, because i is
-// small relative to (1 + i). That is why std::expm1() and
-// std::log1p() are used instead of std::pow().
+// small relative to (1 + i); therefore, i_upper_12_over_12_from_i<>()
+// is used instead of std::pow().
//
// If both spread and fee are zero, then the net rate should exactly
// equal the gross rate. However, those two rates would differ
diff --git a/mortality_rates_test.cpp b/mortality_rates_test.cpp
index d8392228..bdbe723b 100644
--- a/mortality_rates_test.cpp
+++ b/mortality_rates_test.cpp
@@ -58,7 +58,7 @@ std::vector<double> annual_rates()
/// qm = 1 - (1-q)^(1/12)
/// qm = qm / (1-qm)
/// diverges even in the tenth significant digit. Values given here
-/// use std::expm1() and std::log1p() for better accuracy.
+/// were generated using coi_rate_from_q<>() for better accuracy.
std::vector<double> monthly_rates()
{
- [lmi-commits] [lmi] master updated (47f54ead -> 77cc4d65), Greg Chicares, 2022/05/26
- [lmi-commits] [lmi] master 1b9395f2 03/11: Improve documentation, Greg Chicares, 2022/05/26
- [lmi-commits] [lmi] master 699308ab 01/11: Improve documentation,
Greg Chicares <=
- [lmi-commits] [lmi] master 086ce6b3 06/11: Fix a probable defect introduced 20210314T1905Z, Greg Chicares, 2022/05/26
- [lmi-commits] [lmi] master 284efedf 08/11: For immediate reversion: binary exponentiation, Greg Chicares, 2022/05/26
- [lmi-commits] [lmi] master f920e584 10/11: Improve documentation, Greg Chicares, 2022/05/26
- [lmi-commits] [lmi] master 43bbe463 05/11: Use lmi::expm1() and lmi::log1p() in a unit-test function, Greg Chicares, 2022/05/26
- [lmi-commits] [lmi] master 2c0ec871 07/11: Use lmi rather than std functions, Greg Chicares, 2022/05/26
- [lmi-commits] [lmi] master b1b2ed4f 09/11: Revert "For immediate reversion: binary exponentiation", Greg Chicares, 2022/05/26
- [lmi-commits] [lmi] master b6752650 02/11: Improve documentation, Greg Chicares, 2022/05/26
- [lmi-commits] [lmi] master a110f9a0 04/11: Write fdlibm forwarding functions out of line, Greg Chicares, 2022/05/26
- [lmi-commits] [lmi] master 77cc4d65 11/11: Prefer nonstd::power() to std::pow() in a particular case, Greg Chicares, 2022/05/26