Re: x**2 ==>use x*x or x^2

Rene Brun (Rene.Brun@cern.ch)
Fri, 30 May 1997 18:34:59 +0200


Otto Schaile wrote:
>
> Dear roots,
> what do I wrong here:
> * Version 1.00/10 25 April 1997 *
> ....
> root [0] x2=new TFormula("x2","x**2")
> (class TFormula*)0x0
> root [1] xx2=new TF1("xx2","x2",400,1000)
>
> *ERROR 5 :
> Invalid Syntax "*"
>

Apparently TFormula/TF1 accepts the C++ notation extension **
only when the expression is directly given as a parameter, not in the
case it is a reference to an existing function.
The following will work:
Root > x2 = new TFormula("x2","x*x");
Root > xx2 = new TF1("xx2","x2",400,1000);

Rene Brun