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?

Petr

Running WinXP SP3, Root 5.20 MSVC8.0 debug binnary

Hi,

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

Cheers,
Philippe.

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
([0]-[1])b[/b]
with weird extra parentheses (bold case).
A similar behavior occurs with the input formula :
"((((x-[1])
(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])"
(((((x-[1])(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 ftp://root.cern.ch/root/cygwin/ is empty !

Thanks, Z