Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r85966 - trunk/boost/math/special_functions/detail
From: john_at_[hidden]
Date: 2013-09-26 14:32:56


Author: johnmaddock
Date: 2013-09-26 14:32:55 EDT (Thu, 26 Sep 2013)
New Revision: 85966
URL: http://svn.boost.org/trac/boost/changeset/85966

Log:
Fix use of student's t approximation to inverse so we don't get 1 and 0 as the result.

Text files modified:
   trunk/boost/math/special_functions/detail/ibeta_inverse.hpp | 2 +-
   1 files changed, 1 insertions(+), 1 deletions(-)

Modified: trunk/boost/math/special_functions/detail/ibeta_inverse.hpp
==============================================================================
--- trunk/boost/math/special_functions/detail/ibeta_inverse.hpp Thu Sep 26 14:31:28 2013 (r85965)
+++ trunk/boost/math/special_functions/detail/ibeta_inverse.hpp 2013-09-26 14:32:55 EDT (Thu, 26 Sep 2013) (r85966)
@@ -525,7 +525,7 @@
    //
    // 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:


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