/* nag_bessel_i0_scaled (s18cec) Example Program. * * Copyright 1991 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_i0_scaled (s18cec) Example Program Results\n"); Vprintf(" x y\n"); while (scanf("%lf", &x) != EOF) { /* nag_bessel_i0_scaled (s18cec). * Scaled modified Bessel function e^(~-~|x|)I_0(x) */ y = nag_bessel_i0_scaled(x); Vprintf("%12.3e%12.3e\n", x, y); } return EXIT_SUCCESS; }