[Boost-bugs] [Boost C++ Libraries] #5015: ibeta_inv_imp handling cases when (q == 0 or p == 0) or (a == 1 and b == 1)

Subject: [Boost-bugs] [Boost C++ Libraries] #5015: ibeta_inv_imp handling cases when (q == 0 or p == 0) or (a == 1 and b == 1)
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2010-12-23 02:05:40


#5015: ibeta_inv_imp handling cases when (q == 0 or p == 0) or (a == 1 and b == 1)
--------------------------------------------+-------------------------------
 Reporter: agribov_no_s_p_a_m@… | Owner: johnmaddock
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: math
  Version: Boost 1.45.0 | Severity: Problem
 Keywords: inverse incomplete beta |
--------------------------------------------+-------------------------------
 File: boost\math\special_functions\detail\ibeta_inverse.hpp
 Function: T ibeta_inv_imp(T a, T b, T p, T q, const Policy& pol, T* py)
 Line: 480-503.
 When ((q or p is equal to 0) or (a and b equal to 1))
 and invert is true the return value is not reverted.
 It can be fixed by placing these checks before
    if(a == 0.5f)
    {
       std::swap(a, b);
       std::swap(p, q);
       invert = !invert;
    }

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/5015>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:05 UTC