[Rd] gamma and lgamma functions (PR#684)
Kurt Hornik
Kurt.Hornik@ci.tuwien.ac.at
Wed, 4 Oct 2000 14:16:28 +0200 (CEST)
>>>>> james lindsey writes:
> The following seems very strange:
>> lgamma(-0.04)
> [1] 3.243307
>> gamma(-0.04)
> [1] -25.61830
I don't think so:
The functions `gamma' and `lgamma' return the gamma function
Gamma(x) and the natural logarithm of the absolute value of the
gamma function.
Notice the ABSOULUTE VALUE.
R> log(abs(gamma(-0.04)))
[1] 3.243307
-k
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._