------- Comment #3 from fpbeekhof at gmail dot com  2007-08-14 08:11 -------
Subject: Re:  std::tr1::tgamma produces wrong results [for
 (x-1) in stead of for x]


OOPS!

Thank you! And sorry for wasting your time...


pcarlini at suse dot de wrote:
> ------- Comment #2 from pcarlini at suse dot de  2007-08-13 17:00 -------
> (In reply to comment #0)
>> The implementation of std::tr1::tgamma looks wrong to me.
>>
>> Keep in mind that the gamma function is equal to the factorial function for
>> integer values.
> 
> Now I see: this statement is incorrect, and that's why we don't have an issue.
> The real relationship is:
> 
>   gamma(m) == (m - 1)!
> 
> As you can check here, for example:
> 
>   http://en.wikipedia.org/wiki/Gamma_function
>   http://mathworld.wolfram.com/GammaFunction.html
> 
> 


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33060

Reply via email to