Error message from TF1

Hi
I have a basic question about using TMath and TF1 together. I tried a very simple example.cpp file:

[code]{
gROOT->Reset();
#include “TMath.h”

//check TMath ok
cout << "TMath::Power(2,2) = " << TMath::Power(2,2) << endl;

fa2 = new TF1(“fa2”,“TMath::DiLog(x)”,0,10);
fa2->Draw();

//test = new TF1(“test”,“TMath::Erf(x)”,-2,2);
//test->Draw();
}[/code]

and I get the output:

[code]root [6] .x simple.cpp
TMath::Power(2,2) = 4

*ERROR 30 :
Bad numerical expression : "TMath::DiLog(x)"
Error in TF1::TF1: function: fa2/TMath::DiLog(x) has 0 parameters instead of 1[/code]

what am I doing wrong ?

thanks
Laura

I tried but everything went smooth.

My suggestion: specify your ROOT version and wait for experts… :wink:

Germano

You are probably using an old version.
Move to production version 4.04 or newer

Rene