I need an accurate implementation (for use in C/C++) of the logarithm of the incomplete Beta function:
$$\log \mathrm{B}(x,y;\alpha,\beta) = \log \int_x^y t^{\alpha-1}(1-t)^{\beta-1}\mathrm{d}t$$
with domain $\alpha,\beta>0$, $0\le x\le y \le 1$. I need this to avoid overflows with very large values of the incomplete Beta function.
Boost and GSL provide direct implementations of $\mathrm{B}(x,y;\alpha,\beta)$ or its regularized version. This won't work for me, because from these there's no way to get the value of $\log \mathrm{B}(x,y;\alpha,\beta)$ without going through the large values I am trying to avoid (or at least I don't know how).
Any advice?
Update: I found that R
has an implementation of the logarithm of the incomplete Beta function (see https://stat.ethz.ch/R-manual/R-patched/library/stats/html/Beta.html). Can I use this from C++? Will it be as fast as native C code?