[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master 2f1cecc 8/8: Explicitly qualify std::fabs()
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master 2f1cecc 8/8: Explicitly qualify std::fabs() |
Date: |
Mon, 24 Apr 2017 16:43:52 -0400 (EDT) |
branch: master
commit 2f1ceccc32f0faa5a78045d7ae2b182f01f1ce9f
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>
Explicitly qualify std::fabs()
---
commutation_functions_test.cpp | 28 ++++++++++++++--------------
1 file changed, 14 insertions(+), 14 deletions(-)
diff --git a/commutation_functions_test.cpp b/commutation_functions_test.cpp
index 4493d8d..4320a43 100644
--- a/commutation_functions_test.cpp
+++ b/commutation_functions_test.cpp
@@ -180,8 +180,8 @@ void TestEckleyTable2()
double worst_discrepancy = 0.0;
for(unsigned int j = 0; j < coi.size(); j++)
{
- double d0 = fabs(nsp [j] - Ax[j]);
- double d1 = fabs(annuity[j] - ax[j]);
+ double d0 = std::fabs(nsp [j] - Ax[j]);
+ double d1 = std::fabs(annuity[j] - ax[j]);
worst_discrepancy = std::max(worst_discrepancy, d0);
worst_discrepancy = std::max(worst_discrepancy, d1);
if
@@ -215,8 +215,8 @@ void TestEckleyTable2()
double worst_discrepancy = 0.0;
for(unsigned int j = 0; j < coi.size(); j++)
{
- double d0 = fabs(premium[j] - Px[j] * .001);
- double d1 = fabs(reserve[j] - Vx[j] * .001);
+ double d0 = std::fabs(premium[j] - Px[j] * .001);
+ double d1 = std::fabs(reserve[j] - Vx[j] * .001);
worst_discrepancy = std::max(worst_discrepancy, d0);
worst_discrepancy = std::max(worst_discrepancy, d1);
if
@@ -302,8 +302,8 @@ void TestEckleyTables3and4()
double worst_discrepancy = 0.0;
for(unsigned int j = 0; j < coi.size(); j++)
{
- double d0 = fabs(premium[j] - Px[j] * .001);
- double d1 = fabs(reserve[j] - Vx[j] * .001);
+ double d0 = std::fabs(premium[j] - Px[j] * .001);
+ double d1 = std::fabs(reserve[j] - Vx[j] * .001);
worst_discrepancy = std::max(worst_discrepancy, d0);
worst_discrepancy = std::max(worst_discrepancy, d1);
if
@@ -385,9 +385,9 @@ void TestEckleyTable5()
double worst_discrepancy = 0.0;
for(unsigned int j = 0; j < coi.size(); j++)
{
- double d0 = fabs(CF.aD()[j] - Dx [j]);
- double d1 = fabs(CF.kD()[j] / 12.0 - Dx12[j]);
- double d2 = fabs(CF.kC()[j] - Cx12[j]);
+ double d0 = std::fabs(CF.aD()[j] - Dx [j]);
+ double d1 = std::fabs(CF.kD()[j] / 12.0 - Dx12[j]);
+ double d2 = std::fabs(CF.kC()[j] - Cx12[j]);
worst_discrepancy = std::max(worst_discrepancy, d0);
worst_discrepancy = std::max(worst_discrepancy, d1);
worst_discrepancy = std::max(worst_discrepancy, d2);
@@ -535,10 +535,10 @@ void Test_1954_1958_IET_3pct()
double worst_discrepancy = 0.0;
for(unsigned int j = 0; j < q.size(); j++)
{
- double d0 = fabs(Dx[0] * CF.D()[j] - Dx[j]);
- double d1 = fabs(Dx[0] * CF.N()[j] - Nx[j]);
- double d2 = fabs(Dx[0] * CF.C()[j] - Cx[j]);
- double d3 = fabs(Dx[0] * CF.M()[j] - Mx[j]);
+ double d0 = std::fabs(Dx[0] * CF.D()[j] - Dx[j]);
+ double d1 = std::fabs(Dx[0] * CF.N()[j] - Nx[j]);
+ double d2 = std::fabs(Dx[0] * CF.C()[j] - Cx[j]);
+ double d3 = std::fabs(Dx[0] * CF.M()[j] - Mx[j]);
worst_discrepancy = std::max(worst_discrepancy, d0);
worst_discrepancy = std::max(worst_discrepancy, d1);
worst_discrepancy = std::max(worst_discrepancy, d2);
@@ -655,7 +655,7 @@ void Test_1980_CSO_Male_ANB()
double worst_discrepancy = 0.0;
for(unsigned int j = 0; j < q.size(); j++)
{
- double d0 = fabs(reserve[j] - Vx[j]);
+ double d0 = std::fabs(reserve[j] - Vx[j]);
worst_discrepancy = std::max(worst_discrepancy, d0);
if
( tolerance < d0
- [lmi-commits] [lmi] master updated (29808d8 -> 2f1cecc), Greg Chicares, 2017/04/24
- [lmi-commits] [lmi] master 27584b1 1/8: Use is_signed to differentiate between signed and unsigned, Greg Chicares, 2017/04/24
- [lmi-commits] [lmi] master 895c823 3/8: Do not make variable initialized with ldexp() constexpr, Greg Chicares, 2017/04/24
- [lmi-commits] [lmi] master b5fe551 4/8: Write 'const' after the type it modifies, Greg Chicares, 2017/04/24
- [lmi-commits] [lmi] master a9c5ed5 7/8: Resolve a marked defect [389], Greg Chicares, 2017/04/24
- [lmi-commits] [lmi] master 6327528 6/8: Use C++11 overloads for C99 <math.h> functions, Greg Chicares, 2017/04/24
- [lmi-commits] [lmi] master 461c143 2/8: Replace boost::numeric_cast with bourn_cast, Greg Chicares, 2017/04/24
- [lmi-commits] [lmi] master dea45f1 5/8: Avoid 'static constexpr' locals, Greg Chicares, 2017/04/24
- [lmi-commits] [lmi] master 2f1cecc 8/8: Explicitly qualify std::fabs(),
Greg Chicares <=