/* nag_polygamma_fun (s14acc) Example Program * * Copyright 2002 Numerical Algorithms Group. * * Mark 7, 2002. */ #include #include #include #include int main(void) { double f, x; /* Skip heading in data file */ Vscanf("%*[^\n]"); Vprintf("s14acc Example Program Results\n"); Vprintf(" x psi(x)-log(x)\n"); while (scanf("%lf", &x) != EOF) { f = s14acc(x, NAGERR_DEFAULT); Vprintf("%8.3f %14.4f\n", x, f); } return EXIT_SUCCESS; }