Strange behavior in TF1::GetExpFormula()

I’m experiencing strange behavior in TF1::GetExpFormula(). Part of the original expression seems to be lost:

root [0] f = new TF1("test005", "[0]*TMath::Exp([1]*x)"); (class TF1*)0x36eb9f0 root [1] f->GetExpFormula(); (class TString)"TMath::Exp([1]*x)"
I’m missing the first part “[0]*” in the output. Is this a bug?


Running WinXP SP3, Root 5.20 MSVC8.0 debug binnary


The problem has been corrected in trunk (and possibly in 5.23/02).


Hi there,

Another small (?) issue :
If we define f as

TF1* f = new TF1 (“f”,"([0]-[1])([0]-[2])([0]-[3])",1e-2,1e-1)
f->GetExpFormula() returns
with weird extra parentheses (bold case).
A similar behavior occurs with the input formula :
(x-[2]))/(([0]-[1])([0]-[2])))[3])+((((x-[0])(x-[2]))/(([1]-[0])([1]-[2])))[4]) +((((x-[0])(x-[1]))/(([2]-[0])([2]-[1])))[5])"
This of course does not change anything in this case but this is a bit scary…
I’m using Root 5.22/00 under cygwin.
I could not test with the last cygwin release (5.23/04) since the folder is empty !

Thanks, Z