Hi,

I found that gsl_sf_psi_n_e yields a domain error for negative non-integer 
input,
for example n=2 and x=-0x1.fffffcffffffep+22, whereas the function is perfectly
defined. For example Wolfram alpha yields 124.025 :

https://www.wolframalpha.com/input?i=polygamma%282%2C-4503599224717311%2F536870912%29

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

int main ()
{
  gsl_sf_result ret;
  int n = 2;
  double x = -0x1.fffffcffffffep+22;
  gsl_sf_psi_n_e (n, x, &ret);
}

$ gcc -I/tmp/include -L/tmp/lib /tmp/e.c -lgsl -lgslcblas
$ ./a.out 
gsl: psi.c:781: ERROR: domain error
Default GSL error handler invoked.
Aborted                    (core dumped) ./a.out

Best regards,
Paul

Reply via email to