[Bug libstdc++/33060] std::tr1::tgamma produces wrong results [for (x-1) in stead of for x]
pcarlini at suse dot de
gcc-bugzilla@gcc.gnu.org
Mon Aug 13 17:00:00 GMT 2007
------- 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
--
pcarlini at suse dot de changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33060
More information about the Gcc-bugs
mailing list