Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#4583 closed Bugs (fixed)

boost_1_44_beta_pdf, math.pdf

Reported by: ookami1@… Owned by: John Maddock
Milestone: Boost 1.45.0 Component: math
Version: Boost 1.44.0 Severity: Problem
Keywords: Cc:

Description

I'm afraid, both the general formulas for Gamma(a) on p. 224 and ln Gamma(z) on p.227 are not correct. I gave the formula on p.224 a try, using a = 0.5 and l = 0.5. Using the 5th approximant, the limit of the continued fraction can be constrained to the intervall between 58/51 and 394/345. The series evaluated to 5th order yields 253/105 with an error between 0 and 0.003. Entering the upper limits into the formula on p. 224 gives an upper bound of 1.525 for Gamma(0.5), which is known to be sqrt(pi) = 1.77...

IMO the formula should be corrected as follows:

  1. Multiply the series by a factor '1/a' so that it matches the expansion of the lower incomplete gamma function on page 238
  2. The continued fraction in the example above evaluates to something near 1.14, but Gamma(0.5, 0.5)/sqrt(2*e) =

erfc(sqrt(0.5))*sqrt(pi/(2*e)) = 1.311... So it seems the continued fraction incorrect either. The closest I could find in the internet is here: http://functions.wolfram.com/06.06.10.0008.01

But why don't you simply use the formula implemented in the boost sources??

Cheers

Wolf Lammen

BTW, ticket #4518 is not fully served (still a typo present).

Change History (6)

comment:1 by ookami1@…, 12 years ago

It does not suffice to multiply the series by 1/a. It should look like 1/a * Sum(ln / risingFactorial(1+a, n))

Wolf Lammen

comment:2 by ookami1@…, 12 years ago

1/a * Sum(power(l, n) / risingFactorial(1+a, n))

comment:3 by John Maddock, 12 years ago

Resolution: fixed
Status: newclosed

(In [64962]) Correct equations used for generic version of tgamma - equations should now match those used for igamma and the actual code. Fixes #4583.

comment:4 by John Maddock, 12 years ago

Forgive me for being dense, what did I miss in #4518?

Thanks, John.

in reply to:  4 comment:5 by ookami1@…, 12 years ago

Replying to johnmaddock:

Forgive me for being dense, what did I miss in #4518?

Thanks, John.

outside is misspelled

comment:6 by John Maddock, 12 years ago

Got it! Can't see for looking sometimes!

Thanks, John.

Note: See TracTickets for help on using tickets.