|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r66685 - trunk/boost/math/special_functions/detail
From: john_at_[hidden]
Date: 2010-11-22 11:31:44
Author: johnmaddock
Date: 2010-11-22 11:31:42 EST (Mon, 22 Nov 2010)
New Revision: 66685
URL: http://svn.boost.org/trac/boost/changeset/66685
Log:
Fixes #4879.
Text files modified:
trunk/boost/math/special_functions/detail/ibeta_inverse.hpp | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
Modified: trunk/boost/math/special_functions/detail/ibeta_inverse.hpp
==============================================================================
--- trunk/boost/math/special_functions/detail/ibeta_inverse.hpp (original)
+++ trunk/boost/math/special_functions/detail/ibeta_inverse.hpp 2010-11-22 11:31:42 EST (Mon, 22 Nov 2010)
@@ -477,7 +477,7 @@
// Student's T with b = 0.5 gets handled as a special case, swap
// around if the arguments are in the "wrong" order:
//
- if(a == 0.5f)
+ if((a == 0.5f) && (b >= 0.5f))
{
std::swap(a, b);
std::swap(p, q);
@@ -541,7 +541,7 @@
T r = a + b;
T theta = asin(sqrt(a / r));
T lambda = minv / r;
- if((lambda >= 0.2) && (lambda <= 0.8) && (lambda >= 10))
+ if((lambda >= 0.2) && (lambda <= 0.8) && (r >= 10))
{
//
// The second error function case is the next cheapest
@@ -620,7 +620,7 @@
{
std::swap(a, b);
std::swap(p, q);
- invert = true;
+ invert = !invert;
xs = 1 - xs;
}
T xg = pow(a * p * boost::math::beta(a, b, pol), 1/a);
@@ -652,7 +652,7 @@
std::swap(a, b);
std::swap(p, q);
std::swap(xs, xs2);
- invert = true;
+ invert = !invert;
}
//
// Estimate x and y, using expm1 to get a good estimate
@@ -716,7 +716,7 @@
{
std::swap(a, b);
std::swap(p, q);
- invert = true;
+ invert = !invert;
}
if(pow(p, 1/a) < 0.5)
{
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk