/* i1.c
*
* Modified Bessel function of order one
*
*
*
* SYNOPSIS :
*
* double x , y , i1 ( ) ;
*
* y = i1 ( x ) ;
*
*
*
* DESCRIPTION :
*
* Returns modified Bessel function of order one of the
* argument .
*
* The function is defined as i1 ( x ) = - i j1 ( 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
* DEC 0 , 30 3400 1 . 2 e - 16 2 . 3 e - 17
* IEEE 0 , 30 30000 1 . 9 e - 15 2 . 1 e - 16
*
*
*/
/* i1e.c
*
* Modified Bessel function of order one ,
* exponentially scaled
*
*
*
* SYNOPSIS :
*
* double x , y , i1e ( ) ;
*
* y = i1e ( x ) ;
*
*
*
* DESCRIPTION :
*
* Returns exponentially scaled modified Bessel function
* of order one of the argument .
*
* The function is defined as i1 ( x ) = - i exp ( - | x | ) j1 ( ix ) .
*
*
*
* ACCURACY :
*
* Relative error :
* arithmetic domain # trials peak rms
* IEEE 0 , 30 30000 2 . 0 e - 15 2 . 0 e - 16
* See i1 ( ) .
*
*/
/* i1.c 2 */
/*
Cephes Math Library Release 2 . 8 : June , 2000
Copyright 1985 , 1987 , 2000 by Stephen L . Moshier
*/
#include "mconf.h"
/* Chebyshev coefficients for exp(-x) I1(x) / x
* in the interval [ 0 , 8 ] .
*
* lim ( x - > 0 ) { exp ( - x ) I1 ( x ) / x } = 1 / 2 .
*/
#ifdef UNK
static double A[] =
{
2 .77791411276104639959 E-18 ,
-2 .11142121435816608115 E-17 ,
1 .55363195773620046921 E-16 ,
-1 .10559694773538630805 E-15 ,
7 .60068429473540693410 E-15 ,
-5 .04218550472791168711 E-14 ,
3 .22379336594557470981 E-13 ,
-1 .98397439776494371520 E-12 ,
1 .17361862988909016308 E-11 ,
-6 .66348972350202774223 E-11 ,
3 .62559028155211703701 E-10 ,
-1 .88724975172282928790 E-9 ,
9 .38153738649577178388 E-9 ,
-4 .44505912879632808065 E-8 ,
2 .00329475355213526229 E-7 ,
-8 .56872026469545474066 E-7 ,
3 .47025130813767847674 E-6 ,
-1 .32731636560394358279 E-5 ,
4 .78156510755005422638 E-5 ,
-1 .61760815825896745588 E-4 ,
5 .12285956168575772895 E-4 ,
-1 .51357245063125314899 E-3 ,
4 .15642294431288815669 E-3 ,
-1 .05640848946261981558 E-2 ,
2 .47264490306265168283 E-2 ,
-5 .29459812080949914269 E-2 ,
1 .02643658689847095384 E-1 ,
-1 .76416518357834055153 E-1 ,
2 .52587186443633654823 E-1
};
#endif
#ifdef DEC
static unsigned short A[] = {
0021514 ,0174520 ,0060742 ,0000241 ,
0122302 ,0137206 ,0016120 ,0025663 ,
0023063 ,0017437 ,0026235 ,0176536 ,
0123637 ,0052523 ,0170150 ,0125632 ,
0024410 ,0165770 ,0030251 ,0044134 ,
0125143 ,0012160 ,0162170 ,0054727 ,
0025665 ,0075702 ,0035716 ,0145247 ,
0126413 ,0116032 ,0176670 ,0015462 ,
0027116 ,0073425 ,0110351 ,0105242 ,
0127622 ,0104034 ,0137530 ,0037364 ,
0030307 ,0050645 ,0120776 ,0175535 ,
0131001 ,0130331 ,0043523 ,0037455 ,
0031441 ,0026160 ,0010712 ,0100174 ,
0132076 ,0164761 ,0022706 ,0017500 ,
0032527 ,0015045 ,0115076 ,0104076 ,
0133146 ,0001714 ,0015434 ,0144520 ,
0033550 ,0161166 ,0124215 ,0077050 ,
0134136 ,0127715 ,0143365 ,0157170 ,
0034510 ,0106652 ,0013070 ,0064130 ,
0135051 ,0117126 ,0117264 ,0123761 ,
0035406 ,0045355 ,0133066 ,0175751 ,
0135706 ,0061420 ,0054746 ,0122440 ,
0036210 ,0031232 ,0047235 ,0006640 ,
0136455 ,0012373 ,0144235 ,0011523 ,
0036712 ,0107437 ,0036731 ,0015111 ,
0137130 ,0156742 ,0115744 ,0172743 ,
0037322 ,0033326 ,0124667 ,0124740 ,
0137464 ,0123210 ,0021510 ,0144556 ,
0037601 ,0051433 ,0111123 ,0177721
};
#endif
#ifdef IBMPC
static unsigned short A[] = {
0 x4014,0 x0c3c,0 x9f2a,0 x3c49,
0 x0576,0 xc38a,0 x57d0,0 xbc78,
0 xbfac,0 xe593,0 x63e3,0 x3ca6,
0 x1573,0 x7e0d,0 xeaaa,0 xbcd3,
0 x290c,0 x0615,0 x1d7f,0 x3d01,
0 x0b3b,0 x1c8f,0 x628e,0 xbd2c,
0 xd955,0 x4779,0 xaf78,0 x3d56,
0 x0366,0 x5fb7,0 x7383,0 xbd81,
0 x3154,0 xb21d,0 xcee2,0 x3da9,
0 x07de,0 x97eb,0 x5103,0 xbdd2,
0 xdf6c,0 xb43f,0 xea34,0 x3df8,
0 x67e6,0 x28ea,0 x361b,0 xbe20,
0 x5010,0 x0239,0 x258e,0 x3e44,
0 xc3e8,0 x24b8,0 xdd3e,0 xbe67,
0 xd108,0 xb347,0 xe344,0 x3e8a,
0 x992a,0 x8363,0 xc079,0 xbeac,
0 xafc5,0 xd511,0 x1c4e,0 x3ecd,
0 xbbcf,0 xb8de,0 xd5f9,0 xbeeb,
0 x0d0b,0 x42c7,0 x11b5,0 x3f09,
0 x94fe,0 xd3d6,0 x33ca,0 xbf25,
0 xdf7d,0 xb6c6,0 xc95d,0 x3f40,
0 xd4a4,0 x0b3c,0 xcc62,0 xbf58,
0 xa1b4,0 x49d3,0 x0653,0 x3f71,
0 xa26a,0 x7913,0 xa29f,0 xbf85,
0 x2349,0 xe7bb,0 x51e3,0 x3f99,
0 x9ebc,0 x537c,0 x1bbc,0 xbfab,
0 xf53c,0 xd536,0 x46da,0 x3fba,
0 x192e,0 x0469,0 x94d1,0 xbfc6,
0 x7ffa,0 x724a,0 x2a63,0 x3fd0
};
#endif
#ifdef MIEEE
static unsigned short A[] = {
0 x3c49,0 x9f2a,0 x0c3c,0 x4014,
0 xbc78,0 x57d0,0 xc38a,0 x0576,
0 x3ca6,0 x63e3,0 xe593,0 xbfac,
0 xbcd3,0 xeaaa,0 x7e0d,0 x1573,
0 x3d01,0 x1d7f,0 x0615,0 x290c,
0 xbd2c,0 x628e,0 x1c8f,0 x0b3b,
0 x3d56,0 xaf78,0 x4779,0 xd955,
0 xbd81,0 x7383,0 x5fb7,0 x0366,
0 x3da9,0 xcee2,0 xb21d,0 x3154,
0 xbdd2,0 x5103,0 x97eb,0 x07de,
0 x3df8,0 xea34,0 xb43f,0 xdf6c,
0 xbe20,0 x361b,0 x28ea,0 x67e6,
0 x3e44,0 x258e,0 x0239,0 x5010,
0 xbe67,0 xdd3e,0 x24b8,0 xc3e8,
0 x3e8a,0 xe344,0 xb347,0 xd108,
0 xbeac,0 xc079,0 x8363,0 x992a,
0 x3ecd,0 x1c4e,0 xd511,0 xafc5,
0 xbeeb,0 xd5f9,0 xb8de,0 xbbcf,
0 x3f09,0 x11b5,0 x42c7,0 x0d0b,
0 xbf25,0 x33ca,0 xd3d6,0 x94fe,
0 x3f40,0 xc95d,0 xb6c6,0 xdf7d,
0 xbf58,0 xcc62,0 x0b3c,0 xd4a4,
0 x3f71,0 x0653,0 x49d3,0 xa1b4,
0 xbf85,0 xa29f,0 x7913,0 xa26a,
0 x3f99,0 x51e3,0 xe7bb,0 x2349,
0 xbfab,0 x1bbc,0 x537c,0 x9ebc,
0 x3fba,0 x46da,0 xd536,0 xf53c,
0 xbfc6,0 x94d1,0 x0469,0 x192e,
0 x3fd0,0 x2a63,0 x724a,0 x7ffa
};
#endif
/* i1.c */
/* Chebyshev coefficients for exp(-x) sqrt(x) I1(x)
* in the inverted interval [ 8 , infinity ] .
*
* lim ( x - > inf ) { exp ( - x ) sqrt ( x ) I1 ( x ) } = 1 / sqrt ( 2 pi ) .
*/
#ifdef UNK
static double B[] =
{
7 .51729631084210481353 E-18 ,
4 .41434832307170791151 E-18 ,
-4 .65030536848935832153 E-17 ,
-3 .20952592199342395980 E-17 ,
2 .96262899764595013876 E-16 ,
3 .30820231092092828324 E-16 ,
-1 .88035477551078244854 E-15 ,
-3 .81440307243700780478 E-15 ,
1 .04202769841288027642 E-14 ,
4 .27244001671195135429 E-14 ,
-2 .10154184277266431302 E-14 ,
-4 .08355111109219731823 E-13 ,
-7 .19855177624590851209 E-13 ,
2 .03562854414708950722 E-12 ,
1 .41258074366137813316 E-11 ,
3 .25260358301548823856 E-11 ,
-1 .89749581235054123450 E-11 ,
-5 .58974346219658380687 E-10 ,
-3 .83538038596423702205 E-9 ,
-2 .63146884688951950684 E-8 ,
-2 .51223623787020892529 E-7 ,
-3 .88256480887769039346 E-6 ,
-1 .10588938762623716291 E-4 ,
-9 .76109749136146840777 E-3 ,
7 .78576235018280120474 E-1
};
#endif
#ifdef DEC
static unsigned short B[] = {
0022012 ,0125555 ,0115227 ,0043456 ,
0021642 ,0156127 ,0052075 ,0145203 ,
0122526 ,0072435 ,0111231 ,0011664 ,
0122424 ,0001544 ,0161671 ,0114403 ,
0023252 ,0144257 ,0163532 ,0142121 ,
0023276 ,0132162 ,0174045 ,0013204 ,
0124007 ,0077154 ,0057046 ,0110517 ,
0124211 ,0066650 ,0116127 ,0157073 ,
0024473 ,0133413 ,0130551 ,0107504 ,
0025100 ,0064741 ,0032631 ,0040364 ,
0124675 ,0045101 ,0071551 ,0012400 ,
0125745 ,0161054 ,0071637 ,0011247 ,
0126112 ,0117410 ,0035525 ,0122231 ,
0026417 ,0037237 ,0131034 ,0176427 ,
0027170 ,0100373 ,0024742 ,0025725 ,
0027417 ,0006417 ,0105303 ,0141446 ,
0127246 ,0163716 ,0121202 ,0060137 ,
0130431 ,0123122 ,0120436 ,0166000 ,
0131203 ,0144134 ,0153251 ,0124500 ,
0131742 ,0005234 ,0122732 ,0033006 ,
0132606 ,0157751 ,0072362 ,0121031 ,
0133602 ,0043372 ,0047120 ,0015626 ,
0134747 ,0165774 ,0001125 ,0046462 ,
0136437 ,0166402 ,0117746 ,0155137 ,
0040107 ,0050305 ,0125330 ,0124241
};
#endif
#ifdef IBMPC
static unsigned short B[] = {
0 xe8e6,0 xb352,0 x556d,0 x3c61,
0 xb950,0 xea87,0 x5b8a,0 x3c54,
0 x2277,0 xb253,0 xcea3,0 xbc8a,
0 x3320,0 x9c77,0 x806c,0 xbc82,
0 x588a,0 xfceb,0 x5915,0 x3cb5,
0 xa2d1,0 x5f04,0 xd68e,0 x3cb7,
0 xd22a,0 x8bc4,0 xefcd,0 xbce0,
0 xfbc7,0 x138a,0 x2db5,0 xbcf1,
0 x31e8,0 x762d,0 x76e1,0 x3d07,
0 x281e,0 x26b3,0 x0d3c,0 x3d28,
0 x22a0,0 x2e6d,0 xa948,0 xbd17,
0 xe255,0 x8e73,0 xbc45,0 xbd5c,
0 xb493,0 x076a,0 x53e1,0 xbd69,
0 x9fa3,0 xf643,0 xe7d3,0 x3d81,
0 x457b,0 x653c,0 x101f,0 x3daf,
0 x7865,0 xf158,0 xe1a1,0 x3dc1,
0 x4c0c,0 xd450,0 xdcf9,0 xbdb4,
0 xdd80,0 x5423,0 x34ca,0 xbe03,
0 x3528,0 x9ad5,0 x790b,0 xbe30,
0 x46c1,0 x94bb,0 x4153,0 xbe5c,
0 x5443,0 x2e9e,0 xdbfd,0 xbe90,
0 x0373,0 x49ca,0 x48df,0 xbed0,
0 xa9a6,0 x804a,0 xfd7f,0 xbf1c,
0 xdb4c,0 x53fc,0 xfda0,0 xbf83,
0 x1514,0 xb55b,0 xea18,0 x3fe8
};
#endif
#ifdef MIEEE
static unsigned short B[] = {
0 x3c61,0 x556d,0 xb352,0 xe8e6,
0 x3c54,0 x5b8a,0 xea87,0 xb950,
0 xbc8a,0 xcea3,0 xb253,0 x2277,
0 xbc82,0 x806c,0 x9c77,0 x3320,
0 x3cb5,0 x5915,0 xfceb,0 x588a,
0 x3cb7,0 xd68e,0 x5f04,0 xa2d1,
0 xbce0,0 xefcd,0 x8bc4,0 xd22a,
0 xbcf1,0 x2db5,0 x138a,0 xfbc7,
0 x3d07,0 x76e1,0 x762d,0 x31e8,
0 x3d28,0 x0d3c,0 x26b3,0 x281e,
0 xbd17,0 xa948,0 x2e6d,0 x22a0,
0 xbd5c,0 xbc45,0 x8e73,0 xe255,
0 xbd69,0 x53e1,0 x076a,0 xb493,
0 x3d81,0 xe7d3,0 xf643,0 x9fa3,
0 x3daf,0 x101f,0 x653c,0 x457b,
0 x3dc1,0 xe1a1,0 xf158,0 x7865,
0 xbdb4,0 xdcf9,0 xd450,0 x4c0c,
0 xbe03,0 x34ca,0 x5423,0 xdd80,
0 xbe30,0 x790b,0 x9ad5,0 x3528,
0 xbe5c,0 x4153,0 x94bb,0 x46c1,
0 xbe90,0 xdbfd,0 x2e9e,0 x5443,
0 xbed0,0 x48df,0 x49ca,0 x0373,
0 xbf1c,0 xfd7f,0 x804a,0 xa9a6,
0 xbf83,0 xfda0,0 x53fc,0 xdb4c,
0 x3fe8,0 xea18,0 xb55b,0 x1514
};
#endif
/* i1.c */
#ifdef ANSIPROT
extern double chbevl ( double , void *, int );
extern double exp ( double );
extern double sqrt ( double );
extern double fabs ( double );
#else
double chbevl(), exp(), sqrt(), fabs();
#endif
double i1(x)
double x;
{
double y, z;
z = fabs(x);
if ( z <= 8 .0 )
{
y = (z/2 .0 ) - 2 .0 ;
z = chbevl( y, A, 29 ) * z * exp(z);
}
else
{
z = exp(z) * chbevl( 32 .0 /z - 2 .0 , B, 25 ) / sqrt(z);
}
if ( x < 0 .0 )
z = -z;
return ( z );
}
/* i1e() */
double i1e( x )
double x;
{
double y, z;
z = fabs(x);
if ( z <= 8 .0 )
{
y = (z/2 .0 ) - 2 .0 ;
z = chbevl( y, A, 29 ) * z;
}
else
{
z = chbevl( 32 .0 /z - 2 .0 , B, 25 ) / sqrt(z);
}
if ( x < 0 .0 )
z = -z;
return ( z );
}
Messung V0.5 in Prozent C=98 H=100 G=98