Re: x**2

Rene Brun (Rene.Brun@cern.ch)
Fri, 30 May 1997 17:44:14 +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 "*"

The first statement using TFormula is OK. x**2 is recognized
as a valid expression by the Root formula compiler. Note that this is
illegal in C++. Use x^2 or x*x

The second statement using TF1 contains an illegal syntax.
What is "x2" ?
May be you meant x**2 or x^2 ?

Rene Brun