/* i0f.c
*
* Modified Bessel function of order zero
*
*
*
* SYNOPSIS :
*
* float x , y , i0 ( ) ;
*
* y = i0f ( x ) ;
*
*
*
* DESCRIPTION :
*
* Returns modified Bessel function of order zero of the
* argument .
*
* The function is defined as i0 ( x ) = j0 ( ix ) .
*
* The range is partitioned into the two intervals [ 0 , 8 ] and
* ( 8 , infinity ) . Chebyshev polynomial expansions are employed
* in each interval .
*
*
*
* ACCURACY :
*
* Relative error :
* arithmetic domain # trials peak rms
* IEEE 0 , 30 100000 4 . 0 e - 7 7 . 9 e - 8
*
*/
/* i0ef.c
*
* Modified Bessel function of order zero ,
* exponentially scaled
*
*
*
* SYNOPSIS :
*
* float x , y , i0ef ( ) ;
*
* y = i0ef ( x ) ;
*
*
*
* DESCRIPTION :
*
* Returns exponentially scaled modified Bessel function
* of order zero of the argument .
*
* The function is defined as i0e ( x ) = exp ( - | x | ) j0 ( ix ) .
*
*
*
* ACCURACY :
*
* Relative error :
* arithmetic domain # trials peak rms
* IEEE 0 , 30 100000 3 . 7 e - 7 7 . 0 e - 8
* See i0f ( ) .
*
*/
/* i0.c */
/*
Cephes Math Library Release 2 . 2 : June , 1992
Copyright 1984 , 1987 , 1992 by Stephen L . Moshier
Direct inquiries to 30 Frost Street , Cambridge , MA 02140
*/
#include "mconf.h"
/* Chebyshev coefficients for exp(-x) I0(x)
* in the interval [ 0 , 8 ] .
*
* lim ( x - > 0 ) { exp ( - x ) I0 ( x ) } = 1 .
*/
static float A[] =
{
-1 .30002500998624804212 E-8 f,
6 .04699502254191894932 E-8 f,
-2 .67079385394061173391 E-7 f,
1 .11738753912010371815 E-6 f,
-4 .41673835845875056359 E-6 f,
1 .64484480707288970893 E-5 f,
-5 .75419501008210370398 E-5 f,
1 .88502885095841655729 E-4 f,
-5 .76375574538582365885 E-4 f,
1 .63947561694133579842 E-3 f,
-4 .32430999505057594430 E-3 f,
1 .05464603945949983183 E-2 f,
-2 .37374148058994688156 E-2 f,
4 .93052842396707084878 E-2 f,
-9 .49010970480476444210 E-2 f,
1 .71620901522208775349 E-1 f,
-3 .04682672343198398683 E-1 f,
6 .76795274409476084995 E-1 f
};
/* Chebyshev coefficients for exp(-x) sqrt(x) I0(x)
* in the inverted interval [ 8 , infinity ] .
*
* lim ( x - > inf ) { exp ( - x ) sqrt ( x ) I0 ( x ) } = 1 / sqrt ( 2 pi ) .
*/
static float B[] =
{
3 .39623202570838634515 E-9 f,
2 .26666899049817806459 E-8 f,
2 .04891858946906374183 E-7 f,
2 .89137052083475648297 E-6 f,
6 .88975834691682398426 E-5 f,
3 .36911647825569408990 E-3 f,
8 .04490411014108831608 E-1 f
};
#ifdef ANSIC
float chbevlf(float , float *, int ), expf(float ), sqrtf(float );
float i0f( float x )
#else
float chbevlf(), expf(), sqrtf();
float i0f(x)
double x;
#endif
{
float y;
if ( x < 0 )
x = -x;
if ( x <= 8 .0 f )
{
y = 0 .5 f*x - 2 .0 f;
return ( expf(x) * chbevlf( y, A, 18 ) );
}
return ( expf(x) * chbevlf( 32 .0 f/x - 2 .0 f, B, 7 ) / sqrtf(x) );
}
#ifdef ANSIC
float chbevlf(float , float *, int ), expf(float ), sqrtf(float );
float i0ef( float x )
#else
float chbevlf(), expf(), sqrtf();
float i0ef( x )
double x;
#endif
{
float y;
if ( x < 0 )
x = -x;
if ( x <= 8 .0 f )
{
y = 0 .5 f*x - 2 .0 f;
return ( chbevlf( y, A, 18 ) );
}
return ( chbevlf( 32 .0 f/x - 2 .0 f, B, 7 ) / sqrtf(x) );
}
Messung V0.5 in Prozent C=97 H=100 G=98
¤ Dauer der Verarbeitung: 0.11 Sekunden
(vorverarbeitet am 2026-06-13)
¤
*© Formatika GbR, Deutschland