Computation of Complex Scorer Functions

更新时间:2023-05-22 03:20:01 阅读量: 实用文档 文档下载

说明:文章内容仅供预览,部分内容可能不全。下载后的文档,内容与下面显示的完全一致。下载之前请确认下面内容是否您想要的,是否完整无缺。

CWI is a founding member of ERCIM, the European Research Consortium for Informatics and Mathematics. CWI's research has a theme-oriented structure and is grouped into four clusters. Listed below are the names of the clusters and in parentheses their acrony

Centrum voor Wiskunde en Informatic

aModelling, Analysis and Simulation

Modelling, Analysis and Simulation

GIZ, HIZ: Two Fortran 77 routines for the computation of

complex Scorer functions

A. Gil, J. Segura, N.M. Temme

REPORT MAS-R0223 SEPTEMBER 30, 2002

CWI is a founding member of ERCIM, the European Research Consortium for Informatics and Mathematics. CWI's research has a theme-oriented structure and is grouped into four clusters. Listed below are the names of the clusters and in parentheses their acrony

CWI is the National Research Institute for Mathematics and Computer Science. It is sponsored by the Netherlands Organization for Scientific Research (NWO).

CWI is a founding member of ERCIM, the European Research Consortium for Informatics and Mathematics.CWI's research has a theme-oriented structure and is grouped into four clusters. Listed below are the names of the clusters and in parentheses their acronyms.

Probability, Networks and Algorithms (PNA)

Software Engineering (SEN)

Modelling, Analysis and Simulation (MAS)

Information Systems (INS)

Copyright © 2001, Stichting Centrum voor Wiskunde en Informatica

P.O. Box 94079, 1090 GB Amsterdam (NL)

Kruislaan 413, 1098 SJ Amsterdam (NL)

Telephone +31 20 592 9333

Telefax +31 20 592 4199

ISSN 1386-3703

CWI is a founding member of ERCIM, the European Research Consortium for Informatics and Mathematics. CWI's research has a theme-oriented structure and is grouped into four clusters. Listed below are the names of the clusters and in parentheses their acrony

GIZ,HIZ:TwoFortran77Routinesforthe

ComputationofComplexScorerFunctions

AmparoGil

DepartamentodeMatem´aticas,UniversidadAut´onomadeMadrid,28049,Madrid,Spain

JavierSegura

DepartamentodeMatem´aticas,UniversidadCarlosIIIdeMadrid,28911-Legan´es,Madrid,Spain

NicoM.Temme

CWI,Postbus94079,1090GBAmsterdam,TheNetherlands

e-mail:amparo.gil@uam.es,jsegura@math.uc3m.es,nicot@cwi.nl

ABSTRACT

TwoFortran77routinesfortheevaluationofScorerfunctionsofcomplexargumentsGi(z),Hi(z)andtheirderivativesarepresented.Theroutinesarebasedontheuseofquadrature,Maclaurinseriesandasymptoticexpansions.ForrealzcomparisonwithapreviouscodebyA.J.MacLeod(put.Appl.Math.53(1994))isprovided.

2000MathematicsSubjectClassi cation:33C10,65D20,65D32,30E10.

KeywordsandPhrases:Scorerfunctions,inhomogeneousAiryfunctions,numericalalgorithm,complexvalues,quadratureofintegrals,asymptoticexpansion.

Note:WorkcarriedoutunderprojectMAS1.2Analysis,AsymptoticsandComputing.ThisreporthasbeenacceptedforpublicationinACMTransactionsonMathematicalSoftware.

1.Introduction

ThisalgorithmcomputestheScorerfunctionsGi(z)andHi(z)inthecomplexplane.ScorerfunctionsaresolutionsoftheinhomogeneousAirydi erentialequations

1Gi′′ zGi= ,π

withinitialvalues

Gi(0)=1Hi(0)=1Bi(0)Hi′′ zHi=1,πAi(0)=,Γ(2/3)(1.1)=3′Ai′(0)=1Hi′(0)=1Gi′(0)=Bi(0)= 3Γ(1/3).(1.2)

BecauseScorerfunctionsandAiryfunctionssolvetheinhomogeneousequationw′′ zw=K,withKconstant,Scorerfunctionsappearinasymptoticexpansionsforinhomogeneousequationsaroundaturningpoint([9],Pg.429).Scorerfunctionsappearinanumberofapplicationsinphysicsandchemistry(see,forexample,[7,8,11]forrealvariablesand[10]forcomplexvariables).

CWI is a founding member of ERCIM, the European Research Consortium for Informatics and Mathematics. CWI's research has a theme-oriented structure and is grouped into four clusters. Listed below are the names of the clusters and in parentheses their acrony

2

PropertiesoftheScorerfunctionsaregiveninChapter10of[1].In[3]stableintegralrepresentationsoftheScorerfunctionshavebeenderived,withadiscussionofmethodsfornumericalquadrature.Relevantpropertiesandconclusionsfromourearlierpaperwillbegiveninthenextsection.

FortheevaluationofrealargumentScorerfunctions,20Dcoe cientsofChebyshevexpansionsforGiandHiaregivenin[8].Forcomplexargumentnopublishedalgorithmsseemtobeavailable.Weprovideanalgorithm,basedonMaclaurinseriesforsmall|z|,quadratureforintermediatevaluesandasymptoticexpansionsforlarge|z|.InthealgorithmweusealsovaluesoftheAiryfunctionAi(z)andBi(z),whicharecomputedbyalgorithmsgivenin[5].

TheprogramgivestheoptionofcomputingscaledScorerfunctionsinordertoenlargetherangeofcomputationinthesectorsofthecomplexplanewherethefunctionsbecomeexponentiallylargeforlarge|z|.

Therelativeaccuracyforthemodulusofthefunctionsisbetterthan10 12,except,ofcourse,neartheirzeros,wheretheaccuracymustbeinterpretedasabsoluteaccuracy.Regardingthecomputationofthephaseofthefunctions,10 12istheabsoluteaccuracy.See[5],forfurthercommentsontheaccuracyclaimswhencomputingfunctionsinthecomplexplanein niteprecisionarithmetic.

TheaccuracyofthecodesislimitedbytheaccuracyinthecomputationoftheAiryfunctionsAi(z)andBi(z)inthesectorsofthecomplexplanewhereconnectionformulas(2.2),(2.4)and(2.3)areused.Giventhatthecodesin[5]provideanaccuracybetterthan10 13,aconservativeclaimforScorerfunctionsisthattheaccuracyisbetterthan10 12(theaccuracyforHi(z)isbetterinthesectorwhereconnectionformulasarenotused).Similarlyasdescribedin[5],theaccuracyinthecomputationoftheunscaledScorerfunctionsHi(z)andGi(z)willgraduallyworsenaslarger|z|values(|z|>30)areconsidered,particularlywhenrelationsinvolvingAiryfunctionsarerequired(Eqs.(2.2)-(2.4))andAiryfunctionsaredominantforlargez.Thisdegradationinaccuracyiseliminatedbyscalingthefunctionsinthesesectors(seeSection2.2).SimilarlyasforAiryfunctions,thereisacaseforwhichnotevenscalingavoidstheaccuracydegradation:relativeaccuracyinthecomputationofGi(z)onthenegativerealaxisisgraduallylostaslarger|z|isconsidered,andthisdegradationissimilarasdescribedin[5](becauseGi( x)~Bi( x)forlargex).

2.Methodofcomputation

Webrie ysummarizetheresultsof[3]andindicatethenumericalmethodsfordi erentregionsinthecomplexplane.

SeveralsymmetryrulesandconnectionformulasareavailableforcomputingtheScorerfunctions.Somerelationsproducelargenumericalerrors,becauseofcancellation,andtheserelationsshouldbeavoided.Asexplainedin[3],thedirectevaluationofthefunctionHi(z)isneededinacertainsectorinthecomplexplane;intherestofthecomplexplane,stableconnectionformulasareavailable.Conjugationwillbeusedthroughout.

Wehavethefollowingstableschemes.

SchemeforHi(z):

Ifphz∈[2π,π]thenusequadratureoftherepresentation

∞131ezt tdt,Hi(z)=π0

Ifphz∈[0,π[thenusetheconnectionformula

2πi/32πi/3 πi/6 2πi/3+2e.Hi(z)=eHizeAize(2.1) (2.2)

CWI is a founding member of ERCIM, the European Research Consortium for Informatics and Mathematics. CWI's research has a theme-oriented structure and is grouped into four clusters. Listed below are the names of the clusters and in parentheses their acrony

3

SchemeforGi(z)):

Ifphz∈[2π,π]thenusetheconnectionformula

Gi(z)=Bi(z) Hi(z).

2Ifphz∈[0,π[thenusetheconnectionformula

2πi/32πi/3Gi(z)= eHize+iAi(z)(2.3)(2.4)

Theseschemesareslightlydi erentfromtheonesin[3].Theconnectionformula(2.4)isnotgivenin[3],butfollowsfromcombining(2.7)and(2.8);seealso(3.17).ThequadratureruleisusedinthesectorwhereHi(z)isoforderO(1/z)forlargez;see(2.11).InothersectorstheScorerfunctionsmaybecomeexponentiallylargeatin nity,andthesecasesaregovernedbytheconnectionformulaswiththeAiryfunctions.

Themethodofcomputationofthederivatives,Gi′(z)andHi′(z),consistintakingthederivativeofEqs.(2.1)-(2.3).Forinstance,takingthederivativewithrespecttozinEq.(2.1)wehave:

1Hi′(z)=π ∞tezt tdt,13(2.5)

whichcanbecomputedconsideringthesamemethodwenextdescribeforthecomputationofHi(z).In[3],itwasdiscussedhowtocomputetheintegralforHiin(2.1)inanumericallystablewaybyproperlydeformingtheintegrationpathinordertoavoidoscillationsoftheintegrand.Wewrite

z=x+iy,

wheret=u+iv,φ(t)=13t zt=φr(u,v)+iφi(u,v),3113u uv2 xu+yv,φi(u,v)=u2v v3 xv yu.33

Then,weintegratealongthecontourde nedbyφi(u,v)=0,whichstartsattheoriginandrunsintoavalleyoftheintegrand.Weobtain

1∞

φr(u,v(u))Hi(z)=eh(u)du,(2.6)π0φr(u,v)=wherev(u)isthesolutionofφi(u,v)=0,and

h(u)=1+i2uv ydv(u)=1+i2.duv u2+x

Inthiswaytheintegralbecomesnon-oscillating.Neartheupperboundaryofthesectorphz∈[2π,π],√thatis,nearthehalf-liney= xx<0,therelationbetweenvandubecomessingular;inthiscase,itisbettertouseadi erentrelation.Weuseasimplerelationthat tstheexactsolutionofφi(u,v)=0atu=0andatu=∞bywriting

yuv(u)= ,xu2+1

Thisgives

1Hi(z)=π ∞dv(u)y1 u2= dux(u2+1)2e φr(u,v(u)) iφi(u,v(u))h(u)du,(2.7)

CWI is a founding member of ERCIM, the European Research Consortium for Informatics and Mathematics. CWI's research has a theme-oriented structure and is grouped into four clusters. Listed below are the names of the clusters and in parentheses their acrony

4

whereagainh(u)=1+idv(u)/duwiththenewexpressionforthederivative.Representation(2.7)hasoscillationsintheintegrand,butthesedonotcauseanydi cultiesinthequadrature.Itisimportantthatv(u) tstheexactsolutionatu=0inordertoreducethenumberofoscillationsforsmallu,wherethemaincontributionstotheintegralcomefrom;ofcourse,choosingthesamebehaviouratu=∞isalsocrucialtoensurethattheoscillationsatlargeudonotcontributesigni cantlytothecomputationoftheintegral.Inthisway,theoscillationsforsmalluareeliminatedorreducedandthecontributionsforlargeuarenegligible. ∞Theintegralsin(2.6)and(2.7)areoftheform0f(u)du,wherefisanalyticinaneighborhood

3of[0,∞).Forlargeuwehavef(u)=O(exp( u)),hencefisdecreasingveryfastat∞.

Bywritingu=ln(1+es)theintegralistransformedinto

∞ ∞esdssf(u)du=f(ln(1+e))1+e0 ∞

andtoimproveconvergenceat ∞afurthersubstitutions=sinhtisused.Thetrapezoidalruleisverye cientonthistypeofintegralsofanalyticfunctions;see[4].

2.1Seriesexpansions

Thequadraturemethodworksforallcomplexzintheindicatedsectors.Fore ciencyreasons,powerseriesandasymptoticexpansionsareusedwhenpossible.

ThefunctionsGiandHiareentirefunctions.ThepowerseriesforHifollowseasilyfrom(2.1),andreads

∞∞

113k+11 zkt(k 2)k Hi(z)=dt=3Γtehk,hk=.(2.8)πk!30k=0

ForGisuchasimplederivationisnotavailable.However,byusing(see(2.8)of[3])

1 2πi/3 2πi/3 2πi/3 2πi/3HizeHize+e,Gi(z)= e2

2gk= hkcosπ(k+1).3(2.9)itfollowsthat∞1 zkgk,Gi(z)=πk!k=0(2.10)

Thepowerseriesareusedfor|z|≤1.5.Forlargezwehavetheasymptoticexpansion:

∞ (3s+2)!121Hi(z)~ ,z→∞,|ph( z)|≤1+3π δ,πzzs=0s!(3z3)s3(2.11)

δbeinganarbitrarypositiveconstant.Weusethisexpansionfor|z|≥20,andtoavoidtheboundary2π,π].Thiscorrespondswiththe rstiteminScheme1.Anofthesectorofvaliditywetakephz∈[asymptoticexpansionforGiisalsoavailable

∞ (3s+2)!1π11+3,z→∞,|ph(z)|≤ δ,(2.12)Gi(z)~ πzzs=0s!(3z3)s3

Weusethisexpansionfor|z|>30,|phz|<π/3 0.3.

CWI is a founding member of ERCIM, the European Research Consortium for Informatics and Mathematics. CWI's research has a theme-oriented structure and is grouped into four clusters. Listed below are the names of the clusters and in parentheses their acrony

5

2.2Scalingthefunctions

ThescalingofthefunctionsisrelevantforHi(z)inthesectorphz∈[ π,π],wherethefunction

increasesexponentiallyforlarge|z|.Thedominantfactorintheasymptoticbehaviorisexp(ζ)with3

ζ=2z.Inthiscase,wede nethescaledfunction(seeEq.(2.2))by

3/223/2 ze 2πi/3) z)≡e 2

zHi(Hi(z)=e2πi/3e zHi(ze2πi/3)+2e πi/6Ai((2.13)

3.Descriptionoftheroutines

WenowdescribetheinputsandoutputsofthemainroutinesforthecomputationofHi(z)andGi(z)(GIZandHIZ,respectively).

TheroutineGIZdependsonHIZ,andbothHIZandGIZcalltheexternalcodesAIZandBIZforthecomputationofthecomplexAiryfunctionsAi(z)andBi(z)[5].

BothGIZandHIZcallthefunctionD1MACHtoobtainthemachinedependentconstants(over owandunder ownumbersandthesmallestrelativespacing).Thisroutineisincludedinthepackage;also,itcanberetrievedfromtheNetlibrepository(/blas/d1mach.f).SUBROUTINEHIZ(IFACH,X,Y,REH,IMH,REHP,IMHP,IERROH)

INPUT:

IFACH:

IFACH=1,thecodecomputesHi(z)andHi′(z).

IFACH=2,thecodecomputesscaledScorerfunctionsinthesectorph(z)∈[ π/3,π/3]

andunscaledScorerfunctionsintherestofthecomplexplane.

X:realpartoftheargumentZ

Y:imaginarypartoftheargumentZ

OUTPUT:

REH:realpartoftheScorerfunctionHi(z).

IMH:imaginarypartoftheScorerfunctionHi(z).

REHP:realpartofthederivativeoftheScorerfunctionHi′(z).

IMHP:imaginarypartofthederivativeoftheScorerfunctionHi′(z).

IERROH:error agforover ow/under owproblemsintheevaluationofunscaledScorerfunc-

tionsHi(z),Hi′(z).IfIERROH=1,thecomputationwassuccessful.IfIERROH=2,theScorerfunctionsunder oworover ow.

TheroutineHIZdependsonthefollowingsubroutines(includedinthecode): z)isthescaledfunctioncomputedbythecodeBIZ[5].whereBi( isthescaledAiryfunction,whichiscomputedbythecodeAIZ[5].IntheremainingpartwhereAioftheplaneHi(z)isoforderO(1/z);see(2.11).2π,2ForGi(z)thescalingisrelevantwhenph( z)∈[ π].Connectionformulas(2.4)and(2.3) =exp(ζ)Giwehave:givethepossibilityofrescalingGi;de ningGi 23/2z z)= e2πi/3e z)forπ/3≤|phz|≤2π/3,Gi(Hize2πi/3+iAi((2.14)23/2 z)= ezHi(z)+Bi( z)for2π/3<|phz|≤π,Gi(

CWI is a founding member of ERCIM, the European Research Consortium for Informatics and Mathematics. CWI's research has a theme-oriented structure and is grouped into four clusters. Listed below are the names of the clusters and in parentheses their acrony

6

1.HIZINT:implementsthetrapezoidalruleforHi(z)andHi′(z).

2.HIZSER:computesthepowerseriesforHi(z)andHi′(z).

3.HIZEXP:computestheasymptoticexpansionforHi(z)andHi′(z),whichisappliedinthesector2π/3≤phz≤π.

4.Auxiliaryroutines:

INTT(calledbyHIZINT),INTU(calledbyINTT)

SUBROUTINEGIZ(IFACG,X,Y,REG,IMG,REGP,IMGP,IERROG)

INPUT:

IFACG:

IFACG=1,thecodecomputesGi(z)andGi′(z).

IFACG=2,thecodecomputesscaledScorerfunctionsinthesectorπ/3≤ph(z)≤π

(andthecomplexconjugatedsector)andunscaledScorerfunctionsintherestofthe

complexplane.

X:realpartoftheargumentZ

Y:imaginarypartoftheargumentZ

OUTPUT:

REG:realpartoftheScorerfunctionGi(z).

IMG:imaginarypartoftheScorerfunctionGi(z).

REGP:realpartofthederivativeoftheScorerfunctionGi′(z).

IMGP:imaginarypartofthederivativeoftheScorerfunctionGi′(z).

IERROG:error agforover ow/under owproblemsintheevaluationofunscaledScorerfunc-

tionsGi(z),Gi′(z).IfIERROG=1,thecomputationwassuccessful.IfIERROG=2,theScorerfunctionsunder oworover ow.

TheroutineGIZdependsonthefollowingsubroutine(includedinthecode):

GIZSER:computesthepowerseriesforGi(z)andGi′(z).420

315

210yy

15

0 4 20240 20 1001020

xx

Figure1.(A)Pointsofdiscrepancyforanaccuracybetterthan10 12betweenseriesandintegralrepresentationsforHi(z).(B)Sameforthediscrepancybetweenasymptoticexpansionsandintegralrepresentations.A)B)

CWI is a founding member of ERCIM, the European Research Consortium for Informatics and Mathematics. CWI's research has a theme-oriented structure and is grouped into four clusters. Listed below are the names of the clusters and in parentheses their acrony

7

putationalaspects

Inordertodeterminetheregionofapplicabilityofpowerseries(Eqs.(2.8)and(2.10))andasymptoticexpansions(Eqs.(2.11)and(2.12)),wehavecomparedthesemethodswithintegralrepresentations.InFig.1weshowthecomparisonforseries(Fig.1A)andasymptoticexpansions(Fig.1B).Thepointsofdiscrepancyforanaccuracybetterthan10 12forHi(z)areplotted.Ascommentedinsection

2.1,theasymptoticexpansionforHi(z)isusedinthesectorph( z)≤π/3whileforph(z)<2π/3wecombineEqs.(2.2)and(2.11).

Fromthe gures,weconcludethat,forHi(z),asafechoiceistheuseofseriesfor|z|<1.5andasymptoticexpansionsfor|z|>20.Intherestofthecomplexplane,integralrepresentationsand/orconnectionformulaewillbeused.ForGi(z)similarargumentsareconsideredandseriesareusedfor|z|<1.5whiletheasymptoticexpansionisusedfor|z|>30and|phz|<π/3 0.3.

4.1Numericalveri cation

Weareusingseveralconnectionformulasintheroutines,andotheronesareavailableforcheckingthecodes.However,theseremainingformulasaretrivialconsequencesoftheonesusedinthecodes.Also,wecouldconsiderWronskianrelationslike,forinstance([1]),

z1Gi(z)Hi′(z) Gi′(z)Hi(z)=Bi(t)dt,π0

however,thisrelationisnotsuitableforcheckingbecauseoftheintegralofBi(z).

AnalternativewayfortestingisbasedonlocalTaylorseries[2]

Hi(z+w)=∞ wk

k=0k!Hi(k)(z),(4.1)

wherethederivativescanbeobtainedfromtherecursion

Hi(k+3)(z)=zHi(k+1)(z)+(k+1)Hi(k)(z)k≥0,(4.2)whicheasilyfollowsfrom(2.1).InitialvaluesHi(z)andHi′(z)arecomputedbyourcode,thevalue).Therecursion(4.1)ofHi(2)(z)followsfromthedi erentialequationin(1.1)(Hi(2)(z)=zHi(z)+alsoholdsforderivativesofGi(z).

Forthescaledfunctions,theadditionformulareads:

∞ wk Hi(k)(z),k!

ζ (k)(2)(2)z3/2andHi z)+;Hiwhereζ=(z)denotescaled(z)isgivennowbyHi(z)=zHi( (k)derivatives,thatis:Hi(z)=e ζHi(k)(z).

Aswenextdescribe,thistestindicatesthattheaccuracyofthealgorithmsisbetterthan10 12.Theerrorshouldbeinterpretedasin[5]inthesensethatonlyabsoluteaccuracymakessensewhenafunctionisclosetoazero.

Ofcourse, rstonehastocheckthenumericalfeasibilityoftheaccuracytestbasedonlocalTaylorseries.Therecurrencesforthecomputationofthederivativesareseentobecomeunstableforforwardcomputationincertainsectorsofthecomplexplaneandspeciallyforlarge|z|;inparticular,therecurrencescannotbeusedtocomputehighderivativesofHi(z)whenthefunctionisalgebraicallydecayingas|z|→∞(in|ph( z)|<2π/3)andthesameistrueforGi(z)in|ph(z)|<π/3.Thismeansthatwshouldbechosensmallenoughtoensurethatthenumberofderivativestobecalculatedissmallenough.Wehavecheckedthatw=0.1isareasonableselection:itisnottoosmall(ofcourse z+w)=eHi(ζ[1 (1+w/z)3/2](4.3)k=0

CWI is a founding member of ERCIM, the European Research Consortium for Informatics and Mathematics. CWI's research has a theme-oriented structure and is grouped into four clusters. Listed below are the names of the clusters and in parentheses their acrony

8

w=0isnotacheckatall),nottoolarge(notmanyderivativesarerequired).ThenumberoftermsneededintheTaylorseriesisnumericallyobtainedbystoppingthesumwhenthelasttermisnegligiblewithrespecttotheaccumulatedsum(weforcetherelativecontributiontobesmallerthanthesmallestrelativespacingofthemachine).Preciselyinthesectorswheretherecurrenceismoreunstableforlargez,lesstermsoftheTaylorseriesareneeded;thisisasexpectedgiventhatthesuccessivederivativesbecomesmallerandsmaller,ascanbeunderstoodfromtheirasymptoticbehaviour(Eqs.(2.11)and(2.12)).Withthis,thetestturnsouttobefeasibleforcheckingthealgorithmsto10 12accuracy.Indeed,wehaveappliedEq.(4.1),usingtherecurrenceswithstartingvaluesHi(z)andHi′(z)obtainedfromourcodeandrepeatedthesamecomputationwithrandomlyperturbedinitialvalues,withrelativeperturbationssmallerthanouraccuracyclaim(10 12)).Wehavecheckedthatbothcomputationsareconsistentamongthemwithinanaccuracyof10 12.ThesameanalysishasbeencarriedoutfortheGi(z)function. z+w)comparingthedirectInFig.2wechecktheerrorsintheevaluationofHi(z+w)andHi(

computationbythecodeHIZandtheuseofEqs.(4.1)and(4.3)foranaccuracyof10 12.Aspreviouslycommented,wetakew=0.1(otherselectionsofwgivesimilarresultsprovided|w|issmallenough).

ThepointsofdiscrepancyshowninFig.2AcorrespondtothelevelcurveswheretherealorimaginarypartsofHi(z)vanish.Thecurvescorrespondingto Hi=0and Hi=0intersectatthecomplexzerosofHi(z)whichlieabovetherayphz=π/3[6].Thecheckforthemodulusshowsnodiscrepanciesforarelativeaccuracyof10 12,exceptclosetothezerosofthefunctionwhereonlytheabsoluteerrormakessense.Theverticallinere ectsthefactthatHi(z)becomespurelyimaginaryasz→i∞(Eq.(2.11)). z)(|phz|<π/3).ThearcappearingFig.2BcorrespondstothesametestforthescaledfunctionHi( =0.Nozerosofthefunctionappearinthissector.inthe gurecorrespondstoalevelcurve Hi

152

1.5

10

1y

5y

00.5 5051015000.511.52

x+wx+w

Figure2.PointswheretherelativedeviationsforthecomputationofthephaseofHi(z+w)(A)through(4.1)andHi(z+w)(B)through(4.3)aregreaterthan10 12comparedwithdirectcomputation.InFigureBwealsoplotthelineph(z+w)=π/3,whichisthelimitofvalidityofthescalingforHi(z+w).A)B)

z+w)comparingtheirInFig.3wecomputethedeviationsintheevaluationofGi(z+w)andGi( z+w).directcomputationwiththecorrespondingTaylorseries(4.1)forGi(z+w)and(4.3)forGi(

CWI is a founding member of ERCIM, the European Research Consortium for Informatics and Mathematics. CWI's research has a theme-oriented structure and is grouped into four clusters. Listed below are the names of the clusters and in parentheses their acrony

9

Pointswheretherelativedeviationisgreaterthan10 12areplotted.200.4

150.3

100.2y

5y

010200.10 100 10 8 6 4 20

x+wx+w

Figure3.PointswheretherelativeerrorinthecomputationofthephaseofGi(z+w),comparingTaylorseriesaroundw=0withthedirectcomputationbythecodeGIZ,isgreaterthan10 12(A).Similarly,thecorrespondingdiscrepanciesfoundintheevaluationofthephaseofGi(z+w)withinarelativeaccuracyof10 12areshown(B).A)B)Fig.3AshowssimilarcharacteristicsasFig.2A.ThecomplexzerosofGi(z)liebelowtherayphz=π/3.Inaddition,Gi(z)hasin nitelymanynegativerealzeros.Thesametestforthemodulusshowscompleteagreementwithin10 12accuracyexceptveryclosetothezerosofthefunctionwhere z)onlyabsoluteerrormakessense.Fig.3BshowsthesamecheckforscaledScorerfunctionGi( z)(whicharetherealnegativefocusinginaregionnearthenegativerealaxis,wherethezerosofGi( =0and Gi =0,whichzerosofGi(z))lie.Thecurvesofdiscrepancyarethelevelcurves Gi

touchatthezerosofthefunction.Noothererrorsareobservedforthescaledfunctioninitssectorofde nition.

ForthederivativesofHi(z)andGi(z)theresultsaresimilar,withtheonlyadditionofasymptoticallevelcurvescorrespondingtozerorealorimaginaryparts.ThefunctionHi′(z)becomespurelyrealontherayphz=π/2andpurelyimaginaryontherayphz=3π/4as|z|→∞,while,asymptotically,Gi′(z)becomespurelyimaginaryontherayphz=π/4.

1515

1010

yy

55

0 50510150 50510

x+wx+w

Figure4.PointswheretherelativedeviationsinthecomputationofthephaseofHi′(z+w)(A)andGi′(z+w)

(B)aregreaterthan10 12(comparingTaylorseriesaroundw=0withdirectcomputation).Theraysph(z+w)=3π/4

(A)andph(z+w)=π/4(B)arealsoshown(dashedlines).A)B)

Allthediscrepanciesshowninthe guresarenaturalandunavoidablein niteprecisionarithmetic.Therefore,ourcodeisconsistentwith10 12accuracy,inthesensedescribedin[5].

AfurthercheckisprovidedbythecomputationofthezerosofScorerfunctions.In[6],asymptotic

CWI is a founding member of ERCIM, the European Research Consortium for Informatics and Mathematics. CWI's research has a theme-oriented structure and is grouped into four clusters. Listed below are the names of the clusters and in parentheses their acrony

10

ingestimatedvaluesfromtheasymptoticexpansions,theNewton-Raphsonmethod,usingthevaluesofthefunctionsandthederivativesprovidedbyouralgorithms,convergedtothezeroswithatleast10 12accuracy.

4.2ComparisonwithMacLeod’scode:realz

Asmentionedbefore,in[8]20Dcoe cientsofChebyshevexpansionsforGi(positiverealz)andHi(negativerealz)aregiven.FortherestoftherealaxisconnectionformulaswithAiryfunctionsareused.WetestedourcodeagainsttheseChebyshevexpansions.

InFig.5Aweplot log10( ),with therelativeerrorwhencomparingthenumericalvaluesobtainedbyourcodeforHi(z)withMacLeod’scode.Fig.5BisanalogoustoFig.5AbutforGi(z).Fig.5showsthatourcodeisconsistentwithanaccuracybetterthan10 12ontherealaxis.Thetwodi erentregionswhichareapparentinthe gurescorrespondtotwodi erentmethodsofcomputation:quadraturerulesformoderate|z|andasymptoticexpansionsforlarger|z|.Theuseofseriesfor|z|<1.5isnotnoticeableasadi erentpattern.1616

log(error)

15 log(error)15.515.5

15

14.5 100 80 60 40 20014.5020406080100

xx

Figure5. log10(error)forthecomparisonofthenumericalvaluesobtainedbyourcodeforHi(z)(A)(interval

[ 100:0])andGi(z)(B)(interval[0:100])withMacLeod’scode.A)B)

4.3CPUtimes

Themostdemandingprocessinthealgorithmisthecomputationoftheintegralrepresentation.Consequently,theslowestcomputationsareformoderatevaluesofz(1.5≤|z|≤20).Forexample,inaPentiumII350MHzPC(runningg77underDebianLinux2.1),thetypicalCPUtimesfortheevaluationofonevalueofHi(z)intheprincipalsector(2π/3≤|phz|≤π),are:20µswhenseriesorasymptoticexpansionsareusedand450µswhenintegralrepresentationsareconsidered.

Acknowledgements.A.Gilacknowledges nancialsupportfromMinisteriodeCienciayTecnolog´ a(BFM2001-3878-C02-01).Theauthorsthanktheeditorandtherefereesforthevaluablecommentsonthe rstversionofthepaperandFortranprograms.

CWI is a founding member of ERCIM, the European Research Consortium for Informatics and Mathematics. CWI's research has a theme-oriented structure and is grouped into four clusters. Listed below are the names of the clusters and in parentheses their acrony

11

References

1.AbramowitzM.,I.Stegun(Eds).HandbookofMathematicalFunctions.NationalBureauofStan-

dards.AppliedMathematicsSeries,no.55.U.S.GovernmentPrintingO ce,WashingtonDC(1964).

2.CodyW.J.,L.Stolz.TheuseofTaylorseriestotestaccuracyoffunctionprograms.ACMTrans.

Math.Soft.17(1)(1991)55-63.

3.GilA.,J.Segura,N.M.Temme.Onnon-oscillatingintegralsforcomputinginhomogeneousAiry

put.70(2001)1183-1194.

4.GilA.,J.Segura,putingcomplexAiryfunctionsbynumericalquadrature.

Numer.Algorithms.30(1)(2002)11-23.

5.GilA.,J.Segura,N.M.Temme.AIZ,BIZ:TwoFortran77routinesforthecomputationofcomplex

Airyfunctions.ACMTrans.Math.Soft.28(3)(2002)??–??.

6.GilA.,J.Segura,N.M.Temme.OnthezerosoftheScorerfunctions.Acceptedforpublicationin

J.Approx.Theory.

7.S-Y.Lee.TheinhomogeneousAiryfunctions,Gi(z)andHi(z).J.Chem.Phys.72(1)(1980)332-

336.

put.Appl.Math.53(1994)

109-116.

9.F.W.J.Olver.AsymptoticsandSpecialFunctions.ReprintedbyA.K.PetersLtd.,1997.

10.M.V.Romalis,W.Happer.Inhomogeneouslybroadenedspinmasers.Phys.Rev.A60(2)(1999)

1385-1402.

11.A.S.Sakharov,M.A.Tereshchenko.Trapped-electrontransportinducedbyECRHinStellarators.

Stellaratornews45(1996)1-2.

本文来源:https://www.bwwdw.com/article/3hj4.html

Top