Main Page   Data Structures   File List   Data Fields   Globals  

bessel.c

Go to the documentation of this file.
00001 #include <sadie.h>
00002 
00003 /*----------------------------------------------------------------------------*/
00004 /*-General Information--------------------------------------------------------*/
00005 /*                                                                            */
00006 /*   This function computes the modified Bessel Function of the first         */
00007 /*   kind and zero order. Taken from the Numerical Recipes book.              */
00008 /*                                                                            */
00009 /*----------------------------------------------------------------------------*/
00010 /*-Interface Information------------------------------------------------------*/
00011 double
00012 mBesselF (double x              /*  I   Argument to compute Io(x).                            */
00013 /*----------------------------------------------------------------------------*/
00014   )
00015 {
00016   double ax, bessel;
00017   double y;
00018 
00019   if ((ax = fabs (x)) < 3.75)
00020     {
00021       y = x / 3.75;
00022       y *= y;
00023       bessel = 1.0 + y * (3.5156229 + y * (3.0899424 + y * (1.2067492
00024                                                             + y * (0.2659732 +
00025                                                                    y *
00026                                                                    (0.360768e-1
00027                                                                     +
00028                                                                     y *
00029                                                                     0.45813e-2)))));
00030     }
00031   else
00032     {
00033       y = 3.75 / ax;
00034       bessel = (exp (ax) / sqrt (ax)) * (0.39894228 + y * (0.1328592e-1
00035                                                            +
00036                                                            y * (0.225319e-2 +
00037                                                                 y *
00038                                                                 (-0.157565e-2
00039                                                                  +
00040                                                                  y *
00041                                                                  (0.916281e-2
00042                                                                   +
00043                                                                   y *
00044                                                                   (-0.2057706e-1
00045                                                                    +
00046                                                                    y *
00047                                                                    (0.2635537e-1
00048                                                                     +
00049                                                                     y *
00050                                                                     (-0.1647633e-1
00051                                                                      +
00052                                                                      y *
00053                                                                      0.392377e-2))))))));
00054     }
00055 
00056   return (bessel);
00057 }

Generated on Sun May 18 15:36:07 2003 for tclSadie by doxygen1.3