From c11e570ec022bd334c883df26840cc7c48c2a1f8 Mon Sep 17 00:00:00 2001 From: John Maddock Date: Thu, 26 Sep 2013 18:32:55 +0000 Subject: [PATCH] Fix use of student's t approximation to inverse so we don't get 1 and 0 as the result. [SVN r85966] --- include/boost/math/special_functions/detail/ibeta_inverse.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/boost/math/special_functions/detail/ibeta_inverse.hpp b/include/boost/math/special_functions/detail/ibeta_inverse.hpp index 89ed3fc76..0c328e36e 100644 --- a/include/boost/math/special_functions/detail/ibeta_inverse.hpp +++ b/include/boost/math/special_functions/detail/ibeta_inverse.hpp @@ -525,7 +525,7 @@ T ibeta_inv_imp(T a, T b, T p, T q, const Policy& pol, T* py) // // Select calculation method for the initial estimate: // - if((b == 0.5f) && (a >= 0.5f)) + if((b == 0.5f) && (a >= 0.5f) && (p != 1)) { // // We have a Student's T distribution: