Re: Problem with TGraph::Eval(...)

From: Lorenzo Moneta <Lorenzo.Moneta_at_cern.ch>
Date: Fri, 9 Apr 2010 15:07:47 +0200


Dear Vito,

 this is a known bug of 5.26. It is fixed in the trunk and in patch versions from 5.26a

   Cheers

 Lorenzo
On Apr 9, 2010, at 12:54 PM, Vito Di Benedetto wrote:

>
> Dear ROOT experts,
> I'm using ROOT v5.26.00 on Fedora 8 with gcc 4.2.4
> I found a strange behaviour using TGraph::Eval(...) method.
>
> The code below is to illustrate the problem.
>
> /*===========================
>
> Float_t xVal[10], yVal[10];
>
>
> for(Int_t idx=0;idx<10; idx++){
> xVal[idx]=idx;
> yVal[idx]=idx*idx;
> }
>
> TGraph *grVal = new TGraph(10,xVal,yVal);
>
>
> ===========================*/
>
> The TGraph should draw the parabola y = x^2
>
> So I expect that
>
> grVal->Eval(1.) give me the result "1.", but
>
> grVal->Eval(1.)
> (const Double_t)2.00000000000000000e+00
>
> and so on for all the "xVal" used to build the TGraph I get wrong
> results of the Eval method. But I get right values if I use the Eval
> method for value different that the ones used to build the TGraph.
>
> I don't know if this is an expected behaviour of I'm using the Eval
> method in a wrong way.
>
> Cheers,
> Vito
>
Received on Fri Apr 09 2010 - 15:08:24 CEST

This archive was generated by hypermail 2.2.0 : Fri Apr 09 2010 - 23:50:01 CEST