[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-gsl] Bug in normalized incomplete Gamma function/upper tail Gamma d
From: |
Brian Williams |
Subject: |
[Bug-gsl] Bug in normalized incomplete Gamma function/upper tail Gamma dist'n probs. |
Date: |
Tue, 06 Sep 2005 09:20:25 -0600 |
Version number of GSL: 1.6
Hardware & OS: Dell PowerEdge 6850, Intel Xeon processor at 3.0GHz/8MB
Cache, Linux 2.4.21-27.EL
Compiler: gcc 3.2.3 20030502 (Red Hat Linux 3.2.3-52)
gcc -o test.out -Wall -lgsl -lgslcblas -lm test.c
Description: For some inputs, answers are returned that are incorrect.
Here is a test program (test.c):
#include <stdio.h>
#include <gsl/gsl_sf_gamma.h>
#include <gsl/gsl_cdf.h>
int main (void)
{
gsl_sf_result r;
gsl_sf_gamma_inc_Q_e (1008.02,5.0039*168.156,&r);
printf("r = %g %g\n", r.val, r.err);
printf("sf = %g\n", gsl_cdf_gamma_Q(168.156,1008.02,1.0/5.0039));
return(1);
}
Here is the output:
r = -1.37412e-08 2.0289e-22
sf = -1.37412e-08
The output calculated from R version 2.1.1:
sf = 1
Brian
- [Bug-gsl] Bug in normalized incomplete Gamma function/upper tail Gamma dist'n probs.,
Brian Williams <=