#4583 closed Bugs (fixed)
boost_1_44_beta_pdf, math.pdf
Reported by: | 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:
- Multiply the series by a factor '1/a' so that it matches the expansion of the lower incomplete gamma function on page 238
- 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 , 12 years ago
comment:3 by , 12 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
follow-up: 5 comment:4 by , 12 years ago
Forgive me for being dense, what did I miss in #4518?
Thanks, John.
comment:5 by , 12 years ago
Replying to johnmaddock:
Forgive me for being dense, what did I miss in #4518?
Thanks, John.
outside is misspelled
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