Upload
others
View
1
Download
0
Embed Size (px)
Citation preview
Chebyshev Approximations for the ExponentialIntegral Ei(#)
By W. J. Cody* and Henry C. Thacher, Jr.**
Abstract. The computation of the exponential integral Ei(a;), x > 0, using
rational Chebyshev approximations is discussed. The necessary approximations are
presented in well-conditioned forms for the intervals (0, 6], [6, 12], [12, 24] and
[24, <x>). Maximal relative errors are as low as from 8 X 10-19 to 2 X 10~21. In addi-
tion, the value of the zero of Ei(:c) is presented to 30 decimal places. |
1. Introduction. The classical exponential integral is defined by
(1.1) Ei(x) = f e-dt= - f ~dt (x>0)J-x t J-x t
where the integral is to be interpreted as the Cauchy principal value. Except for the
sign, it represents the natural extension of the function
Ei{z) m j* ~dt= -Ei(-z) ([arg z\ < *)
to the negative real axis.
The exponential integral was studied extensively throughout the 19th century,
in the form of the integral logarithm
Y\(x) =Ei(lnz) = "f ~-dtJ o in t
which plays a significant role in number and probability theory as well as in a variety
of physical applications. Recent applications in the theories of molecular structure
and of the solid state have produced a need for methods for high-precision evaluation
of the function using automatic computers.
To meet this need, Harris [1], and Miller and Hurst [2] published tables of the
function to 18S and 16S respectively, with useful interpolation aids, for the region
between that where the Maclaurin series is convenient and that where the asymp-
totic series gives acceptable accuracy. Clenshaw [3] has published 20D tables of the
coefficients for an expansion in Chebyshev polynomials valid for x ^ 4. Unfor-
tunately, this series converges very slowly (27 terms for 20D) and gives poor relative
accuracy where Ei(z) is small. More recently, G. F. Miller has computed (but not
yet published) coefficients for Chebyshev expansions for the intervals 4 ^ x ^ 16
and 16 ^ x ^ <x>. Both of these series require 39 terms to attain 20D accuracy, again
exhibiting slow convergence.
Received August 1, 1968.* Work performed under the auspices of the U. S. Atomic Energy Commission.
** Work supported in part by the U. S. Atomic Energy Commission and, in part, by the
University of Notre Dame.
289
License or copyright restrictions may apply to redistribution; see https://www.ams.org/journal-terms-of-use
290 W. J. CODY AND HENRY C. THACHER, JR.
The present work presents nearly minimax rational approximations for Ei(x),
x > 0, with accuracies up to 18S to 20S. The approximations presented here, and in
a previously published companion paper [4], thus allow efficient high-precision
computation of Ei(a;) for all real nonzero x.
2. Functional Properties. The classical Maclaurin series
(2.1) Ei(x) = 7 + lnz+ Í~/c=i KIK
(y = 0.57721 • • •, Euler's constant) is satisfactory for computation for most smallx.
It is apparent from this series that, except for the logarithmic branch point at
the origin, Ei(a;) has no singularities in the finite complex plane, but does have a
simple zero (to which an accurate approximation will be given later) in the interval
(0, 1).In the neighborhood of that zero, significance losses make (2.1) unsatisfactory
for accurate computation, and a Taylor series expansion about the zero is to be
preferred. Differentiating (1.1) and using Leibnitz' rule, we find
(2.2) Ei(z + h) = Ei(x) + — ¿ cn(x)hn (\h\ < x)x n=o
where cn(x) are the successive derivatives of ex/x up to the factor xe~x/(n + 1) !.
These are readily computable from the recurrence
, x 1 [n+1 , s 1_1
with Co = 1, which Gautschi [5] has shown to be stable unless x is large.
For large x the Maclaurin series requires an excessive number of terms and other
methods of computation are preferable. Letting
1°° e~uCo(x) = xe *Ei(:r) = T-y- du ,
•'o 1 — u/xu/x
and using the identity
i = y, (—y + ^x^n
- u/x ¿ó\x/1 — u/x ¿To \ x / 1 — u/x
we obtain
(2.3) Co Or) = Z -k + -n Cn(x)*=0 X X
where
(2.4) Cn(x) =-.{" . U"e U, du .n\ Jq 1 — u/x
This is the asymptotic series expansion for the exponential integral with an error
term. For large enough x the series without the error term is computationally useful,
particularly if economized by Chebyshev polynomials. It can be shown that for
x > n the error in neglecting the remainder in (2.3) is positive and less than n\/nn.
License or copyright restrictions may apply to redistribution; see https://www.ams.org/journal-terms-of-use
CHEBYSHEV APPROXIMATIONS FOR El(x) 291
Table I
¿ im -TOO log,Q maxEi(x) - E„m(x)im
TiTxT
0 < X < 6
m ̂\
0123456
789
••••••«»«««•»««•••»««»««««a»»**««*»««***««***»***»»««*
141781
2151235
45i141234
372
93211321430
1512864C9523
215365499628753
286
994
363 444 530
9
619
12481515
17922076
6 £ X _< 12e*&»«e*«4**ett**ttftftfc#ft*«*tt*£«fitt*eft*e*ftftfttt*ft»***&tt**tt*»tttt**«*ff*fr*«*«
113 240 320 394 480 5-77 626 742 805 862284t 309 369 446 544
309 474 577 669417 455 556 656 721462 687 735 877
1010127:
1514L763
1921
12 < X < 24i«*»*««**»»«*»***«**»*****«»*******»»,»t»,*»*«,«.«****«»,*,,,»*,*,«
.ÏÏV0 123456789
t**«»*«*»»»*»««*«»****«**«»«***«*»*.*******»**»**»****«***«****
325T438564632
303454
594+624
612f
623
796
542623
ec6876
643681785880945
690 834 855 996 1015
11671273
15031715
1922*fte««ff***tf«*tte*tf*«4**«#ft*«*«»*«*ft«***«**«*»ea«*#**ftft#lt*«*«*e*»**#*
24 <_ X
01234
5
67
89
50563174C834
462644788891979
592764896
10071127
7C7868991
11321151
809958
109611511158
899
1357
978 1054 1139 1223
14251585
16551811
Nonstandard error curve
License or copyright restrictions may apply to redistribution; see https://www.ams.org/journal-terms-of-use
W. J. CODY AND HENRY C. THACHER, JR.
f-H i-« O
O s3 O o o o o O O O O Om m %t m r\j »ho o o o o O o o o O O O o
* C^ r- O* o» m o* -tino* (\|HÜ
« • • •* r- m >í-* i
r- o -h oir)hí>0
inconOo> o o oor*mo-¿) O O ulm o m r-
CD nJ- CO O
■o m r- o or- u> o o oco m \û x om o <o ro o
í\í m >o cr oo o o -■* »r\f- I— m r-H IMrû ri a) (>J hrfi m^ o o
rH *0 •-* rH rH
I I
>d- m -4- o o o
H Ul CO N O Oro -4- cu sj- t\j oh in h 1*1 m or-H O t*\ (*- rH O
CC -4- tH C4 <}- o
m 1 1 r- o -4- mt\i x r\jf\J P— m rH) rH coh in >c ry v) h<¡ fO sí- O - ■* LÍ>
(M »h m m -4" *hl I I
fíi co m in m tn om 0s r- 00 in -4- o
X X O O** rH rH O
O (\J n X %0 >t Ot\l '.A X —I *H rH op- cr o r-i r- c* ox o co p- r- o oco H -O -í- rv >o if»
>í- r-H x x r-í m r\iO -4- -O *\ LT* p- —*p^ sí- x o x r— x•o rsj p- o o r- p-O (\J NÛ C1 f, f\l l"\J
v0 HI X rH
I il X Csi
I
INJHO
O <-> Orn rg rH oo 000
«J- m m r-4 oo o O o o
u~v -4- -4- m r\i oO o o o o o
h >í m ^- n im oo o o o o o o
* H H nO
* >J- IN «O* r- ^o -4-* X X rr\* o> vu m* • • •* <-t r\j *o
x o m r-H
-4* r- r- œO sO m -o
•4- m o r-rsi x c» hd
ÍNJ rH o^ mlili
ct* *r x r- mM CO CMM Or\j no m m p*Hni\jfn-T
x m r- o org ínj ,4- m -rO «-* o -4* Ln*o ínj 4 in hm m in lo ím
m r-« rH r*- o
(?) o ím r*i r- >f
x »h ^h c4 m mrH m X f\J ~T r-H
O co -4- P4 r\j r\j41 N rHO1 ^) 4"
(SJ >T C7* X CO r-
0^ -í- 0a h- WD si-ró -4- in sj- x C4x o in p"! -4- mo n Min o1 nm m <m o oj <r
>ÛHfTlHI>Jxllililí
•4- (m r-* p- r*- x xco 4- p- o «N -O r\J4 ^ M ••■* 4" rg r*>ri f<l X 4 p* ^ co
4 4 O CO 4 H Nr- rH in f-H o in mr-< n r- »h en x m(MffiCO Hnnccfnaii uinnu
p-h o ^o o 0 in4 sO cu m l%J ríl 4r- r*> *o o -4,- en r-m »h -4- m m. o m>j- p- x m co x r—
rH -4" r- rH p- rH P—
* O rH r4 û h (\j m 4- OHMm4in^
License or copyright restrictions may apply to redistribution; see https://www.ams.org/journal-terms-of-use
CHEBYSHEV APPROXIMATIONS FOR El(z)
* ** *-~. .-,.—. -~-~ — -» ~ — — .-.-■ —* »cor-f-voin-i-co.-« o>o<eoo)N^.f mri rtoooxoN-oini^H» »oooooooo ooooooooo •-* •-« •-< o o o o o o o* « _ ,-„-».-— _ _ ~ _. _. w — _ .-• —-
* *
« « coumso*oû<jhoo m^N^inNinH^ooft ft O^'OlAOf-O^HO Nffl'tHvOCOO'Û^O« »^ic-i^^o^-owo OiHONKihiOO i"--i-moom*i-mcoo* * HOmmoomo ooioœi»HO'Ha o«(Mn^'t«>HOiMO* *-» • o^HCioinricoo t—ir\ir\coco(\io-i-o o + (MiMnNoooa)o* «oiMO^naioo tM^^mff'O'O'ho oi-*ío<o<-a---icooo* '"^»^i^t^-J-oOíMO rfitoinNCMníiMO .-i.-i.rojif»<OKOC«o« er *(\i>oir»t—fHiníMO NO^O'ONinf^MO wœmhrthM^'ûo« *ir\ir\Or-i(\icor-o iunocioímooo Híin + MinHMtio* «* *f\lh-»J-«-<OinC0O HN^C^OH^O NW'O't't'OíNJOWO* ftr-mf^NÜ^HOiAO f\jr^a^moíNj^*(\iO rn%ocj>cor'-m.-i-i"*í"Ln* *or^m^-ooo.ûo inHiM^-œf-OfuiA cor\ioa*r^a^co*i-inr-* ftOvOh-rvJroo^csJín (Mñ <o h o m o o r*i o* ^ rg ^ oo O ^ a* O co
« »st-moCT-l^ococo f\jr<"it--ocom«-imco r-c»íMOir\co^-sí->ít^* tniMnm^oOH u>r-í\icou-\r—r-iMf- .»-ooixococomooo* »NCKOuiinmM» covOcoo>r-imr-ir>ir\ motoNO^íH+ioft ftinwococnh-O.-» rHO'CM.í'l^-cr'roojrsj a*a*o>rg.-«.o.o^*oco» • >oi>4(McDin^^ t-ir-oJ-r-'J-ino.-í h«xo + o + iMíM'>,o* ft........ ......... ..........* ft^corj^-^-m^m inNoort Hf^cornin t-to^fMinr—■o-í-.-iirif-* »lili lili l l I I l
« «-„-^ -. „.-„ „ „--.—* »oo.oMfimKiMO ooooo>oo**imh rtoomoinoí^H* »OOOOOOOO OOOOOOOOO .-I.-I.HOOOOOOO* ** ft _ ». _-.-. — _ _-.-. — — -, *.»»_ww«»www»
» • a*ococooo-r«Otf>o
•« aiina)o«)OomHin* >i'.O*O.Í-0''C0C0'd-*3- Hr^tOH^-NON®1»
*comcC'Ccco^-mr-i r-irHf«-rHr\jfnmo^o^ pg.omtn«fûOfnr.oo•o*^-o^->ooomj-~o o«c>^o>-<-3-—icir"- ■tíconinomoo
o. *♦ in>j-rocïDLr\o^^^trv oror-crm.a'Ocrm cro^r-iromNOrHOOrnftinrHirvsûh-omo .j-.n.O'^cor—^»-icr1 o-ino^HM^ooío♦ co^'t't'ûcD^ i^mmCT*mir*-J-r-4ro ^•osoxr*-F-*h-^ir*-tN^-*oc\jaot\jvOOOO ^roou^r^NOsOO^sO oo^ornro^fo^o^^r-* OHQ[>CDNHH (O^OHm^MCOH OrrlinCsJ^'tMO'-líNi^-ft* OHin^m^rviin h-tß^o^-WH^^ m^^in^^NOON♦ cor^i^-m-J-romcr' rriooiritM>Or^ooosjf\j cimcofl^o^o^o*rOrHf^oNfnmino> os>i-C7s>i'f-io.Hr*-r*- ro.-íON<\J.í>cominvOv£>* r*.(MNtOC^^.0m E^OJ)CMJ,tD>0^ ^CD(n^-(7,OH(\JO(M• o^«>0(n^(vim c*a*omr\jr*-co.ou"> coo>(Mintío^-r*.rgc^*
* *^(D4-Noo4"ffi r-tcoiNjo^co^^-fNjro cor-»-«.3-i'-coa'r*-.-tc>* ♦inosir-'Omo^io [>(oaia0vOrJ^'ûvû mr-ocor^oocor^o* ».-lo-r-ia-CT'.Ha*^ o-oifi'íceMíiNO <o h n o> m ru n n eo o** »O^COfNJ^I.J-ÍNJ.Í-0 rtlílOClCM'KDHH HtMlí>HinH.f'J'i>JN* *........ ......... ..........ft írnríifN^rj^inco .-icsjf-r<ïcor-<M-4"'-* ^-Hr*if<iiTifOHhíHH* * I I I I I I I II I I I I I I I I
_ft-*
"I"' « OriiMd-tio JJN OrMrgmsririsOi^co Or-iíMco-run-or^cocr-
License or copyright restrictions may apply to redistribution; see https://www.ams.org/journal-terms-of-use
W. J. CODY AND HENRY C. THACHER, JR.
#^. *-.,«. ,— .-.« ÄÄÄÄ mm m-* mm** ~m. M rs r. r» rs «.
* O H rH OOCNÍ H rH rH r-1 H H O N N O r-« r\J O r<1 O* Q OO O O O QOOO ooooo o o o o o o* I I II
**** (ndfn-ícoh* rH r- H X rH rH* Ociin^vD inoxrorHin
* * 0**"CT**4'Oxr-r-"tin.c4*4-*
* OrHOrH vtrooinm -h p— x ro o* P4* vO c> 4(\l m-û^O^ 4 co o h m iA* co »h «4- h fn 4" h -4"Cr,c4r0rH m m o x h »h* NOJr- O rr, o c\j coxoovo o m -4- o fO ro* oco r-* *fr m st-rOvj-in t>i\(t)Or\j in h m 4 cc^
* <HD rHrH XrHO vO O"1 HD P- m X (\| O O P~ Û P- 4" 4" -O* <t NCO O O O >0 O 41 N rHOr-»rOO ^ 4 m O C7^ (M*\0 m x mom rH o O o rHOOP4X ct im m h nj rvj*>í- ^rvi 4coo o in m eg ininrgox in en co ro (\j o*nj o S- o^r-Hin xOO«û4 p*mmcoiN rgHhwcc
* rH OH HCOt? COflHO P- p* CO <NJ H H in (M lA H H* I III
OOrH rHOrHrH O O O rH O OOOrHfHO rHO.HOrHrHOOOO OOQO ooooo oooooo ooooo o o
I I I
* r- x o ro m o o* ino4Hinmin* rH^4-c^(^|^ox^-^4^^JO¡r\xo* ini\HC0(n4 OHOOMACO
* m^J-rHsfX 0> 4- lA CT1 4 rH O X m O H O"1 O* rHvor-oox in h m o o cr* h x o co x m o* m m o m (M *4* x r\i ho o 0> in in o r- o x h rg in h m* nmoM rHOr-íinm o>4cnom4 c^ho^ocon* m*4"in «ûino^iA m tr« m r— cm p- tr m pí in r- cm mj hin com** cm **- omm a- m o o m m m x o co in «o no pi r*- >t o x h h h* o (M in m x rHOP--r- h cr- 0*- p- >4- o 4 ^ 4 co h eg m eg x o x x* rg in O o o iacoh-û cm o p- o -h -4- o x cr> cm p- o r- «h o ro in m* O lA rHrHO CO PI CM 4 O f- X O »H o P- r- h m in HDrHXtnmOO* r- x o %3- p- r- o -4- o o-i-mror— o x x h o o o> m pj n m p-pj*•• ••• •••• ••••• •••••• ••••«••* O rH rH O PO 0> O PI CM HIA P1HÍM HMAfMHPI G^ sí" rH CD> (\i fO rg* I I I t | III III
„*__**OrH OHM O rH CM PO O H PJ fO 4 O-HCNim^-in Ü «-< PJ fO 4" LA O
License or copyright restrictions may apply to redistribution; see https://www.ams.org/journal-terms-of-use
CHEBYSHEV APPROXIMATIONS FOR El(x) 295
•-i m _i m o í\j oo o o o o o o
"tís.s
+ no o «i tfl t« h
»O-OMilriOr— co r- m in m ino cm m t\i r— rH ho> co o- i-- co o^ r—
-o co cm .-i f«. r- mo co .-i m so m oo
l(\ Hm «i o <r oco rH r- ^j- ph *o r--
co >j- >o r~ rH í\í r--orjin o j-oosr o (M ro o co r—i— co co o m o encm r- -4- o c\l o o
« m N H H o di J\
OOJNrIWONOoooooooo OOOOQOOOO
I
i-lrHin-Ocor-cOln^mincoooo>í-T-iror— m .o -a- co cm
o>.h^-^-n}-o>o^co
•ícncMcnmcocMt-ic\jojinr~CMrH>í-comoiMcoo-rr-r—inOHOajaj^of\jv0(\iin-í-0(\io
ina*inino>r-mcn
.0rHCOrHCMr--4-0><t-OrHror»ooincoho>j-nhihí o
• •••••••
I I
OrHt^-r»m(j>>ooo»
-í->0-o>i-cMcMcoinr-
o>oma-í)cM.l-.a-incoorMi-r-o'>cno^cn
r-rHOcoincoinoc*
rHcOrHrHoor-t-coo
N^OIHOCOMilKcsjmr-coo^>j-o>csjr^-t\icoco.í'ou-\a>rom
-í-or-r-.i-rHCMmr-
»H0> (MfOHIDH(XJNOrOH^-J'Hlílocr*rHrMcorHr-*j-co.íOffiíno^^víO1
.........>-<<\i>i-r\jr-co!T,.i-.-t
3
Q.^r-i.-lrHO.-IO
OOOOOOOOrHOOOrHOrHrHOOOOOOOOOOI
rHOOrHrHrHrHrHOO
OOOOOOOOOOI
* o* co
* o* o
> r— co oo o m? co *oi r- r- rH co sf oo o
' Vf\ ST »H 00 rH O r-■roHtMnom
■ m co (Nj m o co cmrH O ISJ in rH oo r-(»ot-mN'to
f-n(Mjio m cmco co o* cm >o co mCM O "H rH lr\ CO rHro o> ro rH oo ro corH o» m co r»! rg ro
HMMN<!0<!CO rH ^J- vO rH rH C0
un cm co r- co o oCM rH rH O O 0> C0ro o en in ro rH rH
CT> ~1" rH 00 rH (N r- * CMrOCMCOrHI—CMOO^rH«Î-COt\lrHrHrHOr-~mOrlNHON^IflO
l~.0-OrHr~CMrH^-CMrHOOOrHOr-0>rHrHmomcocomcorH>oLninaorsi^^-ororo•o-i-cMcn-fr-l-ococo
rH-4-NOinrH0>COr~-*'mr-mr-mcMco-r-r^tncMOf-ocomcoMJOCM^-OOCOrHCO■Or-iNO-NCMrtSi
r--OCMcocM<\iomoin rH o m en r— ro co >rC^rHrHg3rH^r»f»ç>cocococo^-o>CMh-o0>r-rHC0OC0cn.0>J"
Or-cMcoino>(\io<i'-o
rHrHrHCM-OrOCMinCMOrsifMOinrH^í-sj-mrHcoCO^-r-rHO>OmrH.rr-rHh-inininrHinrH^rm<Tr-o~fcocorHincMCM
>o o h r* tfi h m rn m r>oro^-o>aicor4in(M4-cONOmcMincMOOr-rHr-coor-ooo>omr-fiM3>iM-tminc0Hi~
ino^cocMcoin.i'Ocoor-rHO'Tcoo^cM'OCMroooo"-mcM%or-c*incoa»r-inr-ocor-mccot>CO-J-QrHrHtOOXJCMr-
o^romrHvßof^or-r—rHrHCOOr-.OO^rHfO-OrHmcoomincMrHcoincoococMrH^-incMr-^'CMníno^o-tmí
■4- O CO CM 0> CM CM
Il IIcr>m>i'mrHr-CMcocM
■ I IC^CrCOrHCOrHrHCMCMCM
Il III
♦ OrHCMcOM-insOr- OrHCMro^-in^)h-co OHiMfl^inOMnO»
License or copyright restrictions may apply to redistribution; see https://www.ams.org/journal-terms-of-use
w. CODY AND HENRY C. THACHER, JR.
** -»ft r-lft Oft |ft —-4
O OO o
rH rH m
0 o o1 I
O CM rH rH
O O O OrH rH CM O CO
OOOOOI I
rH rH CM O CM rOO O O O O OI I I
*•o *
* O** m* en* 00* r-* m* •* o>
r~ com ooro co
m rHt-> m•O OCM CMO O
o en .oen o ooro co *r- •£ -j-CM co r-
en co m
(MU> N0> 0"- rH
o> n ovaí
•4- <o f- roio m mmO en r— r-CM -1- eo ■*■cm m r- O
m in o* inrH oo co ooo o so coin o co oO ■* rH cr-
omr- + inro cm -4- co co0> O 00 rH rH
cm O O cr- r-m r- -a- -i- -i-CM rH CO CO CMmooNí* -*■ r- t- cm
m m cm o oro o o in rHHO(> n -í0> f- •*■ -i- r~0> r- rH -í co
rH O C* rH rH rH rM rH r- C CO CM CM (MI I
00 O *4" O *0 OCO O ^" rO rH COm ro CO M3 M3 o
ro ro rH m -o -a-m -4- rH a* cm o«J- rH cm rM oo oro cm co o >J- .orH CM O CM 00 en
r- en r- rn co moo -4- o cm ro oin -4- in cm cm roco o eo o rn ina O -a- -o o r-
a- in oo en -a- c*I I
o oo o
rH O OO O oI
O O rH rHo o o O
r~t O f-* O rH
OOOOOI
O O rH O rH rH
O O O O O OO O -H rH O rH O
O O O O o o o
MO Om rHrH tj-
o -j-O r~
CM O mrH CO 0>co in «r
HrtvO-O O I»m r- cmo o rn0-> ~J- rH
ro co oo m.O O rH 00
O -O O CMOí O rH «rJJ rH «T f—
o cm r- inrH C0 00 >J-o m r- o>ohí r-O (M m o
«1ÍNOO
.o rH m m o>ro r- im cm co-í M 0> -O xOOCOHIMr~ o m cm .4-
NHOO +HHO00OsO vO vO ^- r-CMnr-HO0"* ro oo cm in
-I- ^- in rH 4- coin o> o m o oO en co oo rH en
o a- o- r- cm ocm .o co cr- ro inm O CM O rH M3*om«Hj¡Mj m r- r- >r rH
o m r- s* r- oo in co m r— .oo m o c* oo' coO * r- 00 ^- -OO O 00 00 <M cr,
*o in cr cr- r- oo cmin r-A >0 r~* rH CO OO r- C0 -O CM rH M"tO m rH •*• O rH o
in. co ro 4- o rH m-o cj* P— 4" co oo o>su O CM CM m rH vO-O O CM CM -O <t OrH tr 00 P- r- CO rH
rH o cm -í- in in .oO ní- co o co o coO r- in r- cm o vOO .O 00 rH rM rH OO O en IM J3 c o
rH CM
I0^ rH CM
I IHÍMCJÍ
I I0* CM -T rH rH
I IrH ÍM rH .O M" ^O
I I IrH CM CO CM r- IM 0>
II II
C * rH
O rH CSJ O rH IM rO O rH cm ro 4" O -i (M ro -4- m i cm en m- in M3
License or copyright restrictions may apply to redistribution; see https://www.ams.org/journal-terms-of-use
CHEBYSHEV APPROXIMATIONS FOR El(x)
OOHPJHHHO O O O O O O
HHmHPJHHHOOOOOOOO
OrlNmHNHHHOOOOOOOOO
rg o> O ro r- <-* xcm O m x o eg p*-
h cr o in x p- o>o o in 41 O rO (^m o m ro PO P4 mO X rH p- -4- m -4-cm O in p— œ p- r-
O o cm o rn m x>í X O O CM X Xh- o r- x >j- m mo o eg «4* x o inœ cm r- h rn h o
pTl CM O rH O P- OX «4- rH O P- PO Qo o m p- r- x oo po o o p- eg ino -4- x o in r- o>• ••••*•
rH m cm r- cm in oI
H(M^p-H4<ûmcOPO^í-incMCMr-OH4COC04PJHHmrHomxin*4"in
inHinP-xor-pr.r-OOrHrHXOh-PJHfP.lAtT'HHOOP-o-4-xcMinr—»4-omr-oorHin
nHf0ino4OO1A m t> CO 4 co 4 Nmegcj'inOinrHXiA4ininoiAfO(MXOr-HOinOOr-H
cnegx-4-pnegocrlAlALAvONOP-P>OinNPJPJ40Cnoooinxinoooo^egrHxr-r-o
0>O4Hv0NP-lA
XHj-omrHPOin^to
HPjPJCOsOHlAPJ4CO O M? H NfM f<) COP*-CT.OOrHrHinrHO0>>í-KOOpnininoocM^o-4-omincM
CMrHCMrHXXP-inO4(>4OPJOOH0»cnor—oor-jr^teginrHl—XP-OP-CMP-Hfc>rHOmmoinrH
OpnxOfOOOpnegeginomxinmincr»tn0^r-egP--rHr\iOO>C0H44HrP,m4iAmo<4-egr<*iOCMOm
pntnorOrHrHpnoominox^i-xoxst-HfP.HPjOC04fnN0000>fMnO>00ooOr-H^í-ino^-r^
• «•••••••HHHH4 PJIAO O
»hoOtH-ho-hOOOOOOOOOI
00--*r-l>HrHOrHO
OOOOOOOOOíHOrHrHrHi-HrHrHrHO
OOOOOOOOOOI I
inp-pjcMtrininmCOH(M4lAHmH
cMX*4-o-4*rnxoXCr>i"rHPOrHXrMOlAHlA04CMnr-ooeg-4"Ocp,x4(7'C>OinorP.PJ
P'-XOOO^XOOPJ4MnHCOOOrHinxo^í-^mo>cMrHxmo"vininegcorooroo^^o
»4-CMOrHr*rHin>Í-o^cMinooo-4"pnoooo^ininrnoinino^mxoxOCT'P^-l^-CMfMXNJ-
*4-0-4-0P-XX0CMoinOH4p-inoofMr-tcnoinooo>r*-T—rHOCMr-m>í-0>O
H -O O 4 IA -O IA CM3>fHCMXP-O^fOP-rHrHOe-O^f-mP^-egmOrHCMXrOOCP'Op,miAh(MM>'Cn
xinxpofPicrcofricr'fOPJOCOHPJChOP-
r~xrginp^oinoraHHIA4401A HCOinmmrHmr-mrHrn
oo^rnHfrtP-r-mxooorHinomxxOCeirHXrHOOOXOr-XXO^rHXXOOOrHmegr»r*-o
H4^0mPJ4HmPJ
CTNlANmm OOIA4oinxom>3-rnc>cMO04O0 4PJ00N0reiP^-rH^xininegx^j-p- o co4f\iin4coiAH
xxcT-o^egego^fP^-mop*-o^ino>r-4"xpnomcMr*OCD>P*-OfM-4-»4-OrHCMCMPOXXOOrOOC>inO-4"0>4-XCMO
HP)44PtOvino>P-4"soegxocT'Cr'O^mrHCMorOHfnNcroHPJr-rHfMXP^-inOr^C^^Hr-*momi*-CMinorHC4H
ncoM»Hm4^otNooin%3-oxr-oor-o^ineginpo-í-tnooe-O4in(MMr0OO<i4O^XO^-rOrHrHOXO
OrHrHrHmXrHPn
I lilirHCMOOHrOXrH«4-
I I liliOrHegCMPOOCMrHrHrH
I lililí
#OH(M(^4inoN oHpjpi4inop-co OrHCMrO-4-inOr-XO
License or copyright restrictions may apply to redistribution; see https://www.ams.org/journal-terms-of-use
W. J. CODY AND HENRY C. THACHER, JR.
* —* o o o
o oo o oo o o
o o o o rMQ O O O O
O O rH (M O niO O O o o o
.-or-
sO
rj>o
CO 43m r-o or- tncr- 43
4- enI— IMO O»cr. mO* 43
• •r-t (M
r- 4) 43■4- r- cr-43 t- rH
co co r-rH m mm in co-a- rH 43so o r-
o 4- cr-
CT> O 43o co ino ce- m...
rH CM «a-I I
cr> m O r- er-O 0> m rH -oOH4 l>(Mnû^)4NN
cm cm o r— co
co m m co 43cm o cr> r- cm4- o ro r- o-O CO 00 O roCr- rH rH O O
0s rH in rH Off of-ocer* o o r— roo o co cm cmffff Hr-rj
• • • • .rH CM Is- CM rH
I I
co in o C r- co
HMilOffHcm co r- 4r cm Oo in v0 er- in imo co rH oo er ooo a- cm -o 43 co
m O r0 CO O rH-a- m o m -o mNHvOH^r-o ro rH r- ro r-on-í + mr-
o o j- m oo oo o -a- cm o ooocooooo o o 43 -o oo o o r- m rH
CM m rH 4- CO rHI I I
o oo o
o o oo o o
O O O rHo o o o
OOOOHHo o o o o o
rH O O O rH rH rH
o o o o o O OI
o> r~co er-ro m
O mO cmO en
rH roI
O 4" Oo in mlArj 4c- r— oO IM -O
O o ino en 43o o -oo r-< 43o o I—
rH ro 43I I
rH CM -O -O>a- m co r-CM C0 rn rH
4lTi O -Or~ o r— roO ro 4- r-O r- O rHo r- m co
o r- o oo (M o IMo o O COO O CM CMO O IM CM
rH m in rHI I I
m cm er. rn ni o•4- r- o -4- eo rHSTNHO O'COO m m ro 43 cor- tn co r- r-4
O 0> rH 43 in ~a-OCAOHrirflO r- -4- cm ao oOr-MDOCOo r- rH o tr cm
o o ro o r- oO o ro eo 4- OO O CM CO O 00O O CM O" rH r-O O O rH O Is"
rH CO m CT-- rH C\J
I I I I I
43 rH O CM O 4J rH
er m ej >o r- 4 crO rH cr. m ~r eo tnco r- cm en 43 eo enO rH .h r- rn rH r4c* -a- er- 4- o -a- o
Is- in cr- I— O 43 oC7- ÍM rH cr- -4- o oc. -4- o cr- -4- rn rHcr. O 43 CO CM o- roen m o r- co M" 4-
o-CMnoocoo0 o er- IM O cm inen o o o o in -oCT- Cr 43 C- *a" rH -4"Cn O O IM vO ÍM r-
01 (NI 4 CO HH OJII II
O rH im ro im eo 4- in o rH cm c(i ^j- m 43
License or copyright restrictions may apply to redistribution; see https://www.ams.org/journal-terms-of-use
CHEBYSHEV APPROXIMATIONS FOR El(o;)
O O O O CM O eno o o o o o o
*
*
**»»*»
-o*co. *
**
"tí
Sr
(M si- m rH 43 rH rHa» m rH 43 cm en o
oo «a- m o m -4- mO 43 in r- rH im oom -a- cm cm m en 43rH -4* Cr 43 00 00 -4".4- 4- co 43 43 m cm
cm -a- er- -4- 00 43 inen en cm rH 4- -4- 43O (M CM O Cr O CMCr m O ro O 00 43cr 4- cr co ro in m
o 43 <t- m o- «a- inO O O CM O O 4-cr- o 4- rn cr r» r—0> cr O rH m 4- -a-O Cr cr en Cr r- O
• •#••••rH CM r- ~a- CM 43 rH
III I
OOOCMrHIMOfMOOOOOOOO
OOOHHCMNO-tOOOOOOOOO
-4-mmoo.a-meMrHCMroin043Crinff43rOino01n4343CM
cororocrr-eMcromine443rHin4-orHO*-00rHCrrH4TvOm43r-CMiMCr'romr-rHOintM004-cM
CMrOiMCrr-oroooo rH 4-- r- rH o 4* m04343r-r-incMIMOrH43rH00cn43CrOininenrMin-4-.a-
OCMC7-r-00rHCM4r0043 0 43r-CMr-ooin-4-OrHoo-4-0 043rH43CTIMCrOOrHOC04-C0>J-
• ...*.«•CMrOOOrH434-0043
I I I I I
l—CMinoocor-romo43rH43CO000OO>43J-rH430CMCrcMr-rOCO■4-OrHminmoooooOin4 4Mncf HN
rHcrr-r-43st-CT'inr~oo^-cr~l-4r43r-^-»J-•4-IMcniniMCOJ-rHrHococOrH.4-or-.a-4-cr-O-or-OCMinor-
Cr-4»r~4-C0Or0O4)cj>or*-mrHinrMrHrHo-a-menr-ooerr-cr.cr-043.4-cMcnor—cr-coinr—cocMrOrHOs
ffffm r-h ff o Mficro-4-coror-c>r-4rcrcrcMrHCOrHr-CMCocrcrcro4-r-r-r-r—CrcrcrcMOrHenCrcr
• •••••«•«rHIMP-rHr-rHrHCnm
I I I
O O O O -H O O rHOOOOOOOO
ri
rHOOOrHrHOrHrH
OOOOOOOOOI I
OOOOrHOrHrHíMCMOOOOOOOOOO
' * rp f-p- ce pj m pj o* OP^-4-CMOr-mrH** cnrHrn<i-p*-or*-o* COlA44P4inP-H* mxcMxooox* OO0>xr-^-e--î-* opJinpjH^pi^-
* oxrHoinor*-o^* OP'-mr^-orom-^* o o m p^.o o cm ro* OrH<rOOOCMCM* oororHnjrnxo
* OOOOOrHcnO* oo-d-xn-ixox* OOrHCMrOmCMO* OOOOXOrHrH* ooo40foo^m* ••••••••* rHminr-r«~.rHxm* I I I I 1 I
4 H >ß O CM iH fT| CO COorfc-oegp^f-iLnr^-o*'Or-oinoegooeg
o^oroino^cMP^oce,rg^xoooxo^^^r^xmxoo-4-oxc^eg^cnrHp^-rnrHo^oooOrHornm
O1 4 o- co co pi in iA hC^<,C04P1HC?HHOH41NJHN4COPJCT,0>0-4"egegego*>oCTC^HmHCOCOMfl
00(MC04víOOiHocrmNj-p-rHinooO O X IA PI IA 4 NPJOOOCNjr-HLnrHOmCPO^O^^-O^sf-p^rHO
o^CMNj'inegfej1-iso>fI 1 l 1 1
mmmooinoinoooinp-rp.miA4inmoiiAh4cococorn4iArPmmrgxooo^ooegœoo-nromxooe-
4PJQfnv3>OrOO>4avOrHrHOO" m m x eg moxmcMeginoorooOOsHOCMM(()CO>û4
OOromOO'4-Oh-m
OCMrHOCOCMCMCMr-OOro^j-xooocr-r-rgooor-ppi—ix>rorHÜ04MMOMsONOoooo^or-inoox
ooooor*-xo>p~-xO0OHin404PJmOOOXXrHP-OrHrP)oooocMenorHromoooomoe-xegr-
*Hprimr-rHr*-(Mr-H(MrHl l 1 I l I 1 I
* OrHegmsi-moe- OrHegcrj-4-Lnor-x OrHegm-^mop-xo^
License or copyright restrictions may apply to redistribution; see https://www.ams.org/journal-terms-of-use
300 W. J. CODY AND HENRY C. THACHER, JR.
3. Converging Factors. The quantities Cn(x) given by (2.4) are known as con-
verging factors. Tables and extensive theoretical discussions of these quantities are
to be found in Dingle [6], [7] and in Murnaghan and Wrench [8]. Additional ex-
pressions for the Cn(x) can be obtained from the formulations of Wadsworth [9] and
Hitotumatu [10].
Although not of primary importance in our work, expansions of the converging
factors about an arbitrary x are convenient for many purposes. First we note that
the converging factors, for each k = 1, 2, - • -, obey the relation
(3.1) Cn(x) = g ^f ' + ^4^ Cn+k(x) ,j=o nix nix
which follows from (2.3). Letting t = xu/(x + h) in (2.4) we find
1 /"oo .71 — t —th/x
Cn(x + h) = (1 + h/x)n+1 ¿ fo %[ltlx dt.
Expanding the second exponential in a Maclaurin series and using (3.1), this
becomes
«,+^(1+r[^)-s§^^].Reversing the order of summation we have
(3.2) Cn(x + A) - (l + $T \e-»Cn(x) - ± ± *=*£ &±f'1 ,
in which the double series can readily be summed by an obvious extension of
Homer's algorithm. Equation (3.2) can be shown to include for n = 0 the recur-
rences given by Harris [1] and by Miller and Hurst [2].
In addition to its utility for interpolating in a preexisting table of Cn(x), (3.2)
can also be used to generate such a table from a single initial value. Repeated ap-
plication of the expansion with positive h is numerically stable and tends to damp
out errors in the initial value.
4. Generation of the Approximations. The approximation forms and correspond-
ing intervals used are
Eim(x) = ln(x/a;o) + (x — x0)Rim(x) , 0 < x ^ 6 ,
= (ex/x)Rim(l/x) , 6 ^ x ^ 12, 12 ^ x ^ 24 ,
= (ex/x)[l + (l/x)Rlm(l/x)] , 2i^x,
where
x0 = .37250 74107 81366 63446 19918 66580
is the zero of Ei(:r), and the Rim(z) are rational functions of degree I in the numerator
and m in the denominator. The combination of forms and intervals was the best
of many such combinations tried.
The approximations were computed using standard versions of the Remez
License or copyright restrictions may apply to redistribution; see https://www.ams.org/journal-terms-of-use
CHEBYSHEV APPROXIMATIONS FOR El(x) 301
algorithm for rational Chebyshev approximation [11], [12] in 25S arithmetic on a
CDC 3600. All error curves were levelled to at least 3S. Function values were com-
puted as needed using a variety of methods. For small x the standard Maclaurin
series (2.1) was used except in the vicinity of xo, where a Taylor series of the form
(2.2) was used. Harris' scheme [1] was used for 5 ^ x ^ 55 and an economized
asymptotic series for x > 55. The value of xo was determined by Newton's method
applied to (2.1) in 40S arithmetic. The same arithmetic was used to generate the
Taylor series coefficients, and the values Ei(n) necessary for Harris' scheme.
The master function routines were extensively checked for accuracy by com-
paring calculations based on two different methods wherever possible. Additional
comparisons were made against tables, especially those of Murnaghan and Wrench
[8], and against 40S computations with the Maclaurin series. We believe that the
master function routines were accurate to at least 22S, except for x > 55, where
only 20.5S was achieved.
As is indicated in our tabulated results, a number of the approximations obtained
had nonstandard error curves or gave computational difficulty because of near-
degeneracy. (See [13] for a description of this phenomenon.) The situation for the
present choice of approximation intervals is not nearly as bad, however, as the
situation when the form
(ex/x)[l + (l/x)Rlm(l/x)]
was tried for the intervals [8, =°) and [16, °°). In each case a "barrier" which made
high-accuracy approximations difficult to obtain was encountered. This barrier was
signalled by almost an entire counter-diagonal of cases in the Walsh array with non-
standard error curves. Beyond this barrier, increases in the number of coefficients
gave only minor increases in accuracy. For example, the barrier for the [16, <»)
interval occurred for I + m = 4, with the relative error for Ä22 about 2.6 X 10-8 and
that for Ä66 only 1 X 10~12. On the present [24, 00) interval, the vestige of the bar-
rier may be evident in the vicinity of the counter-diagonal for I + m — 6 (see
Table I).
5. Results. Table I lists the values of
Ei(x) - Elm(x)S im = —100 logio max
Ei(.c)
where the maximum is taken over the appropriate interval, for the initial segments
of the various L«, Walsh arrays. Tables II-V present coefficients for all approxima-
tions along the main diagonals of these arrays except for Ä44 for 24 ^ x, which has
essentially the same accuracy as Ä33.
All coefficients are given to accuracies greater than that justified by the maximal
errors, but reasonable additional rounding should not greatly affect the overall
accuracies. Each approximation listed, with the coefficients just as they appear here,
was tested against the master function routines with 5000 pseudo-random argu-
ments. In all cases the maximal error agreed in magnitude and location with the
values given by the Remez algorithm.
6. Use of the Coefficients. An attempt has been made to present the various
rational functions in a well-conditioned form. Thus, the rationals used for the
License or copyright restrictions may apply to redistribution; see https://www.ams.org/journal-terms-of-use
302 W. J. CODY AND HENRY C. THACHER, JR.
interval 0 < x ^ 6 were found to lose significance during evaluation due to sub-
traction of nearly equal quantities unless expressed as ratios of finite sums of shifted
Chebyshev polynomials (see [3])
Rm(x) = ¿' PjTj*(x/6) I ¿' qjTj*(x/6) .y—o ' y-o
These sums are most conveniently evaluated by noting that T*(x) = Tt(2x—1)
and then using the Clenshaw-Rice algorithm [14]. Similarly, the remaining approxi-
mations presented in this paper are found to be well-conditioned in the /-fraction
form
Rnn(l/X) = aa + -&-/ + ~^—/ +■■■+'cti + x a2 -\- x a2 + X
For use on computers with prohibitively large divide-times, the corresponding ratio
of polynomials form may be used with losses of about 2S or 3S in some cases.
The main remaining source of avoidable error in the implementation of these
approximations into computer subroutines is in the handling of x0. If it is desired to
maintain good relative accuracy, i.e. essentially machine precision, in the vicinity
of xo, the quantity (x — x0) should be computed to higher than machine precision to
preserve the low order bits of xo- This can be readily accomplished by breaking xo
into two parts, call them x\ and x%, such that, to the precision desired, xo = xi + x%
and the floating point exponent on x2 is much less than that on x\. This breakup is
most easily accomplished by examining the octal or hexadecimal representation
xo = .27656 24522 55132 77417 11446 06004 161578
= .5F5CA 54AD2 D7F0F 264C316.
Then (x — x0) is computed as (x — x0) = (x—xi) — xi. Additional precautions will
have to be made to compute \xi(x/xo) for x c^. x0. We suggest
ln(x/x0) = ln(l + (x — x0)/x0)
coupled with a special computation of ln(l + y) for small y (usually a few terms in
the Taylor series will suffice). Note that the computation of (x—xo)/xo can be car-
ried out in normal precision once (x — xô) has been determined as above.
Subroutines based on the coefficients and techniques given here and in [4] have
been written at Argonne National Laboratory for the CDC 3600 (single precision)
and the IBM System/360 (short and long precision) computers. Essentially machine
accuracy was obtained in all cases.
Acknowledgements. The authors are indebted to W. Gautschi, H. Kuki and
E. Ng for many helpful discussions of this work. In particular, the approximation
form for the interval (0, 6] grew out of a discussion with W. Gautschi.
Argonne National Laboratory
Argonne, Illinois 60439
University of Notre Dame
Department of Computer Science
Notre Dame, Indiana 465.56
License or copyright restrictions may apply to redistribution; see https://www.ams.org/journal-terms-of-use
CHEBYSHEV APPROXIMATIONS FOR El(x) 303
1. F. E. Harris, "Tables of the exponential integral Ei(i)," Math. Comp., v. 11, 1957, pp.9-16. MR 19, 464.
2. J. Miller & R. P. Hurst, "Simplified calculation of the exponential integral," Math.Comp., v. 12, 1958, pp. 187-193. MR 21 #3103.
3. C. W. Clenshaw, Chebyshev Series for Mathematical Functions, National Physical Labo-ratory Mathematical Tables, vol. 5, Her Majesty's Stationery Office, London, 1962. MR 26 #362.
4. W. J. Cody & H. C. Thacher, Jr., "Rational Chebyshev approximations for the expo-nential integral £,(z)," Math. Comp., v. 22, 1968, pp. 641-649.
5. W. Gautschi, "Computation of successive derivatives of f(z)/z," Math. Comp., v. 20,1966, pp. 209-214. MR 33 #3442.
6. R. B. Dingle, "Asymptotic expansions and converging factors. I. General theory andbasic converging factors," Proc. Roy. Soc London Ser. A, v. 244, 1958, pp. 456-475. MR 21 #2145.
7. R. B. Dingle, "Asymptotic expansions and converging factors. II. Error, Dawson, Fresnel,exponential, sine and cosine, and similar integrals," Proc. Roy. Soc. London Ser. A, v. 244, 1958,
pp. 476-483. MR 21 #2146.8. F. D. Murnaghan & J. W. Wrench, Jr., The Converging Factor for the Exponential
Integral, David Taylor Model Basin Applied Mathematics Laboratory Report 1535, 1963.9. D. van Z. Wadsworth, "Improved asymptotic expansion for the exponential integral
with positive argument," Math. Comp., v. 19, 1965, pp. 327-328.10. S. Hitotumatu, "Some considerations on the best-fit polynomial approximations. II,"
Comment. Math. Univ. St. Paul, v. 14, 1966, pp. 71-83. MR 33 #8085.11. W. J. Cody & J. Stoer, "Rational Chebyshev approximations using interpolation,"
Numer. Math., v. 9, 1966, pp. 177-188.12. W. J. Cody, W. Fraser & J. F. Hart, "Rational Chebyshev approximation using linear
equations," Numer. Math., v. 12, 1968, pp. 242-251.13. W. J. Cody & H. C. Thacher, Jr., "Rational Chebyshev approximations for Fermi-Dirac
integrals of orders -1/2, 1/2 and 3/2," Math. Comp., v. 21, 1967, pp. 30-40.14. J. R. Rice, "On the conditioning of polynomial and rational forms," Numer. Math., v. 7,
1965, pp. 426-435. MR 32 #6710.
License or copyright restrictions may apply to redistribution; see https://www.ams.org/journal-terms-of-use