Re: [ROOT] tiny Bug in root

From: Kurt Rinnert (rinnert@ekp.physik.uni-karlsruhe.de)
Date: Fri Nov 30 2001 - 12:10:22 MET


Hi,

there is a way to obtain the desired behaviour by defining the function
in the proper way:

root [0] TF1* f1 = new TF1("f1","(sin(x)/x)*(x>0.0)+ 1.0*(x==0.0)",0,10)
root [1] f->Eval(0)
(Double_t)1.00000000000000000e+00
root [3] f->Eval(1.0)
(Double_t)8.41470984807896505e-01

I'm not sure whether you run into problems when doing a fit with this, though.

best,
	Kurt
 
> > Dear ROOTERs,
> > 
> > I have a test on the following code:
> > 
> > TF1 f1("func1", "sin(x)/x", 0, 10)
> > f1.Eval(0),
> > 
> > 
> > It gives the value 0 instead of 1.

-- 
Kurt Rinnert, University of Karlsruhe (TH) - Faculty for Physics



This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:51:10 MET