Use of digamma function in root


For my project I have to fit a gamma distribution through my data points. This fit works well, but I want to extract data points from this fit with error bars. For these error bars I use partial derivatives w.r.t. to each parameter of my gamma distribution. Well here arises the problem…
The derivative of the gamma distribution yields a digamma function, which I can’t find in the ROOT documentation. Is there another way to implement this function into ROOT?

Remco de Smit

The digamma funciton is not available directly in ROOT. We could provide it if you think is needed.
However, you can use it from GSL available through MathMore., that is an optional library of ROOT.
From the prompt you just need to do:

#include "gsl/gsl_sf_psi.h"
cout << gsl_sf_psi(1.) << endl;



1 Like