[Boost-bugs] [Boost C++ Libraries] #5433: beta function: when b<epsilon return tgamma(b)?

Subject: [Boost-bugs] [Boost C++ Libraries] #5433: beta function: when b<epsilon return tgamma(b)?
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2011-04-06 18:29:31


#5433: beta function: when b<epsilon return tgamma(b)?
----------------------------------------------+-----------------------------
 Reporter: Eric Butter <egbutter@…> | Owner: johnmaddock
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: math
  Version: Boost 1.47.0 | Severity: Problem
 Keywords: |
----------------------------------------------+-----------------------------
 In the beta.hpp header for the beta function (i.e., *not* the beta
 distribution) around line 131, you have:

    if((c == a) && (b < tools::epsilon<T>()))
       return boost::math::tgamma(b, pol);
    else if((c == b) && (a < tools::epsilon<T>()))
       return boost::math::tgamma(a, pol);

 Don't you actually want if b<epsilon, tgamma(a)? beta(a,b) reduces to
 (approximately) gamma(a)b^-a for a>>b, which seems like the case for which
 you are trying to account?

 Cheers,

 Eric

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/5433>
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:06 UTC