This is the mail archive of the gsl-discuss@sources.redhat.com mailing list for the GSL project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Bug in gsl_sf_gamma_inc_P_impl



I get GSL_EMAXITER when trying to calculate 
gsl_sf_gamma_inc_P_impl(100.0, 99.0+-eps, r)
with gsl-0.6.

Other x values work ok, only values very close to 99.0 cause the routine
to fail.

Below is the code I used in testing.

Teemu

-------------

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

int main(void)
{
  int status;
  double a, x;
  gsl_sf_result r;
  x = 99.0;
  a = 100.0;

  status = gsl_sf_gamma_inc_P_impl(a, x, &r);
  if(status != GSL_SUCCESS) {
    printf("Error calculating gammainc: %d \n", status);
/*    return 1; */
  }

  printf("%lg, %lg: %lg\n", x, a, r.val);

  return 0;
}
   	
   

--
"The computer world is like a great big toy store.
 But all the toys are broken."  --Steve Witham


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]