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

/*
When you have the gsl libery dev installed in your system by default:
compile simply with:
gcc gsl_example.c -lgsl -lgslcblas
run:
./a.out
*/

double call_bessel_J0(double x) {
  double y = gsl_sf_bessel_J0 (x);
  return y;
}

int main (void) {
  double x = 5.0;
  double y = call_bessel_J0(x);
  printf ("J0(%g) = %.18e\n", x, y);
  return 0;
}
