TGraph::Eval() another issue

Hi there,
Evaluating the value of a TGraph at an existing point in linear mode yields a bad result (under Root 5.26).

TGraph *graph = new TGraph (3) ; graph->SetPoint(0, 0.,5.) ; graph->SetPoint(1, 1.,2.) ; graph->SetPoint(2, 2.,0.) ; Double_t x=-1. ; x=1.00 ; printf ("\n eval_lin=%e, eval_spline=%e",graph->Eval(x),graph->Eval(x,0,"S")) ; x=0.99 ; printf ("\n eval_lin=%e, eval_spline=%e",graph->Eval(x),graph->Eval(x,0,"S")) ; x=1.01 ; printf ("\n eval_lin=%e, eval_spline=%e",graph->Eval(x),graph->Eval(x,0,"S")) ;

OUTPUT eval_lin=2.500000e+00, eval_spline=2.000000e+00 !!! eval_lin=2.030000e+00, eval_spline=2.025050e+00 eval_lin=1.980000e+00, eval_spline=1.975050e+00
This specific case should be taken into account to avoid bad surprises.
Cheers,
Z

The unfortunate problem with TGraph::Eval when evaluating a point exactly at one of the original points had been fixed by Lorenzo in the SVN trunk 2 weeks ago.

Rene

Thanks!
Sorry if I’ve missed the corresponding post.
Have a nice day,
Z