From afb35385bf565d3ddaee50b1da5b664422818934 Mon Sep 17 00:00:00 2001 From: Eugene Brevdo Date: Mon, 28 Dec 2015 17:34:06 -0800 Subject: [PATCH] Change PI* to M_PI* in SpecialFunctions to avoid possible breakage with external DEFINEs. --- Eigen/src/Core/SpecialFunctions.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Eigen/src/Core/SpecialFunctions.h b/Eigen/src/Core/SpecialFunctions.h index 9fff3d74b..a5f9cb62a 100644 --- a/Eigen/src/Core/SpecialFunctions.h +++ b/Eigen/src/Core/SpecialFunctions.h @@ -189,7 +189,7 @@ struct digamma_impl { bool negative; // Some necessary constants - const float PIF = 3.141592653589793238; + const float M_PIF = 3.141592653589793238; const float MAXNUMF = std::numeric_limits::infinity(); const float A[] = { @@ -215,7 +215,7 @@ struct digamma_impl { p += 1.0f; nz = q - p; } - nz = PIF / ::tan(PIF * nz); + nz = M_PIF / ::tan(M_PIF * nz); } else { nz = 0.0f; } @@ -315,7 +315,7 @@ struct digamma_impl { }; const double MAXNUM = std::numeric_limits::infinity(); - const double PI = 3.14159265358979323846; + const double M_PI = 3.14159265358979323846; negative = 0; nz = 0.0; @@ -327,7 +327,7 @@ struct digamma_impl { if (p == q) { return MAXNUM; } - /* Remove the zeros of tan(PI x) + /* Remove the zeros of tan(M_PI x) * by subtracting the nearest integer from x */ nz = q - p; @@ -336,7 +336,7 @@ struct digamma_impl { p += 1.0; nz = q - p; } - nz = PI / ::tan(PI * nz); + nz = M_PI / ::tan(M_PI * nz); } else { nz = 0.0;