/* nag_bessel_y0 (s17acc) Example Program. * * Copyright 1990 Numerical Algorithms Group. * * Mark 2 revised, 1992. */ #include #include #include #include int main(void) { double x, y; /* Skip heading in data file */ Vscanf("%*[^\n]"); Vprintf("nag_bessel_y0 (s17acc) Example Program Results\n"); Vprintf(" x y\n"); while (scanf("%lf", &x) != EOF) { /* nag_bessel_y0 (s17acc). * Bessel function Y_0(x) */ y = nag_bessel_y0(x, NAGERR_DEFAULT); Vprintf("%12.3e%12.3e\n", x, y); } return EXIT_SUCCESS; }