src/_fastcorr.c
int compute_spherical_weights(int nu, int N, double*xi, double*w){
  int i;
  double x;
  for(i = 0; i < N; i++){
    if (nu == 0){
      w[i] = 1.;//gsl_sf_bessel_y0(PI*xi[i])/gsl_sf_bessel_j1(PI*xi[i]);
    }else if (nu == 1){
      x = PI*xi[i];
      w[i] = -(x*cos(x) + x*x*sin(x))/((3-x*x)*sin(x) - 3*x*cos(x));
    }else{ //nu > 1
      w[i] = gsl_sf_bessel_yl(nu, PI*xi[i])/gsl_sf_bessel_jl(nu+1, PI*xi[i]);
    }
  }
  return 0;
}
/*Compute weights of the quadrature routine.
 */
Compute weights of the quadrature routine.
Compute weights of the quadrature routine .
int compute_spherical_weights(int nu, int N, double*xi, double*w){
  int i;
  double x;
  for(i = 0; i < N; i++){
    if (nu == 0){
      w[i] = 1.;
    }else if (nu == 1){
      x = PI*xi[i];
      w[i] = -(x*cos(x) + x*x*sin(x))/((3-x*x)*sin(x) - 3*x*cos(x));
    }else{ 
      w[i] = gsl_sf_bessel_yl(nu, PI*xi[i])/gsl_sf_bessel_jl(nu+1, PI*xi[i]);
    }
  }
  return 0;
}
int compute_spherical_weights ( int nu , int N , double * xi , double * w ) { int i ; double x ; for ( i = 0 ; i < N ; i ++ ) { if ( nu == 0 ) { w [ i ] = 1. ; } else if ( nu == 1 ) { x = PI * xi [ i ] ; w [ i ] = - ( x * cos ( x ) + x * x * sin ( x ) ) / ( ( 3 - x * x ) * sin ( x ) - 3 * x * cos ( x ) ) ; } else { w [ i ] = gsl_sf_bessel_yl ( nu , PI * xi [ i ] ) / gsl_sf_bessel_jl ( nu + 1 , PI * xi [ i ] ) ; } } return 0 ; }
Compute weights of the quadrature routine.
Compute weights of the quadrature routine .
//gsl_sf_bessel_y0(PI*xi[i])/gsl_sf_bessel_j1(PI*xi[i]); //nu > 1