From Kurt.Hornik@ci.tuwien.ac.at  Wed Oct  4 13:16:28 2000
From: Kurt.Hornik@ci.tuwien.ac.at (Kurt Hornik)
Date: Wed, 4 Oct 2000 14:16:28 +0200 (CEST)
Subject: [Rd] gamma and lgamma functions (PR#684)
In-Reply-To: <200010041159.NAA13214@pubhealth.ku.dk>
References: <200010041159.NAA13214@pubhealth.ku.dk>
Message-ID: <14811.8092.895797.680324@mithrandir.hornik.net>

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


[Rd] gamma and lgamma functions (PR#684)
Kurt Hornik