Opened 12 years ago

Closed 12 years ago

#5015 closed Bugs (fixed)

ibeta_inv_imp handling cases when (q == 0 or p == 0) or (a == 1 and b == 1)

Reported by: agribov_no_s_p_a_m@… Owned by: John Maddock
Milestone: To Be Determined Component: math
Version: Boost 1.45.0 Severity: Problem
Keywords: inverse incomplete beta Cc:

Description

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;

}

Change History (2)

comment:1 by anonymous, 12 years ago

Confirmed, testing fix.

comment:2 by John Maddock, 12 years ago

Resolution: fixed
Status: newclosed

(In [67469]) Fix bug in special-case handling of ibeta_inv. Fix concept test failures with mpfr_class in legendre.hpp and non_central_t.hpp. Fixes #5015.

Note: See TracTickets for help on using tickets.