function [besi0eresult,x]=besi0e(x);
besi0eresult=[];
persistent ai02cs ai0cs besi0e bi0cs first firstCall ntai0 ntai02 nti0 xsml y ; if isempty(firstCall),firstCall=1;end;
if isempty(ai02cs), ai02cs=zeros(1,22); end;
if isempty(ai0cs), ai0cs=zeros(1,21); end;
if isempty(besi0eresult), besi0eresult=0; end;
if isempty(bi0cs), bi0cs=zeros(1,12); end;
if isempty(xsml), xsml=0; end;
if isempty(y), y=0; end;
if isempty(ntai0), ntai0=0; end;
if isempty(ntai02), ntai02=0; end;
if isempty(nti0), nti0=0; end;
%***BEGIN PROLOGUE BESI0E
%***PURPOSE Compute the exponentially scaled modified (hyperbolic)
% Bessel function of the first kind of order zero.
%***LIBRARY SLATEC (FNLIB)
%***CATEGORY C10B1
%***TYPE SINGLE PRECISION (BESI0E-S, DBSI0E-D)
%***KEYWORDS EXPONENTIALLY SCALED, FIRST KIND, FNLIB,
% HYPERBOLIC BESSEL FUNCTION, MODIFIED BESSEL FUNCTION,
% ORDER ZERO, SPECIAL FUNCTIONS
%***AUTHOR Fullerton, W., (LANL)
%***DESCRIPTION
%
% BESI0E(X) calculates the exponentially scaled modified (hyperbolic)
% Bessel function of the first kind of order zero for real argument X;
% i.e., EXP(-ABS(X))*I0(X).
%
%
% Series for BI0 on the interval 0. to 9.00000D+00
% with weighted error 2.46E-18
% log weighted error 17.61
% significant figures required 17.90
% decimal places required 18.15
%
%
% Series for AI0 on the interval 1.25000D-01 to 3.33333D-01
% with weighted error 7.87E-17
% log weighted error 16.10
% significant figures required 14.69
% decimal places required 16.76
%
%
% Series for AI02 on the interval 0. to 1.25000D-01
% with weighted error 3.79E-17
% log weighted error 16.42
% significant figures required 14.86
% decimal places required 17.09
%
%***REFERENCES (NONE)
%***ROUTINES CALLED CSEVL, INITS, R1MACH
%***REVISION HISTORY (YYMMDD)
% 770701 DATE WRITTEN
% 890313 REVISION DATE from Version 3.2
% 891214 Prologue converted to Version 4.0 format. (BAB)
%***end PROLOGUE BESI0E
if isempty(first), first=false; end;
if firstCall, bi0cs(1)=[-.07660547252839144951e0]; end;
if firstCall, bi0cs(2)=[1.927337953993808270e0]; end;
if firstCall, bi0cs(3)=[.2282644586920301339e0]; end;
if firstCall, bi0cs(4)=[.01304891466707290428e0]; end;
if firstCall, bi0cs(5)=[.00043442709008164874e0]; end;
if firstCall, bi0cs(6)=[.00000942265768600193e0]; end;
if firstCall, bi0cs(7)=[.00000014340062895106e0]; end;
if firstCall, bi0cs(8)=[.00000000161384906966e0]; end;
if firstCall, bi0cs(9)=[.00000000001396650044e0]; end;
if firstCall, bi0cs(10)=[.00000000000009579451e0]; end;
if firstCall, bi0cs(11)=[.00000000000000053339e0]; end;
if firstCall, bi0cs(12)=[.00000000000000000245e0]; end;
if firstCall, ai0cs(1)=[.07575994494023796e0]; end;
if firstCall, ai0cs(2)=[.00759138081082334e0]; end;
if firstCall, ai0cs(3)=[.00041531313389237e0]; end;
if firstCall, ai0cs(4)=[.00001070076463439e0]; end;
if firstCall, ai0cs(5)=[-.00000790117997921e0]; end;
if firstCall, ai0cs(6)=[-.00000078261435014e0]; end;
if firstCall, ai0cs(7)=[.00000027838499429e0]; end;
if firstCall, ai0cs(8)=[.00000000825247260e0]; end;
if firstCall, ai0cs(9)=[-.00000001204463945e0]; end;
if firstCall, ai0cs(10)=[.00000000155964859e0]; end;
if firstCall, ai0cs(11)=[.00000000022925563e0]; end;
if firstCall, ai0cs(12)=[-.00000000011916228e0]; end;
if firstCall, ai0cs(13)=[.00000000001757854e0]; end;
if firstCall, ai0cs(14)=[.00000000000112822e0]; end;
if firstCall, ai0cs(15)=[-.00000000000114684e0]; end;
if firstCall, ai0cs(16)=[.00000000000027155e0]; end;
if firstCall, ai0cs(17)=[-.00000000000002415e0]; end;
if firstCall, ai0cs(18)=[-.00000000000000608e0]; end;
if firstCall, ai0cs(19)=[.00000000000000314e0]; end;
if firstCall, ai0cs(20)=[-.00000000000000071e0]; end;
if firstCall, ai0cs(21)=[.00000000000000007e0]; end;
if firstCall, ai02cs(1)=[.05449041101410882e0]; end;
if firstCall, ai02cs(2)=[.00336911647825569e0]; end;
if firstCall, ai02cs(3)=[.00006889758346918e0]; end;
if firstCall, ai02cs(4)=[.00000289137052082e0]; end;
if firstCall, ai02cs(5)=[.00000020489185893e0]; end;
if firstCall, ai02cs(6)=[.00000002266668991e0]; end;
if firstCall, ai02cs(7)=[.00000000339623203e0]; end;
if firstCall, ai02cs(8)=[.00000000049406022e0]; end;
if firstCall, ai02cs(9)=[.00000000001188914e0]; end;
if firstCall, ai02cs(10)=[-.00000000003149915e0]; end;
if firstCall, ai02cs(11)=[-.00000000001321580e0]; end;
if firstCall, ai02cs(12)=[-.00000000000179419e0]; end;
if firstCall, ai02cs(13)=[.00000000000071801e0]; end;
if firstCall, ai02cs(14)=[.00000000000038529e0]; end;
if firstCall, ai02cs(15)=[.00000000000001539e0]; end;
if firstCall, ai02cs(16)=[-.00000000000004151e0]; end;
if firstCall, ai02cs(17)=[-.00000000000000954e0]; end;
if firstCall, ai02cs(18)=[.00000000000000382e0]; end;
if firstCall, ai02cs(19)=[.00000000000000176e0]; end;
if firstCall, ai02cs(20)=[-.00000000000000034e0]; end;
if firstCall, ai02cs(21)=[-.00000000000000027e0]; end;
if firstCall, ai02cs(22)=[.00000000000000003e0]; end;
if firstCall, first=[true]; end;
firstCall=0;
%***FIRST EXECUTABLE STATEMENT BESI0E
if( first )
[nti0 ,bi0cs]=inits(bi0cs,12,0.1.*r1mach(3));
[ntai0 ,ai0cs]=inits(ai0cs,21,0.1.*r1mach(3));
[ntai02 ,ai02cs]=inits(ai02cs,22,0.1.*r1mach(3));
xsml = sqrt(4.5.*r1mach(3));
end;
first = false;
%
y = abs(x);
if( y>3.0 )
%
if( y<=8. )
besi0eresult =(.375+csevl((48../y-11.)./5.,ai0cs,ntai0))./sqrt(y);
end;
if( y>8. )
besi0eresult =(.375+csevl(16../y-1.,ai02cs,ntai02))./sqrt(y);
end;
else;
%
besi0eresult = 1.0 - x;
if( y>xsml )
besi0eresult = exp(-y).*(2.75+csevl(y.*y./4.5-1.0,bi0cs,nti0));
end;
csnil=dbstack(1); csnil=csnil(1).name(1)~='@';
if csnil&&~isempty(inputname(1)), assignin('caller','FUntemp',x); evalin('caller',[inputname(1),'=FUntemp;']); end
return;
end;
%
csnil=dbstack(1); csnil=csnil(1).name(1)~='@';
if csnil&&~isempty(inputname(1)), assignin('caller','FUntemp',x); evalin('caller',[inputname(1),'=FUntemp;']); end
end
%DECK BESI0