From Ted.Harding at manchester.ac.uk  Mon Mar 30 20:55:38 2009
From: Ted.Harding at manchester.ac.uk ( (Ted Harding))
Date: Mon, 30 Mar 2009 19:55:38 +0100 (BST)
Subject: [Rd] Gamma funtion(s) bug
In-Reply-To: <556e90a80903301140o28caffe2g16717cbf581f2953@mail.gmail.com>
Message-ID: <XFMail.090330195538.Ted.Harding@manchester.ac.uk>

On 30-Mar-09 18:40:03, Kjetil Halvorsen wrote:
> With R 2.8.1 on ubuntu I get:
>> gamma(-1)
> [1] NaN
> Warning message:
> In gamma(-1) : NaNs produced
>> lgamma(-1)
> [1] Inf
> Warning message:
> value out of range in 'lgamma'
> 
> Is'nt the first one right, and the second one (lgamma)
> should also be NaN?
> Kjetil

That is surely correct! Since lim[x->(-1)+] gamma(x) = +Inf,
while lim[x->(-1)-] gamma(x) = -Inf, at gamma(-1) one cannot
choose between +Inf and -Inf, so surely is is NaN.

Ted.

--------------------------------------------------------------------
E-Mail: (Ted Harding) <Ted.Harding at manchester.ac.uk>
Fax-to-email: +44 (0)870 094 0861
Date: 30-Mar-09                                       Time: 19:55:33
------------------------------ XFMail ------------------------------



[Rd] Gamma funtion(s) bug
 (Ted Harding