This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libstdc++/33060] std::tr1::tgamma produces wrong results [for (x-1) in stead of for x]



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]