2
0
mirror of https://github.com/boostorg/math.git synced 2026-01-28 19:32:08 +00:00

Don't pass potential expression templates to make_tuple as it confuses gcc-4.4.x.

[SVN r81546]
This commit is contained in:
John Maddock
2012-11-26 10:23:17 +00:00
parent 3822a35591
commit fc112cd24f
3 changed files with 4 additions and 4 deletions

View File

@@ -282,7 +282,7 @@ struct erf_roots
BOOST_MATH_STD_USING
T derivative = sign * (2 / sqrt(constants::pi<T>())) * exp(-(guess * guess));
T derivative2 = -2 * guess * derivative;
return boost::math::make_tuple(((sign > 0) ? boost::math::erf(guess, Policy()) : boost::math::erfc(guess, Policy())) - target, derivative, derivative2);
return boost::math::make_tuple(((sign > 0) ? boost::math::erf(guess, Policy()) : static_cast<T>(boost::math::erfc(guess, Policy())) - target), derivative, derivative2);
}
erf_roots(T z, int s) : target(z), sign(s) {}
private:

View File

@@ -35,12 +35,12 @@ struct temme_root_finder
if(y == 0)
{
T big = tools::max_value<T>() / 4;
return boost::math::make_tuple(-big, -big);
return boost::math::make_tuple(static_cast<T>(-big), static_cast<T>(-big));
}
if(x == 0)
{
T big = tools::max_value<T>() / 4;
return boost::math::make_tuple(-big, big);
return boost::math::make_tuple(static_cast<T>(-big), big);
}
T f = log(x) + a * log(y) + t;
T f1 = (1 / x) - (a / (y));

View File

@@ -378,7 +378,7 @@ struct gamma_p_inverse_func
f2 = -f2;
}
return boost::math::make_tuple(f - p, f1, f2);
return boost::math::make_tuple(static_cast<T>(f - p), f1, f2);
}
private:
T a, p;