bugGNU Scientific Library - Bugs: bug #45925, Incomplete Gamma Functions flipped?

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #45925: Incomplete Gamma Functions flipped?

Submitted by:  Patrick Alken <psa>
Submitted on:  Fri 11 Sep 2015 10:07:55 AM UTC  
 
Category: Runtime errorSeverity: 3 - Normal
Operating System: Status: None
Assigned to: NoneOpen/Closed: Open
Release: 

Thu 19 Nov 2015 10:22:06 PM UTC, comment #1:

I've investigated bug #45925 "Incomplete Gamma Functions flipped?" and I believe there is in fact no problem with gsl. The bug author compares the (upper) incomplete gamma function with the function P(a,x) and correctly notes that the values disagree. However the comparison should actually be done with the function Q(a,x) rather than P(a,x), and here the values agree. The definitions for the upper incomplete gamma function and Q(a,x) are contained in the gsl reference document under the section on "Incomplete Gamma Functions". I recommend that no code changes be made and that this bug be closed.

-Bill Maier

Patrick Alken <psa>
Project Administrator
Fri 11 Sep 2015 10:07:55 AM UTC, original submission:

from vsakharuk =at= hbk =dot= com

Hello all,
Running 32 bit gsl on windows.
Got flipped results for incomplete gamma Functions.

#include <iomanip>
#include <iostream>
#include <gsl\gsl_specfunc.h>

using namespace std;

int main( int argc, char* argv[])
{
cout<<"GSL incomplete gamma=" << gsl_sf_gamma_inc(1.000000, 3.000000)<< endl;
cout<<"GSL incomplete gamma P=" << gsl_sf_gamma_inc_P(1.000000, 3.000000)<< endl;
return 0;
}

Output:
GSL incomplete gamma=0.0497871
GSL incomplete gamma P=0.950213

IMHO, GSL incomplete gamma should be equal to 0.950213
This is output of incomplete gamma P

Regards V.

Patrick Alken <psa>
Project Administrator

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by psa (Submitted the item)
  •  

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    No Changes Have Been Made to This Item

    Back to the top


    Powered by Savane 3.1-cleanup1