The following seems very strange:> lgamma(-0.04)[1] 3.243307> gamma(-0.04)[1] -25.61830 Jim -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
> From: james.lindsey@luc.ac.be > Date: Wed, 4 Oct 2000 13:59:14 +0200 (MET DST) > > The following seems very strange: > > lgamma(-0.04) > [1] 3.243307 > > gamma(-0.04) > [1] -25.61830 > JimIt is as documented, though: ?lgamma gives The functions `gamma' and `lgamma' return the gamma function Gamma(x) and the natural logarithm of the absolute value of the ^^^^^^^^^^^^^^^^^ gamma function. and log(25.61830) = 3.243307. It's not S-compatible, I grant. -- Brian D. Ripley, ripley@stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272860 (secr) Oxford OX1 3TG, UK Fax: +44 1865 272595 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
>>>>> james lindsey writes:> The following seems very strange: >> lgamma(-0.04) > [1] 3.243307 >> gamma(-0.04) > [1] -25.61830I 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._