Please provide the following information:
ROOT Version (e.g. 6.12/02):
Platform, compiler (e.g. CentOS 7.3, gcc6.2):
ROOT Version: 6.10/00
compiler: gcc (Ubuntu 4.8.5-4ubuntu6) 4.8.5
Hello!
I am having problems to use the gamma function. This is the definition of my TF1:
TF1 *einas = new TF1("einas", "( 7.19*pow(10,-7)*TMath::inc_gamma_c(11.7647, 13.3185*pow( (pow(x,2)-16*x*[0] + 64), 0.085) )/x", -500, 500);
And at some point of the code I am doing the following integral:
einasi[i] = einas->Integral(10, 16);
but I receive the error: TMath::inc_gamma_c is unknown.
However, the definition of this function can be found in tthis link:
ROOT: Special functions
does anyone know why root is not recognizing the function?
Thank you
naikal_mc:
TF1 einas = new TF1(βeinasβ, β( 7.19pow(10,-7)TMath::inc_gamma_c(11.7647, 13.3185pow( (pow(x,2)-16x[0] + 64), 0.085) )/xβ, -500, 500);
Maybe @moneta can give more details, but could you try with:
TF1 einas = new TF1(βeinasβ, "( 7.19pow(10,-7)ROOT::Math::inc_gamma_c(11.7647, 13.3185pow( (pow(x,2)-16x[0] + 64), 0.085) )/x", -500, 500);
7.19pow(10,-7)
is not a valid expression. You probably mean
7.19*pow(10,-7)
Lorenzo
As @bellenot points out, in the original formula, one needs to change TMath
into ROOT::Math
. Also, a β)β is missing right before or right after the final β/xβ, or the very first β(β should be removed.
1 Like
couet
May 8, 2018, 8:44am
5
You can copy/paste this one:
root [0] TF1 *einas = new TF1("einas", "7.19*pow(10,-7)*ROOT::Math::inc_gamma_c(11.7647, 13.3185*pow( (pow(x,2)-16*x*[0] + 64), 0.085) )/x", -500, 500);
root [1]
system
Closed
May 22, 2018, 8:44am
6
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.