2
0
mirror of https://github.com/boostorg/math.git synced 2026-01-27 07:02:08 +00:00

Changed some variable names to suppress -Wshadow warnings, also fixes #2167.

[SVN r47995]
This commit is contained in:
John Maddock
2008-08-06 08:47:31 +00:00
parent 7d56e18fed
commit 2db92b7a2a
4 changed files with 8 additions and 9 deletions

View File

@@ -113,7 +113,7 @@ namespace boost
// *before* the largest term so that backwards iteration
// is strictly converging.
//
for(int i = k - 1; i >= 0; --i)
for(i = k - 1; i >= 0; --i)
{
T term = poisb * gamb;
sum += term;

View File

@@ -308,8 +308,8 @@ T ibeta_power_terms(T a,
// general case:
T b1 = (x * cgh) / agh;
T b2 = (y * cgh) / bgh;
T l1 = a * log(b1);
T l2 = b * log(b2);
l1 = a * log(b1);
l2 = b * log(b2);
if((l1 >= tools::log_max_value<T>())
|| (l1 <= tools::log_min_value<T>())
|| (l2 >= tools::log_max_value<T>())

View File

@@ -234,10 +234,10 @@ T temme_method_2_ibeta_inverse(T /*a*/, T /*b*/, T z, T r, T theta, const Policy
workspace[0] = s * s;
workspace[1] = s * c;
workspace[2] = (1 - 2 * workspace[0]) / 3;
static const BOOST_MATH_INT_TABLE_TYPE(T, int) co3[] = { 1, -13, 13 };
workspace[3] = tools::evaluate_polynomial(co3, workspace[0], 3) / (36 * s * c);
static const BOOST_MATH_INT_TABLE_TYPE(T, int) co4[] = { 1, 21, -69, 46 };
workspace[4] = tools::evaluate_polynomial(co4, workspace[0], 4) / (270 * workspace[0] * c * c);
static const BOOST_MATH_INT_TABLE_TYPE(T, int) co12[] = { 1, -13, 13 };
workspace[3] = tools::evaluate_polynomial(co12, workspace[0], 3) / (36 * s * c);
static const BOOST_MATH_INT_TABLE_TYPE(T, int) co13[] = { 1, 21, -69, 46 };
workspace[4] = tools::evaluate_polynomial(co13, workspace[0], 4) / (270 * workspace[0] * c * c);
x = tools::evaluate_polynomial(workspace, eta, 5);
#ifdef BOOST_INSTRUMENT
std::cout << "Estimating x with Temme method 2 (small eta): " << x << std::endl;

View File

@@ -253,10 +253,9 @@ T lgamma_imp(T z, const Policy& pol, const L& l, int* sign = 0)
{
// regular evaluation:
T zgh = static_cast<T>(z + L::g() - boost::math::constants::half<T>());
T l = L::lanczos_sum_expG_scaled(z);
result = log(zgh) - 1;
result *= z - 0.5f;
result += log(l);
result += log(L::lanczos_sum_expG_scaled(z));
}
if(sign)