R-alpha: R-0.15alpha gamma function bug

Rob Creecy (rcreecy@census.gov)
Tue, 14 Jan 1997 14:03:28 -0500


Message-Id: <32DBD880.4DC0@census.gov>
Date: Tue, 14 Jan 1997 14:03:28 -0500
From: Rob Creecy <rcreecy@census.gov>
To: r-testers@stat.math.ethz.ch
Subject: R-alpha: R-0.15alpha gamma function bug

Has anyone else seen this?

Version R-0.15alpha, compiled using cc on Solaris 2.3

When first calling
>gamma(5)
[1] 0
>gamma(5)
[1] 24

Apparently the variable

 int signgam = 0; line 22 in lgamma.c
should be               
 int signgam = 1;

This seems to fix the problem.

Rob Creecy
Census Bureau
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
r-testers mailing list -- For info or help, send "info" or "help",
To [un]subscribe, send "[un]subscribe"
(in the "body", not the subject !)  To: r-testers-request@stat.math.ethz.ch
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-