kjb_scaled_bessel_I0 - Computes a ratio: bessel I0(x) over exp(x)


#include "wrap_gsl/wrap_gsl_sf.h"

Example compile flags (system dependent):
   -L/home/kobus/misc/load/linux_x86_64_opteron -L/usr/lib/x86_64-linux-gnu
  -lKJB                               -lfftw3  -lgsl -lgslcblas -ljpeg  -lSVM -lstdc++                    -lpthread -lSLATEC -lg2c    -lacml -lacml_mv -lblas -lg2c      -lncursesw 

int kjb_scaled_bessel_I0
	double *P_ptr,
	double x


double *P_ptr
Pointer to where the result should be stored
double x
Value at which to evaluate erf


If possible, computes a product: the modified Bessel function, order 0 (usually denoted by something like I_0(x) times exp(-x)). Please see kjb_bessel_I0 for exposition about function I0(x). The reason for making this a product with exp(-x) is that I0(x) alone grows very fast. If one needs to evaluate it for large values of x (100 or more), we need some scaling factor to avoid overflow. This routine is a thin wrapper to GSL code that computes this special function. If the GSL library is not available, this routine fails with a return value of ERROR. Otherwise, the value is returned in the location pointed to by pointer P_ptr, which must not equal null. The argument to the function is stored in x.


If successful, the value is written to *P_ptr and this function returns NO_ERROR. If the routine fails -- caused by the library being unavailable during linking -- an error message is set and the return value is ERROR.


This software is not adequatedly tested. It is recomended that results are checked independantly where appropriate.


Andrew Predoehl


Kobus Barnard


kjb_erf , kjb_bessel_I0 , kjb_scaled_bessel_I1