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

From: Rene Brun (Rene.Brun@cern.ch)
Date: Fri May 30 1997 - 18:34:59 MEST


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



This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:26:19 MET