[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master b6752650 02/11: Improve documentation
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master b6752650 02/11: Improve documentation |
Date: |
Thu, 26 May 2022 18:14:24 -0400 (EDT) |
branch: master
commit b675265040c1a79345cf0fc402917073ab2795ad
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>
Improve documentation
Don't refer to std::pow() in comments within files that don't use it
directly, so that `git grep -l '\<std::pow\>'` finds only actual
invocations. In many cases, nonstd::power() or a combination of
expm1() and log1p() is more accurate, and using std::pow() instead is
therefore a defect.
---
interest_rates.cpp | 2 +-
monnaie.hpp | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/interest_rates.cpp b/interest_rates.cpp
index 6e781601..b086d6a9 100644
--- a/interest_rates.cpp
+++ b/interest_rates.cpp
@@ -92,7 +92,7 @@ namespace
// 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); therefore, i_upper_12_over_12_from_i<>()
-// is used instead of std::pow().
+// is used instead of 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/monnaie.hpp b/monnaie.hpp
index 96b783b9..8417694e 100644
--- a/monnaie.hpp
+++ b/monnaie.hpp
@@ -62,7 +62,7 @@ class monnaie
using amount_type = std::int_fast64_t;
static constexpr int cents_digits = 2;
- static constexpr int cents_per_dollar = 100; // std::pow(10, cents_digits)
+ static constexpr int cents_per_dollar = 100; // pow(10, cents_digits)
static constexpr amount_type max_dollars()
{
- [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, 2022/05/26
- [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 <=
- [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