bugGNU Scientific Library - Bugs: bug #21836, gamma_inc_P and gamma_inc_Q only...

 
 

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

bug #21836: gamma_inc_P and gamma_inc_Q only satisfy P+Q=1 within errors

Submitted by:  -Deleted Account- <bjg>
Submitted on:  Tue 18 Dec 2007 06:50:20 PM UTC  
 
Category: Accuracy problemSeverity: 2 - Minor
Operating System: Status: Confirmed
Assigned to: NoneOpen/Closed: Open
Release: 1.10

Tue 18 Dec 2007 06:50:20 PM UTC, original submission:

BUG #44 -- gamma_inc_P and gamma_inc_Q only satisfy P+Q=1 within errors

The sum of gamma_inc_P and gamma_inc_Q doesn't always satisfy the
identity P+Q=1 exactly (although it is correct within errors), due the
slightly different branch conditions for the series and continued
fraction expansions. These could be made identical so that P+Q=1 exactly.

#include <stdio.h>
#include <gsl/gsl_sf_gamma.h>

int
main (void)
{
gsl_sf_result r1, r2;
double a = 0.3, x = 1.0;
gsl_sf_gamma_inc_P_e (a, x, &r1);
gsl_sf_gamma_inc_Q_e (a, x, &r2);
printf("%.18e\n", r1.val);
printf("%.18e\n", r2.val);
printf("%.18e\n", r1.val + r2.val);
}

$ ./a.out
9.156741562411074842e-01
8.432584375889111417e-02
9.999999999999985567e-01

-Deleted Account- <bjg>

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

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

 

 

Follow 2 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Sun 10 Feb 2008 10:29:31 AM UTCbjgSeverity3 - Normal=>2 - Minor
  StatusNone=>Confirmed

Back to the top


Powered by Savane 3.1-cleanup