Subject: [Boost-bugs] [Boost C++ Libraries] #4879: Apparent bugs in ibeta_inv_imp (math::specialfunctions)
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2010-11-22 13:07:36
#4879: Apparent bugs in ibeta_inv_imp (math::specialfunctions)
--------------------------------------------+-------------------------------
Reporter: charles.southey@⦠| Owner: johnmaddock
Type: Bugs | Status: new
Milestone: To Be Determined | Component: math
Version: Boost 1.44.0 | Severity: Problem
Keywords: |
--------------------------------------------+-------------------------------
Hi,
There seem to be a couple of bugs in the above function (which is in
boost\math\special_functions\detail\ibeta_inverse.hpp):
The first is the condition:
'''if((lambda >= 0.2) && (lambda <= 0.8) && (lambda >= 10))'''
This clearly can never evaluate to true (lambda <= 0.8 AND >= 10) - so the
following code block can never be executed. I'm guessing that the third
lambda should be replaced with '''r''' (a parameter defined a couple of
lines higher which could reasonably satisfy the condition) - but I'm not a
mathematician and so this is just a guess.
The second apparent problem is an inconsistency in the handling of the
boolean flag '''invert'''. Initially set to ''false'', in some parts of
the code it is toggled to its complement whenever parameters '''a''' and
'''b''' are swapped (which can happen more than once). However in other
parts of the code it is simply set to ''true''. Again I'm afraid I don't
know enough to be sure that the latter is wrong, but changing all
instances where it is set to ''true'' to instead set it to its complement
fixes a problem I was getting with the Fisher_F distribution which relies
on this function.
Could someone with more understanding than me of what's going here have a
look at these ?
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/4879> 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:04 UTC