Re: miscalculation in 5.24

From: Philippe Canal <pcanal_at_fnal.gov>
Date: Thu, 25 Mar 2010 16:08:00 -0500


Hi Thiemo,

This is the bug reported at https://savannah.cern.ch/bugs/?53690

You can work around the problem by calling ROOT::Math::inc_gamma(a, x) which is the function used internally by TMath::Gamma(a,x):

TF1 *f = new TF1("f", "ROOT::Math::inc_gamma(2,1) * x")

Cheers,
Philippe.

On 3/25/10 3:48 PM, Thiemo Nagel wrote:
> Thiemo Nagel wrote:
>> root [9] TF1 *f = new TF1("f", "TMath::Gamma(2,1) * x"); f->Eval(0)
>> (const Double_t)2.00000000000000000e+00
>> root [10] TF1 *f = new TF1("f", "x * TMath::Gamma(2,1)"); f->Eval(0)
>> (const Double_t)0.00000000000000000e+00
>
> It can be simplified further:
>
> (new TF1("f", "TMath::Gamma(2,0)"))->Eval(0)
> (const Double_t)2.00000000000000000e+00
>
> Cheers!
>
> Thiemo
>
Received on Thu Mar 25 2010 - 22:08:06 CET

This archive was generated by hypermail 2.2.0 : Mon Mar 29 2010 - 17:50:02 CEST