TF1 drawing issue (pow(cos))

Hi there,
Raising a cosine to a non integer power causes a drawing issue… (at least with Root 5.26/00)

Double_t xmin=0., xmax=TMath::Pi() ; TF1 *fct_cos2 = new TF1 ("fct_cos2" , "TMath::Power( TMath::Cos(x), 2. )",xmin,xmax) ; TF1 *fct_sin2 = new TF1 ("fct_sin2" , "TMath::Power( TMath::Sin(x), 2. )",xmin,xmax) ; TF1 *fct_cos2x = new TF1 ("fct_cos2x", "TMath::Power( TMath::Cos(x), 2.3 )",xmin,xmax) ; TF1 *fct_sin2x = new TF1 ("fct_sin2x", "TMath::Power( TMath::Sin(x), 2.3 )",xmin,xmax) ; printf ("\n%e\n",fct_cos2x->Eval(1.)) ; // ok TCanvas *canvas = new TCanvas () ; canvas->Divide(2,2) ; canvas->cd(1) ; fct_cos2 ->Draw() ; canvas->cd(3) ; fct_cos2x->Draw() ; // Warning in <TPad::ResizePad>: Inf/NaN propagated to the pad. Check drawn objects. canvas->cd(2) ; fct_sin2 ->Draw() ; canvas->cd(4) ; fct_sin2x->Draw() ;Any clue?
Thx, Z

HI,

In the range (0 : Pi), cos takes a negative value,
but fractional powers are defined for positive number only,
therefore that error occurs.

'Cause it corresponds to a nth root… ok.
Thx Rafayel.
Z