Thanks! It worked. -----Original Message----- From: Sebastien Greder [mailto:greder@in2p3.fr] Sent: Tue 7/13/2004 2:12 PM To: Bernd Reinhold Cc: roottalk@pcroot.cern.ch Subject: Re: [ROOT] Factorial(10) gives bad-numerical-expression-error Hello Bernd, replace Factorial by TMath::Factorial and power by Tmath::Power and it should work. cheers, sebastien On Tue, 13 Jul 2004, Bernd Reinhold wrote: > Hi! > > binomial1 = new TF1("binomial1", "[1]*(Factorial(10))/(Factorial(x))/(Factorial(10-x))*power([0],x)* > power(1-[0],10-x)" > > I get the following error message, when typing the function above in CINT > > *ERROR 30 : > Bad numerical expression : "Factorial(10)" > Error in <TF1::TF1>: function: binomial1/[1]*(Factorial(10))/(Factorial(x))/(Factorial(10-x))* > power([0],x)*power(1-[0],10-x) has 0 parameters instead of 1 > > And can I put some constraints on x by defining it as 'Int_t x;' before I define the function? Does TF1 recognize the x in its formula as the x defined before as Int_t? > > Thank you, Bernd. > > --------------------------------------------------------------------- | Sebastien GREDER tel : +33 (0)3 88 10 63 54 | | D0 Strasbourg, | | Institut de Recherches Subatomiques fax : +33 (0)3 88 10 62 34 | | 23, rue du loess - BP 28 secr : +33 (0)3 88 10 66 40 | | F-67037- STRASBOURG cedex 2 e-mail : greder@in2p3.fr, | | greder@fnal.gov | ---------------------------------------------------------------------
This archive was generated by hypermail 2b29 : Sun Jan 02 2005 - 05:50:08 MET