Subject: [Boost-bugs] [Boost C++ Libraries] #7223: ibeta_inv not return 1 correctly when p = 1
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-08-10 13:55:35
#7223: ibeta_inv not return 1 correctly when p = 1
-----------------------------------+----------------------------------------
Reporter: alex.gilday@⦠| Type: Bugs
Status: new | Milestone: To Be Determined
Component: None | Version: Boost 1.51.0
Severity: Problem | Keywords:
-----------------------------------+----------------------------------------
After porting your ibeta_inv function (and EVERYTHING it requires, ~3000
lines) to java as part of my work experience, I tested my port against the
original. I was getting considerably high differences in answers when p =
1 and q is not given. Your code (and my code) defaults q to 1 - p when not
given, so 0 in this case. The top of your code also states:
{{{
if(q == 0)
{
if(py) *py = 0;
return 1;
}
}}}
This does not happen. It does work in my java code but not in your
original. There is a rounding error of some sort in 1 - p (or even in p
alone) that is causing this statement to not evaluate when p is given as 1
and q is not given.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/7223> 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:10 UTC