Files
calc/cal/test8900.cal
2017-05-21 15:38:58 -07:00

1642 lines
89 KiB
Plaintext

/*
* test8900 - 8900 series of the regress.cal test suite
*
* Copyright (C) 2013 Christoph Zurnieden
*
* test8900 is open software; you can redistribute it and/or modify it under
* the terms of the version 2.1 of the GNU Lesser General Public License
* as published by the Free Software Foundation.
*
* test8900 is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General
* Public License for more details.
*
* A copy of version 2.1 of the GNU Lesser General Public License is
* distributed with calc under the filename COPYING-LGPL. You should have
* received a copy with calc; if not, write to Free Software Foundation, Inc.
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* @(#) $Revision: 30.4 $
* @(#) $Id: test8900.cal,v 30.4 2013/08/11 08:22:01 chongo Exp $
* @(#) $Source: /usr/local/src/bin/calc/cal/RCS/test8900.cal,v $
*
* Under source code control: 2013/08/11 01:31:28
* File existed as early as: 2013
*/
static __CZ__eps = 1e-20;
/*
* load once, the calc resource functions contribued by Christoph Zurnieden
*/
read -once bernpoly.cal;
read -once brentsolve.cal;
read -once constants.cal;
read -once factorial.cal;
read -once factorial2.cal;
read -once lambertw.cal;
read -once lnseries.cal;
read -once specialfunctions.cal;
read -once statistics.cal;
read -once toomcook.cal;
read -once zeta2.cal;
/*
* tests of correctness of the functions implemented by the above listed
* author. All values tested against have been computed with at least two
* independant algorithms where possible (indicated if not).
*
* test 01 tests gamma(z) for the following values
*
* z gamma(z)
* 5 24
* -5 error
* -5.5 0.01091265478190986298673234429
* 5.5 52.34277778455352018114900849
* 5.5+5.5i -3.760669488993539011972109411 - 1.068828791178021218008599278i
* -5.5+5.5i -0.0000000031513765339396-0.00000000565396294185819i
* -5.5-5.5i -0.0000000031513765339396+0.00000000565396294185819i
*/
define t01(){
local eps;
eps = epsilon(1e-20);
if(gamma( 5 ) != 24){
epsilon(eps);
return 1;
}
if(!iserror(gamma( -5 ))){
epsilon(eps);
return 2;
}
if( abs(gamma( -5.5 ) - 0.01091265478190986298673234429) > __CZ__eps){
epsilon(eps);
return 3;
}
if( abs(gamma( 5.5+5.5i ) - ( -3.760669488993539011972109411 - 1.068828791178021218008599278i) ) > __CZ__eps ){
epsilon(eps);
return 4;
}
if( abs(gamma(-5.5+5.5i ) - ( -0.0000000031513765339396-0.00000000565396294185819i)) > __CZ__eps ){
epsilon(eps);
return 5;
}
if( abs(gamma(-5.5-5.5i ) - ( -0.0000000031513765339396+0.00000000565396294185819i)) > __CZ__eps ){
epsilon(eps);
return 5;
}
epsilon(eps);
return 0;
}
/*
test 02 tests lngamma(z) as ln(gamma(z))for a lot of values. Twice.
*/
define t02(type){
local eps k;
eps = epsilon(1e-20);
if(!isnull(type)){
/* test lngamma to higher precision */
epsilon(1e-50)
}
if(!iserror(lngamma( -5 ))){
epsilon(eps);
return 1;
}
if(abs(lngamma(-4.400)-(-2.602796356578054085860353775504851660134124890968895310513467506473714622544820472104292219110230249 + 9.424777960769379715387930149838508652591508198125317462924833776923449218858626995884104476026351204i))>__CZ__eps){epsilon(eps);return 2;}
if(abs(lngamma(-3.400)-(-1.121191815653838606981937409307733431762519256939740603086867679323926364369546808053508062204356381 + 12.56637061435917295385057353311801153678867759750042328389977836923126562514483599451213930136846827i))>__CZ__eps){epsilon(eps);return 3;}
if(abs(lngamma(-2.400)-(0.1025836159682770986668378753392054643000824013774864622977221670841872237237267082284529277399669559 + 3.141592653589793238462643383279502884197169399375105820974944592307816406286208998628034825342117068i))>__CZ__eps){epsilon(eps);return 4;}
if(abs(lngamma(-1.400)-(0.9780523533221770342957880219518966655729718736522287003611286282342897731740673416836614584533568090 + 6.283185307179586476925286766559005768394338798750211641949889184615632812572417997256069650684234136i))>__CZ__eps){epsilon(eps);return 5;}
if(abs(lngamma(-0.4000)-(1.314524589943389964800381432168888755684455248965572166907870886697690648218478844841186078948048725 - 3.141592653589793238462643383279502884197169399375105820974944592307816406286208998628034825342117068i))>__CZ__eps){epsilon(eps);return 6;}
if(abs(lngamma(0.6000)-(0.3982338580692348996168542204008776842343540290573096991159030047169052824805157958169155278512878019))>__CZ__eps){epsilon(eps);return 7;}
if(abs(lngamma(1.600)-(-0.1125917656967557835886598759027842506437567673884585710620505531197794120085330019396025954281597201))>__CZ__eps){epsilon(eps);return 8;}
if(abs(lngamma(2.600)-(0.3574118635489797700622771552455578140571422814237894693873415838862224661928933802478535074679167317))>__CZ__eps){epsilon(eps);return 9;}
if(abs(lngamma(3.600)-(1.312923308576416131515005263584688779336808871915478863893739203075508145809645795017294292815226610))>__CZ__eps){epsilon(eps);return 10;}
if(abs(lngamma(4.600)-(2.593857154038480449121968525661729117181688767652715299571159988369711366508900679740255251345929864))>__CZ__eps){epsilon(eps);return 11;}
if(abs(lngamma(5.600)-(4.119913457533529765327962024245737596098467728224633319657147474378525624786041213308522465405745068))>__CZ__eps){epsilon(eps);return 12;}
if(abs(lngamma(55.60)-(166.7223317072393882706908269355038474520093709166026699584513154552836509334829850057167659670012639))>__CZ__eps){epsilon(eps);return 13;}
if(abs(lngamma(56.60)-(170.7405149084959249626960846426113801630018663570495614063334260781461204332651070777194774772127133))>__CZ__eps){epsilon(eps);return 14;}
if(abs(lngamma(57.60)-(174.7765238937050622127413124561803327282766985056825002949575310911332447187196730943026770843388737))>__CZ__eps){epsilon(eps);return 15;}
if(abs(lngamma(58.60)-(178.8300464614069077680172042040900793384235789388607577471176719144010224272977068414490913508552517))>__CZ__eps){epsilon(eps);return 16;}
if(abs(lngamma(59.60)-(182.9007811579898746993562851336763898891277522424839489727522724518580350673446123920541122890199408))>__CZ__eps){epsilon(eps);return 17;}
if(abs(lngamma(60.60)-(186.9884367320611787751651861970124993055337357937686536527498446663842215358944473992957092336243941))>__CZ__eps){epsilon(eps);return 18;}
if(abs(lngamma(61.60)-(191.0927316251364475428438703676218265275465075845204901325031564702495487250077424730438712170869034))>__CZ__eps){epsilon(eps);return 19;}
if(abs(lngamma(62.60)-(195.2133934956759216362448715987203010536306980824917612825098264568303104679047801204881771995770675))>__CZ__eps){epsilon(eps);return 20;}
if(abs(lngamma(63.60)-(199.3501587737819744783228775747513237676781959965605134887455422103180944212479269262219348433842737))>__CZ__eps){epsilon(eps);return 21;}
if(abs(lngamma(64.60)-(203.5027722441280509386790647389348961712355630873862180757363981319928079826720627026059399915871661))>__CZ__eps){epsilon(eps);return 22;}
if(abs(lngamma(65.60)-(207.6709866549166071043368674554696886045355440070025739596589482148102142728295335076020593653472294))>__CZ__eps){epsilon(eps);return 23;}
if(abs(lngamma(-4.400 + 0.3000i)-(-3.012170168780542935643977654089900903230224118194902800776851727432284095641464658518601854851344898 - 14.99564777393185122018415183045294761009634547976949786064819095927447593149803400353030993001915991i))>__CZ__eps){epsilon(eps);return 24;}
if(abs(lngamma(-3.400 + 0.3000i)-(-1.528246633748315285937279325345084965509129720585190019314960293887747778837456936578769751560985664 - 11.92213157860005745711732356944470292065688993724217768645448047733482574053965183811067307157775230i))>__CZ__eps){epsilon(eps);return 25;}
if(abs(lngamma(-2.400 + 0.3000i)-(-0.3005935437424605000037786760819116140529426068492461805203781927935976448288181308985439318381596952 - 8.868546298538004987033402729320673427755364814142190988797063840212310735937181268214394292554900060i))>__CZ__eps){epsilon(eps);return 26;}
if(abs(lngamma(-1.400 + 0.3000i)-(0.5826272868794220627005984935520030051588811118590927143468349409451458662284723277539288886528086450 - 5.851308639494973183602114195205041569131365606536889257737233367020216597078539028210070061526136323i))>__CZ__eps){epsilon(eps);return 27;}
if(abs(lngamma(-0.4000 + 0.3000i)-(0.9415471834545804679163683919994364115087855350642294160794624408446520586077774828141571932957935576 - 2.920809319127926491981735554074137897979665407716375596072277390961511222457641860173214769101172656i))>__CZ__eps){epsilon(eps);return 28;}
if(abs(lngamma(0.6000 + 0.3000i)-(0.2484000028946351584991362705412598434332854007039741619587824313512584366380827672082938662993748700 - 0.4227177743314176403219013995119576518240065994565821579629389173672072909830539502579967884603383370i))>__CZ__eps){epsilon(eps);return 29;}
if(abs(lngamma(1.600 + 0.3000i)-(-0.1508538452142506468232302806074848397575248529677905013835271902417303859668318638390206449299015341 + 0.04092983466938847589235483194925675020453045482953810584799417135299057318268775504260349552454955558i))>__CZ__eps){epsilon(eps);return 30;}
if(abs(lngamma(2.600 + 0.3000i)-(0.3364259747848147735313925008357736575841632119933041850635335895367888151813894675073790612700505879 + 0.2262777846650832407783807931778013947197968935401072992199235544837899389522014207849355554882625959i))>__CZ__eps){epsilon(eps);return 31;}
if(abs(lngamma(3.600 + 0.3000i)-(1.298550300921881734471375776754435965027429987521072727511666654821378388789308042958948517595253549 + 0.3411543900819823748030570769218348455327276444896884230183971946457411721008725773217180753903992058i))>__CZ__eps){epsilon(eps);return 32;}
if(abs(lngamma(4.600 + 0.3000i)-(2.582944367806232942740645241786647084583876190810680103630192209049779956753319578558317563774905357 + 0.4242956219704236047137253915726161430638589851177078492530246610417385784376111802634549132794141632i))>__CZ__eps){epsilon(eps);return 33;}
if(abs(lngamma(5.600 + 0.3000i)-(4.111122815491445860748560095878127604065278239877556104114455014234622116537919385723568609843827948 + 0.4894207853048094882972548755277837179650295466696997973257275457157790873793738934257725102317212982i))>__CZ__eps){epsilon(eps);return 34;}
if(abs(lngamma(0.6000 - 4.700i)-(-6.309230474426685182917699027589840248465208901823736044071406089970016624762071282414477519533446805 - 2.738444603265429259406748249023722438146218314171151425663490122832827447160142404453785215790720172i))>__CZ__eps){epsilon(eps);return 35;}
if(abs(lngamma(0.6000 - 3.700i)-(-4.762470602521331200619631143446813610218360030381255868867915275850062167138589945759181147587314347 - 1.307861859626688811743330143389568763790196226980935860137256735840654999917008199152740741948205653i))>__CZ__eps){epsilon(eps);return 36;}
if(abs(lngamma(0.6000 - 2.700i)-(-3.223449159729432378435059551332376261824297133470481664344109285143389820463721600269079600439653415 - 0.1525473639596832094518944287785664759918133343972275457487506548230474276833315783298300402230230813i))>__CZ__eps){epsilon(eps);return 37;}
if(abs(lngamma(0.6000 - 1.700i)-(-1.699851882736550416690203691424396333903393386464266356507295865152155081643217138332174570080627273 + 0.6188153536675997046951505463300498363352953733225308151601485284481801957104097451434473124727600220i))>__CZ__eps){epsilon(eps);return 38;}
if(abs(lngamma(0.6000 - 0.7000i)-(-0.2316312495202586116986763277644377512618333134657045421405330360600955017822181674931032957595291466 + 0.7368909799768367142682353753277667339824288570492360448564102775206851329939159562896886641611904396i))>__CZ__eps){epsilon(eps);return 39;}
if(abs(lngamma(0.6000 + 0.3000i)-(0.2484000028946351584991362705412598434332854007039741619587824313512584366380827672082938662993748700 - 0.4227177743314176403219013995119576518240065994565821579629389173672072909830539502579967884603383370i))>__CZ__eps){epsilon(eps);return 40;}
if(abs(lngamma(0.6000 + 1.300i)-(-1.099689479936482253001126014071250387866864940802593030985946176338010292319634681754351711277201146 - 0.7725489931464399068598744386748572974573591452933440189885272843948051378865258815608409462651759038i))>__CZ__eps){epsilon(eps);return 41;}
if(abs(lngamma(0.6000 + 2.300i)-(-2.611386294578008388513457987969729601048026532835562114605241252682747719092183552611868952700620418 - 0.2111094845860104400425314901146665256344806614559790152507363455424499006701362134714576901668862615i))>__CZ__eps){epsilon(eps);return 42;}
if(abs(lngamma(0.6000 + 3.300i)-(-4.145670522984067490152016613422534092269675011415945298652917864316934507837553864106231837873639178 + 0.8081928951523762121254890981027647840025857144095024771821231809903327928035320700978580016020901134i))>__CZ__eps){epsilon(eps);return 43;}
if(abs(lngamma(0.6000 + 4.300i)-(-5.689842576036527320491763306963824853139907301029281610305682566179799260941238598307788211198739464 + 2.137677242374957442527694027866746053575410791317320138931932495148003411548291173248963052605469029i))>__CZ__eps){epsilon(eps);return 44;}
if(abs(lngamma(0.6000 + 5.300i)-(-7.239654605052715210182073623536904206104308839659326676113824586592039321903083835369930675115629685 + 3.702857758072432142072497796069521049678127217607403327232198098820227725661161561592679775128000025i))>__CZ__eps){epsilon(eps);return 45;}
if(abs(lngamma(-4.400 - 4.700i)-(-14.73413592903136179653960750100174060012531669119348359739188295824251395007186551726647596156181555 + 7.340768981905845672138265648506833394433043135824981559003634708099656882118068273562871737379370475i))>__CZ__eps){epsilon(eps);return 46;}
if(abs(lngamma(-3.400 - 3.700i)-(-10.55018529022399813119005433743831737900085357229525796426165531407012201466806460571733582857505851 + 6.763336971725381912118912702208512629733112628981673298740213483902378792635376051758399397079352018i))>__CZ__eps){epsilon(eps);return 47;}
if(abs(lngamma(-2.400 - 2.700i)-(-6.624262018571684573249747079902924251345023570085621326982177263497895441273594383174099568266569519 + 5.911914743873792313808731773611192661709672638901754910693406148730587535650933379128561953202673305i))>__CZ__eps){epsilon(eps);return 48;}
if(abs(lngamma(-1.400 - 1.700i)-(-3.046912030520906458689035477846643788289090086345259335810096962280997399307737870754170013561799449 + 4.680423062668151424886705499811285399248102868605621987762747421929868283337463368954255366241853210i))>__CZ__eps){epsilon(eps);return 49;}
if(abs(lngamma(-0.4000 - 0.7000i)-(-0.01623979147403148300780826047582666582616647435129398527305183616134471962089965927196036143676539809 + 2.826833421018256285271011446520969788549353956082297248294374573272383543521074785692812327220178392i))>__CZ__eps){epsilon(eps);return 50;}
if(abs(lngamma(0.6000 + 0.3000i)-(0.2484000028946351584991362705412598434332854007039741619587824313512584366380827672082938662993748700 - 0.4227177743314176403219013995119576518240065994565821579629389173672072909830539502579967884603383370i))>__CZ__eps){epsilon(eps);return 51;}
if(abs(lngamma(1.600 + 1.300i)-(-0.7407695833613238477853561156238169815169605175974563292533186764385040999403295266941234066342162332 + 0.3658395580779188724109027663961707196451841638334886679433275092947016221102693596315391546217532826i))>__CZ__eps){epsilon(eps);return 52;}
if(abs(lngamma(2.600 + 2.300i)-(-0.7153017561016750689453931991025219163388411460412682694249821466060642237596449041248795522730872166 + 2.067498782269003991801228117457494590355245722719424742293508630734960101015275647841102899818854810i))>__CZ__eps){epsilon(eps);return 53;}
if(abs(lngamma(3.600 + 3.300i)-(-0.2006290139452759775010107586460283514303264993274887714022222695834519457636026071215877177908693236 + 4.221969149213679168621678150696738907045553787288427746366287484331266798399726999903762441109724197i))>__CZ__eps){epsilon(eps);return 54;}
if(abs(lngamma(4.600 + 4.300i)-(0.6404767304085869581018213364351326853699331839312207180878789327971980401993755873561609797726810192 + 6.685149323469513776483323494807052342570441936959315816148292880724186611261236847208887542115434303i))>__CZ__eps){epsilon(eps);return 55;}
if(abs(lngamma(5.600 + 5.300i)-(1.727112476786098959996727579157495580048033035060833670179296378163352191130662743702237851099320091 + 9.383383918093155327986445451264543368751338171298232916305123349159206537551156601182421044554298994i))>__CZ__eps){epsilon(eps);return 56;}
if(abs(lngamma(55.60 + 0.3000i)-(166.7215150367733897769155930653789348483780044274716818154610861234389078719805189264594918732382586 + 1.202750513929718332820270669742686561426457642272968981346017082644807076333571537491197745615077294i))>__CZ__eps){epsilon(eps);return 57;}
if(abs(lngamma(56.60 + 0.3000i)-(170.7397127945179968376917410624766834622909691036136375973004131040276663262707416475336111420149831 + 1.208146145021640303895693686064781770317635078049891748154048007544470593526254839683637064897097838i))>__CZ__eps){epsilon(eps);return 58;}
if(abs(lngamma(57.60 + 0.3000i)-(174.7757358264026770962028712327193919190938819848539820911816742522615118513515101187002268498256953 + 1.213446448743774292811195505423481449339002192187714949283070433230478839177211462927645118751139388i))>__CZ__eps){epsilon(eps);return 59;}
if(abs(lngamma(58.60 + 0.3000i)-(178.8292719572886165808686582437464130998008894472168186351028467401004239585080660700434170533848267 + 1.218654734982846161251085553080214761347285268088604785438095878385945771674273185064368369032315536i))>__CZ__eps){epsilon(eps);return 60;}
if(abs(lngamma(59.60 + 0.3000i)-(182.9000197581041057641595126649840680882966589651420637344563598630410760508053004418106210806480514 + 1.223774144183534973445316592347337056808910609419286930794193524682491346969634027786839155163892724i))>__CZ__eps){epsilon(eps);return 61;}
if(abs(lngamma(60.60 + 0.3000i)-(186.9876880003631981031020807195926428903734785341818284861483167023505345362582553713940653353951410 + 1.228807658719925269995511830298415601718771597558190350507883496810540525070275863955647504172442604i))>__CZ__eps){epsilon(eps);return 62;}
if(abs(lngamma(61.60 + 0.3000i)-(191.0919951469889337316641602771633017764510692037723749796543523708549224640669741133145902737781006 + 1.233758113328768712483862353815791968059294457847368072259148050293157549143123712613333613763784674i))>__CZ__eps){epsilon(eps);return 63;}
if(abs(lngamma(62.60 + 0.3000i)-(195.2126688764702481772276457650023207176714432948785485345860994461920670783769886309746108133330257 + 1.238628204695931980600482702688969918429374403006592554012319844898454093596574259217162870691749038i))>__CZ__eps){epsilon(eps);return 64;}
if(abs(lngamma(63.60 + 0.3000i)-(199.3494456376687238313417632202369605922807314239672719385369875900976176399328184235160742022894634 + 1.243420500277190605198320894289870930154643596582155076044919162631888476221718725167773691679060391i))>__CZ__eps){epsilon(eps);return 65;}
if(abs(lngamma(64.60 + 0.3000i)-(203.5020702328465376706204035728796350972376926574607893322136594379996117055188038514446315204059032 + 1.248137446425596312819515029227444652080011390838575181737724990020365851808034508613690412166704588i))>__CZ__eps){epsilon(eps);return 66;}
if(abs(lngamma(65.60 + 0.3000i)-(207.6702954267142863859185793548246421433863939380928954872956462639690979311998038217156277177658497 + 1.252781375889819416329161991660565854615382764835522506641801626851934424429479695919682707858812249i))>__CZ__eps){epsilon(eps);return 67;}
if(abs(lngamma(55.60 - 4.700i)-(166.5221258272035253961542734005976077004749775938844000662776938982124117149831619415891292027559084 - 18.84875483296568553194454925345602004591801239160222174651330953176747978241113581568341389313614184i))>__CZ__eps){epsilon(eps);return 68;}
if(abs(lngamma(56.60 - 3.700i)-(170.6185921690853207517443064939778892985245375960964842072277769261987939958711192180080496388759790 - 14.90313021223193465377855573208445845565931668639004077631447433024105216208357598284073272963526083i))>__CZ__eps){epsilon(eps);return 69;}
if(abs(lngamma(57.60 - 2.700i)-(174.7127139121008307648437631979262499901446251937177073309638635680981878307625357907205057992110826 - 10.92201102864604767334040466047947450750373806537116051068380101221240925743684470549656839673533788i))>__CZ__eps){epsilon(eps);return 70;}
if(abs(lngamma(58.60 - 1.700i)-(178.8051797102056562439362100160978710660289490095968327611173555143739460179913989993096167790463432 - 6.905945104548951236229262516275118301863000955218208856630289945072933677322889363909280822011545321i))>__CZ__eps){epsilon(eps);return 71;}
if(abs(lngamma(59.60 - 0.7000i)-(182.8966358377199778625865269072085032936485484956150669021166926511020935207431114192228211953931100 - 2.855486362253577342667404413778192112579790386732841204180813534474139545940894056117527731737226582i))>__CZ__eps){epsilon(eps);return 72;}
if(abs(lngamma(60.60 + 0.3000i)-(186.9876880003631981031020807195926428903734785341818284861483167023505345362582553713940653353951410 + 1.228807658719925269995511830298415601718771597558190350507883496810540525070275863955647504172442604i))>__CZ__eps){epsilon(eps);return 73;}
if(abs(lngamma(61.60 + 1.300i)-(191.0789031896982469942903294770974306494712752019213395010059816712212959534694477736544779643613606 + 5.346377998474074192830409565498522421021695288142347615450028628516451152858671821236062551519577511i))>__CZ__eps){epsilon(eps);return 74;}
if(abs(lngamma(62.60 + 2.300i)-(195.1708115544608858783580589279983618518227865792619427244597031395608221351124418855807139544387844 + 9.496666208022148051357709844128014322980249562957453155498216739528300001626643515787555547645875216i))>__CZ__eps){epsilon(eps);return 75;}
if(abs(lngamma(63.60 + 3.300i)-(199.2639082667972359747356775354901044881033064193665592320100330065828589091059656379848180952180576 + 13.67911603585439751926438073480939520547347569839795064532158720371833242545216773892848304348649828i))>__CZ__eps){epsilon(eps);return 76;}
if(abs(lngamma(64.60 + 4.300i)-(203.3586553654963869814883298543618854726441450377694569990857332006085635938056596309090099303930334 + 17.89317489050227754715433149549722038188972541358048335428889588525290414035694955077798780767484079i))>__CZ__eps){epsilon(eps);return 77;}
if(abs(lngamma(65.60 + 5.300i)-(207.4554835618873492047512087924156663776620358356581503938661139973023305384540970489546974722608112 + 22.13829509931977678201875089030163451926720764548437834522489362621805878564584156804449041165307769i))>__CZ__eps){epsilon(eps);return 78;}
if(abs(lngamma(0.6000 + 55.30i)-(-85.54482235577983941284251852323648610691188392673393393659117312998074429939423249453201268385415968 + 166.7640845362830899082977628513038941147191508645382670512065838817570593346370195934584098731608163i))>__CZ__eps){epsilon(eps);return 79;}
if(abs(lngamma(0.6000 + 56.30i)-(-87.11382647385499402990266927218873826677912515510914330975238159375338785735675613885474681911555455 + 170.7858332456548897964755419202916477033408200711519690015167519320073811710594461413312890867212396i))>__CZ__eps){epsilon(eps);return 80;}
if(abs(lngamma(0.6000 + 57.30i)-(-88.68286214812485690627962462529848906043953388486922638389109935077387260509105638054210646253252466 + 174.8253452895478184840703539752269094932785103410249518116087112411324582420889387891648827483331167i))>__CZ__eps){epsilon(eps);return 81;}
if(abs(lngamma(0.6000 + 58.30i)-(-90.25192828651651583800480958344256221682554088740576313673589889163710837899207764032711716706627583 + 178.8823106163841131771861511088137077830986146286084489346147229324383955058792053361236598271019023i))>__CZ__eps){epsilon(eps);return 82;}
if(abs(lngamma(0.6000 + 59.30i)-(-91.82102385268587759734139136217993540696936010920994984591658423038715645418137316213497147316787354 + 182.9564298132977973838333574465352695792546867284831679902458633771250846205990521337322037599865490i))>__CZ__eps){epsilon(eps);return 83;}
if(abs(lngamma(0.6000 + 60.30i)-(-93.39014786228910598458529398231928177449383105033168028035758106697089023386753079638127787148822458 + 187.0474135677690289293542062291360648608774972285628443252781312026960680153689550595593442583564361i))>__CZ__eps){epsilon(eps);return 84;}
if(abs(lngamma(0.6000 + 61.30i)-(-94.95929937956076993888890535139227785932447324700640489970555152485771091160984562939060645206100132 + 191.1549821649831349987910547767822679603735412036380108781321752841569185871421007366309694487409486i))>__CZ__eps){epsilon(eps);return 85;}
if(abs(lngamma(0.6000 + 62.30i)-(-96.52847751416891464599424930795884732518087496093651555404283351659612698836352323452352710420599104 + 195.2788650179992458972186470030422322640959550214072444870291693388786130688229112380191390257821807i))>__CZ__eps){epsilon(eps);return 86;}
if(abs(lngamma(0.6000 + 63.30i)-(-98.09768141832058996231194071903760307280235519603364210034375642851432112362859092795643468479700327 + 199.4188002280943140128727971292337826315387363387763786270696435128423987623771787363214987887073743i))>__CZ__eps){epsilon(eps);return 87;}
if(abs(lngamma(0.6000 + 64.30i)-(-99.66691028409427522125385963825011409754630863598190917300304121976114751378659089137971202438172887 + 203.5745341728981030650825963445356527935331129342248469636074322780853587222584902429706178725686242i))>__CZ__eps){epsilon(eps);return 88;}
if(abs(lngamma(0.6000 + 65.30i)-(-101.2361633409781854893699037629524761308029390440175099023860977120545945724838225634129393108607355 + 207.7458211201573236805249632667291754315339341665724958026196877950249917227554119187871060871559697i))>__CZ__eps){epsilon(eps);return 89;}
if(abs(lngamma(55.60 + 60.30i)-(138.3405218869058217717201182836422027677382184890964165590417353499219822226519181484044703575835292 + 250.9485307086751713133102893231808151265549690071705472539067848281998391909656358247103271742719578i))>__CZ__eps){epsilon(eps);return 90;}
if(abs(lngamma(56.60 + 60.30i)-(142.7474976121018701984157500679190442966110797769323173557040709858649026362568015560276025151255956 + 251.7744588650459198825346353772080509751313819470548658242804227289838197861524419605491386182133953i))>__CZ__eps){epsilon(eps);return 91;}
if(abs(lngamma(57.60 + 60.30i)-(147.1627435319602425515209166358781832064023544924212637636653157301087891743636771772442175547092138 + 252.5914974493805839443768868968642526869013797892608722844298827478025786612090804469713284568207639i))>__CZ__eps){epsilon(eps);return 92;}
if(abs(lngamma(58.60 + 60.30i)-(151.5862689029682042031606617640450220740985775964639233206719519919454468746790090892789062856833994 + 253.3997923739994162421416717294147634900873392644324912633837005280001593924100149032670755229086402i))>__CZ__eps){epsilon(eps);return 93;}
if(abs(lngamma(59.60 + 60.30i)-(156.0180803184689022095120622630277425180433295653817951699970902688810769976218882558288617606286722 + 254.1994872924291535134537002289372877256760561545266240447182119613107490480996768753107944444566663i))>__CZ__eps){epsilon(eps);return 94;}
if(abs(lngamma(60.60 + 60.30i)-(160.4581818322128207752571131620498333645831099884594593949166210067133473205367535408753892850882553 + 254.9907235879958949246830907372060458378867915677707498070916381728065006920567219761323639093065907i))>__CZ__eps){epsilon(eps);return 95;}
if(abs(lngamma(61.60 + 60.30i)-(164.9065750781912363906196189745577497508505165621357938820065182107142960571733194288330116576903125 + 255.7736403669080425654455012237246051402306640891736322674732329084396310656024722092859071945872444i))>__CZ__eps){epsilon(eps);return 96;}
if(abs(lngamma(62.60 + 60.30i)-(169.3632593867220799863942253592790131010186217605278241383032664772260920373282624028529879975286350 + 256.5483744554910528044048617005478717965073680654042053866320357723837630372594401312206968901830105i))>__CZ__eps){epsilon(eps);return 97;}
if(abs(lngamma(63.60 + 60.30i)-(173.8282318967764198928263540479369804154959334380883398727474568650558868155342724620418729191066897 + 257.3150604012511380535676929646281795055983167823336193389524424552595441364148246393785125517847376i))>__CZ__eps){epsilon(eps);return 98;}
if(abs(lngamma(64.60 + 60.30i)-(178.3014876645497005489995740718100489155558324227755847007898254349773686020549399461464731246888811 + 258.0738304774605436591436026066009539042787457216911291577832446476517821930895032617238958674099152i))>__CZ__eps){epsilon(eps);return 99;}
if(abs(lngamma(65.60 + 60.30i)-(182.7830197682960267239662260557525833694506977039319737802533196097442483852152832046887750759565943 + 258.8248146909724805417993325211754807069936951454932977542761597422795687852878109079207208588308147i))>__CZ__eps){epsilon(eps);return 100;}
if(abs(lngamma(55.60 + 55.30i)-(142.3862162791589253462657451176275726003857264651343509950957693660793746863734326554521916865294160 + 229.0474972316203435288188174128389032017308276896396827258188412666555426184444346078935151648963593i))>__CZ__eps){epsilon(eps);return 101;}
if(abs(lngamma(56.60 + 56.30i)-(145.9655713474689753168556009847734887663033552824290632709719191874805473283966808702482716223823799 + 234.2012259525622513896404861908422505950646506577988340677531054697523114853375505771896176207845654i))>__CZ__eps){epsilon(eps);return 102;}
if(abs(lngamma(57.60 + 57.30i)-(149.5627523253413003508200851967083007076485608754907532209664548084707244359306524068411586608941471 + 239.3727177204530395107173394215426561501560159557014103102685030670438401066317331091766069662051511i))>__CZ__eps){epsilon(eps);return 103;}
if(abs(lngamma(58.60 + 58.30i)-(153.1774470047839472501216057736005131302626263510371392880103904697841471694103329293425078496549758 + 244.5616624984797644536433102063654140139237547865421532878830803720762552799643139942619380524890401i))>__CZ__eps){epsilon(eps);return 104;}
if(abs(lngamma(59.60 + 59.30i)-(156.8093539260984043245770025957276995010069796775703177529274656935406571580476095484467127733135084 + 249.7677608875474964335171539461488545902215228674008981574984941307449419367892141512085156904698398i))>__CZ__eps){epsilon(eps);return 105;}
if(abs(lngamma(60.60 + 60.30i)-(160.4581818322128207752571131620498333645831099884594593949166210067133473205367535408753892850882553 + 254.9907235879958949246830907372060458378867915677707498070916381728065006920567219761323639093065907i))>__CZ__eps){epsilon(eps);return 106;}
if(abs(lngamma(61.60 + 61.30i)-(164.1236491593380218382957487779642572534385362007999916281283947968048913383213154195181013057822234 + 260.2302708970324395553848679531333038493595454481482560493315410820180244948561636909552645533403618i))>__CZ__eps){epsilon(eps);return 107;}
if(abs(lngamma(62.60 + 62.30i)-(167.8054835609733823774016164868506426238263526697353479782755961582196176989205680074917215202127864 + 265.4861322389681286058365065491944749198017327500214219083439023895059621709769558317157193105864721i))>__CZ__eps){epsilon(eps);return 108;}
if(abs(lngamma(63.60 + 63.30i)-(171.5034214625769205528980449555097665172285302158028025423161481941008052930058651761908875732005816 + 270.7580457256222186188843213325906832500862444373572311661827574319274457824608027119111557496467876i))>__CZ__eps){epsilon(eps);return 109;}
if(abs(lngamma(64.60 + 64.30i)-(175.2172076444693933495200678808489471651335658562522069741003825794583284267731429819984320358705804 + 276.0457577445122795003295082894754935609216218032287116765827545233934750440738775983322565095055686i))>__CZ__eps){epsilon(eps);return 110;}
if(abs(lngamma(65.60 + 65.30i)-(178.9465948507696967449494536146172974534191430062324139747191513973655253559309515112484546085877718 + 281.3490225726683461623186324992570909685317567794418009098339817182638759202079343286582580534821206i))>__CZ__eps){epsilon(eps);return 111;}
if(abs(lngamma(0.6000 + 4.700i)-(-6.309230474426685182917699027589840248465208901823736044071406089970016624762071282414477519533446805 + 2.738444603265429259406748249023722438146218314171151425663490122832827447160142404453785215790720172i))>__CZ__eps){epsilon(eps);return 112;}
if(abs(lngamma(0.6000 + 3.700i)-(-4.762470602521331200619631143446813610218360030381255868867915275850062167138589945759181147587314347 + 1.307861859626688811743330143389568763790196226980935860137256735840654999917008199152740741948205653i))>__CZ__eps){epsilon(eps);return 113;}
if(abs(lngamma(0.6000 + 2.700i)-(-3.223449159729432378435059551332376261824297133470481664344109285143389820463721600269079600439653415 + 0.1525473639596832094518944287785664759918133343972275457487506548230474276833315783298300402230230813i))>__CZ__eps){epsilon(eps);return 114;}
if(abs(lngamma(0.6000 + 1.700i)-(-1.699851882736550416690203691424396333903393386464266356507295865152155081643217138332174570080627273 - 0.6188153536675997046951505463300498363352953733225308151601485284481801957104097451434473124727600220i))>__CZ__eps){epsilon(eps);return 115;}
if(abs(lngamma(0.6000 + 0.7000i)-(-0.2316312495202586116986763277644377512618333134657045421405330360600955017822181674931032957595291466 - 0.7368909799768367142682353753277667339824288570492360448564102775206851329939159562896886641611904396i))>__CZ__eps){epsilon(eps);return 116;}
if(abs(lngamma(0.6000 - 0.3000i)-(0.2484000028946351584991362705412598434332854007039741619587824313512584366380827672082938662993748700 + 0.4227177743314176403219013995119576518240065994565821579629389173672072909830539502579967884603383370i))>__CZ__eps){epsilon(eps);return 117;}
if(abs(lngamma(0.6000 - 1.300i)-(-1.099689479936482253001126014071250387866864940802593030985946176338010292319634681754351711277201146 + 0.7725489931464399068598744386748572974573591452933440189885272843948051378865258815608409462651759038i))>__CZ__eps){epsilon(eps);return 118;}
if(abs(lngamma(0.6000 - 2.300i)-(-2.611386294578008388513457987969729601048026532835562114605241252682747719092183552611868952700620418 + 0.2111094845860104400425314901146665256344806614559790152507363455424499006701362134714576901668862615i))>__CZ__eps){epsilon(eps);return 119;}
if(abs(lngamma(0.6000 - 3.300i)-(-4.145670522984067490152016613422534092269675011415945298652917864316934507837553864106231837873639178 - 0.8081928951523762121254890981027647840025857144095024771821231809903327928035320700978580016020901134i))>__CZ__eps){epsilon(eps);return 120;}
if(abs(lngamma(0.6000 - 4.300i)-(-5.689842576036527320491763306963824853139907301029281610305682566179799260941238598307788211198739464 - 2.137677242374957442527694027866746053575410791317320138931932495148003411548291173248963052605469029i))>__CZ__eps){epsilon(eps);return 121;}
if(abs(lngamma(0.6000 - 5.300i)-(-7.239654605052715210182073623536904206104308839659326676113824586592039321903083835369930675115629685 - 3.702857758072432142072497796069521049678127217607403327232198098820227725661161561592679775128000025i))>__CZ__eps){epsilon(eps);return 122;}
if(abs(lngamma(-4.400 + 4.700i)-(-14.73413592903136179653960750100174060012531669119348359739188295824251395007186551726647596156181555 - 7.340768981905845672138265648506833394433043135824981559003634708099656882118068273562871737379370475i))>__CZ__eps){epsilon(eps);return 123;}
if(abs(lngamma(-3.400 + 3.700i)-(-10.55018529022399813119005433743831737900085357229525796426165531407012201466806460571733582857505851 - 6.763336971725381912118912702208512629733112628981673298740213483902378792635376051758399397079352018i))>__CZ__eps){epsilon(eps);return 124;}
if(abs(lngamma(-2.400 + 2.700i)-(-6.624262018571684573249747079902924251345023570085621326982177263497895441273594383174099568266569519 - 5.911914743873792313808731773611192661709672638901754910693406148730587535650933379128561953202673305i))>__CZ__eps){epsilon(eps);return 125;}
if(abs(lngamma(-1.400 + 1.700i)-(-3.046912030520906458689035477846643788289090086345259335810096962280997399307737870754170013561799449 - 4.680423062668151424886705499811285399248102868605621987762747421929868283337463368954255366241853210i))>__CZ__eps){epsilon(eps);return 126;}
if(abs(lngamma(-0.4000 + 0.7000i)-(-0.01623979147403148300780826047582666582616647435129398527305183616134471962089965927196036143676539809 - 2.826833421018256285271011446520969788549353956082297248294374573272383543521074785692812327220178392i))>__CZ__eps){epsilon(eps);return 127;}
if(abs(lngamma(0.6000 - 0.3000i)-(0.2484000028946351584991362705412598434332854007039741619587824313512584366380827672082938662993748700 + 0.4227177743314176403219013995119576518240065994565821579629389173672072909830539502579967884603383370i))>__CZ__eps){epsilon(eps);return 128;}
if(abs(lngamma(1.600 - 1.300i)-(-0.7407695833613238477853561156238169815169605175974563292533186764385040999403295266941234066342162332 - 0.3658395580779188724109027663961707196451841638334886679433275092947016221102693596315391546217532826i))>__CZ__eps){epsilon(eps);return 129;}
if(abs(lngamma(2.600 - 2.300i)-(-0.7153017561016750689453931991025219163388411460412682694249821466060642237596449041248795522730872166 - 2.067498782269003991801228117457494590355245722719424742293508630734960101015275647841102899818854810i))>__CZ__eps){epsilon(eps);return 130;}
if(abs(lngamma(3.600 - 3.300i)-(-0.2006290139452759775010107586460283514303264993274887714022222695834519457636026071215877177908693236 - 4.221969149213679168621678150696738907045553787288427746366287484331266798399726999903762441109724197i))>__CZ__eps){epsilon(eps);return 131;}
if(abs(lngamma(4.600 - 4.300i)-(0.6404767304085869581018213364351326853699331839312207180878789327971980401993755873561609797726810192 - 6.685149323469513776483323494807052342570441936959315816148292880724186611261236847208887542115434303i))>__CZ__eps){epsilon(eps);return 132;}
if(abs(lngamma(5.600 - 5.300i)-(1.727112476786098959996727579157495580048033035060833670179296378163352191130662743702237851099320091 - 9.383383918093155327986445451264543368751338171298232916305123349159206537551156601182421044554298994i))>__CZ__eps){epsilon(eps);return 133;}
if(abs(lngamma(55.60 - 0.3000i)-(166.7215150367733897769155930653789348483780044274716818154610861234389078719805189264594918732382586 - 1.202750513929718332820270669742686561426457642272968981346017082644807076333571537491197745615077294i))>__CZ__eps){epsilon(eps);return 134;}
if(abs(lngamma(56.60 - 0.3000i)-(170.7397127945179968376917410624766834622909691036136375973004131040276663262707416475336111420149831 - 1.208146145021640303895693686064781770317635078049891748154048007544470593526254839683637064897097838i))>__CZ__eps){epsilon(eps);return 135;}
if(abs(lngamma(57.60 - 0.3000i)-(174.7757358264026770962028712327193919190938819848539820911816742522615118513515101187002268498256953 - 1.213446448743774292811195505423481449339002192187714949283070433230478839177211462927645118751139388i))>__CZ__eps){epsilon(eps);return 136;}
if(abs(lngamma(58.60 - 0.3000i)-(178.8292719572886165808686582437464130998008894472168186351028467401004239585080660700434170533848267 - 1.218654734982846161251085553080214761347285268088604785438095878385945771674273185064368369032315536i))>__CZ__eps){epsilon(eps);return 137;}
if(abs(lngamma(59.60 - 0.3000i)-(182.9000197581041057641595126649840680882966589651420637344563598630410760508053004418106210806480514 - 1.223774144183534973445316592347337056808910609419286930794193524682491346969634027786839155163892724i))>__CZ__eps){epsilon(eps);return 138;}
if(abs(lngamma(60.60 - 0.3000i)-(186.9876880003631981031020807195926428903734785341818284861483167023505345362582553713940653353951410 - 1.228807658719925269995511830298415601718771597558190350507883496810540525070275863955647504172442604i))>__CZ__eps){epsilon(eps);return 139;}
if(abs(lngamma(61.60 - 0.3000i)-(191.0919951469889337316641602771633017764510692037723749796543523708549224640669741133145902737781006 - 1.233758113328768712483862353815791968059294457847368072259148050293157549143123712613333613763784674i))>__CZ__eps){epsilon(eps);return 140;}
if(abs(lngamma(62.60 - 0.3000i)-(195.2126688764702481772276457650023207176714432948785485345860994461920670783769886309746108133330257 - 1.238628204695931980600482702688969918429374403006592554012319844898454093596574259217162870691749038i))>__CZ__eps){epsilon(eps);return 141;}
if(abs(lngamma(63.60 - 0.3000i)-(199.3494456376687238313417632202369605922807314239672719385369875900976176399328184235160742022894634 - 1.243420500277190605198320894289870930154643596582155076044919162631888476221718725167773691679060391i))>__CZ__eps){epsilon(eps);return 142;}
if(abs(lngamma(64.60 - 0.3000i)-(203.5020702328465376706204035728796350972376926574607893322136594379996117055188038514446315204059032 - 1.248137446425596312819515029227444652080011390838575181737724990020365851808034508613690412166704588i))>__CZ__eps){epsilon(eps);return 143;}
if(abs(lngamma(65.60 - 0.3000i)-(207.6702954267142863859185793548246421433863939380928954872956462639690979311998038217156277177658497 - 1.252781375889819416329161991660565854615382764835522506641801626851934424429479695919682707858812249i))>__CZ__eps){epsilon(eps);return 144;}
if(abs(lngamma(55.60 - 4.700i)-(166.5221258272035253961542734005976077004749775938844000662776938982124117149831619415891292027559084 - 18.84875483296568553194454925345602004591801239160222174651330953176747978241113581568341389313614184i))>__CZ__eps){epsilon(eps);return 145;}
if(abs(lngamma(56.60 - 3.700i)-(170.6185921690853207517443064939778892985245375960964842072277769261987939958711192180080496388759790 - 14.90313021223193465377855573208445845565931668639004077631447433024105216208357598284073272963526083i))>__CZ__eps){epsilon(eps);return 146;}
if(abs(lngamma(57.60 - 2.700i)-(174.7127139121008307648437631979262499901446251937177073309638635680981878307625357907205057992110826 - 10.92201102864604767334040466047947450750373806537116051068380101221240925743684470549656839673533788i))>__CZ__eps){epsilon(eps);return 147;}
if(abs(lngamma(58.60 - 1.700i)-(178.8051797102056562439362100160978710660289490095968327611173555143739460179913989993096167790463432 - 6.905945104548951236229262516275118301863000955218208856630289945072933677322889363909280822011545321i))>__CZ__eps){epsilon(eps);return 148;}
if(abs(lngamma(59.60 - 0.7000i)-(182.8966358377199778625865269072085032936485484956150669021166926511020935207431114192228211953931100 - 2.855486362253577342667404413778192112579790386732841204180813534474139545940894056117527731737226582i))>__CZ__eps){epsilon(eps);return 149;}
if(abs(lngamma(60.60 + 0.3000i)-(186.9876880003631981031020807195926428903734785341818284861483167023505345362582553713940653353951410 + 1.228807658719925269995511830298415601718771597558190350507883496810540525070275863955647504172442604i))>__CZ__eps){epsilon(eps);return 150;}
if(abs(lngamma(61.60 + 1.300i)-(191.0789031896982469942903294770974306494712752019213395010059816712212959534694477736544779643613606 + 5.346377998474074192830409565498522421021695288142347615450028628516451152858671821236062551519577511i))>__CZ__eps){epsilon(eps);return 151;}
if(abs(lngamma(62.60 + 2.300i)-(195.1708115544608858783580589279983618518227865792619427244597031395608221351124418855807139544387844 + 9.496666208022148051357709844128014322980249562957453155498216739528300001626643515787555547645875216i))>__CZ__eps){epsilon(eps);return 152;}
if(abs(lngamma(63.60 + 3.300i)-(199.2639082667972359747356775354901044881033064193665592320100330065828589091059656379848180952180576 + 13.67911603585439751926438073480939520547347569839795064532158720371833242545216773892848304348649828i))>__CZ__eps){epsilon(eps);return 153;}
if(abs(lngamma(64.60 + 4.300i)-(203.3586553654963869814883298543618854726441450377694569990857332006085635938056596309090099303930334 + 17.89317489050227754715433149549722038188972541358048335428889588525290414035694955077798780767484079i))>__CZ__eps){epsilon(eps);return 154;}
if(abs(lngamma(65.60 + 5.300i)-(207.4554835618873492047512087924156663776620358356581503938661139973023305384540970489546974722608112 + 22.13829509931977678201875089030163451926720764548437834522489362621805878564584156804449041165307769i))>__CZ__eps){epsilon(eps);return 155;}
if(abs(lngamma(0.6000 - 55.30i)-(-85.54482235577983941284251852323648610691188392673393393659117312998074429939423249453201268385415968 - 166.7640845362830899082977628513038941147191508645382670512065838817570593346370195934584098731608163i))>__CZ__eps){epsilon(eps);return 156;}
if(abs(lngamma(0.6000 - 56.30i)-(-87.11382647385499402990266927218873826677912515510914330975238159375338785735675613885474681911555455 - 170.7858332456548897964755419202916477033408200711519690015167519320073811710594461413312890867212396i))>__CZ__eps){epsilon(eps);return 157;}
if(abs(lngamma(0.6000 - 57.30i)-(-88.68286214812485690627962462529848906043953388486922638389109935077387260509105638054210646253252466 - 174.8253452895478184840703539752269094932785103410249518116087112411324582420889387891648827483331167i))>__CZ__eps){epsilon(eps);return 158;}
if(abs(lngamma(0.6000 - 58.30i)-(-90.25192828651651583800480958344256221682554088740576313673589889163710837899207764032711716706627583 - 178.8823106163841131771861511088137077830986146286084489346147229324383955058792053361236598271019023i))>__CZ__eps){epsilon(eps);return 159;}
if(abs(lngamma(0.6000 - 59.30i)-(-91.82102385268587759734139136217993540696936010920994984591658423038715645418137316213497147316787354 - 182.9564298132977973838333574465352695792546867284831679902458633771250846205990521337322037599865490i))>__CZ__eps){epsilon(eps);return 160;}
if(abs(lngamma(0.6000 - 60.30i)-(-93.39014786228910598458529398231928177449383105033168028035758106697089023386753079638127787148822458 - 187.0474135677690289293542062291360648608774972285628443252781312026960680153689550595593442583564361i))>__CZ__eps){epsilon(eps);return 161;}
if(abs(lngamma(0.6000 - 61.30i)-(-94.95929937956076993888890535139227785932447324700640489970555152485771091160984562939060645206100132 - 191.1549821649831349987910547767822679603735412036380108781321752841569185871421007366309694487409486i))>__CZ__eps){epsilon(eps);return 162;}
if(abs(lngamma(0.6000 - 62.30i)-(-96.52847751416891464599424930795884732518087496093651555404283351659612698836352323452352710420599104 - 195.2788650179992458972186470030422322640959550214072444870291693388786130688229112380191390257821807i))>__CZ__eps){epsilon(eps);return 163;}
if(abs(lngamma(0.6000 - 63.30i)-(-98.09768141832058996231194071903760307280235519603364210034375642851432112362859092795643468479700327 - 199.4188002280943140128727971292337826315387363387763786270696435128423987623771787363214987887073743i))>__CZ__eps){epsilon(eps);return 164;}
if(abs(lngamma(0.6000 - 64.30i)-(-99.66691028409427522125385963825011409754630863598190917300304121976114751378659089137971202438172887 - 203.5745341728981030650825963445356527935331129342248469636074322780853587222584902429706178725686242i))>__CZ__eps){epsilon(eps);return 165;}
if(abs(lngamma(0.6000 - 65.30i)-(-101.2361633409781854893699037629524761308029390440175099023860977120545945724838225634129393108607355 - 207.7458211201573236805249632667291754315339341665724958026196877950249917227554119187871060871559697i))>__CZ__eps){epsilon(eps);return 166;}
if(abs(lngamma(55.60 - 60.30i)-(138.3405218869058217717201182836422027677382184890964165590417353499219822226519181484044703575835292 - 250.9485307086751713133102893231808151265549690071705472539067848281998391909656358247103271742719578i))>__CZ__eps){epsilon(eps);return 167;}
if(abs(lngamma(56.60 - 60.30i)-(142.7474976121018701984157500679190442966110797769323173557040709858649026362568015560276025151255956 - 251.7744588650459198825346353772080509751313819470548658242804227289838197861524419605491386182133953i))>__CZ__eps){epsilon(eps);return 168;}
if(abs(lngamma(57.60 - 60.30i)-(147.1627435319602425515209166358781832064023544924212637636653157301087891743636771772442175547092138 - 252.5914974493805839443768868968642526869013797892608722844298827478025786612090804469713284568207639i))>__CZ__eps){epsilon(eps);return 169;}
if(abs(lngamma(58.60 - 60.30i)-(151.5862689029682042031606617640450220740985775964639233206719519919454468746790090892789062856833994 - 253.3997923739994162421416717294147634900873392644324912633837005280001593924100149032670755229086402i))>__CZ__eps){epsilon(eps);return 170;}
if(abs(lngamma(59.60 - 60.30i)-(156.0180803184689022095120622630277425180433295653817951699970902688810769976218882558288617606286722 - 254.1994872924291535134537002289372877256760561545266240447182119613107490480996768753107944444566663i))>__CZ__eps){epsilon(eps);return 171;}
if(abs(lngamma(60.60 - 60.30i)-(160.4581818322128207752571131620498333645831099884594593949166210067133473205367535408753892850882553 - 254.9907235879958949246830907372060458378867915677707498070916381728065006920567219761323639093065907i))>__CZ__eps){epsilon(eps);return 172;}
if(abs(lngamma(61.60 - 60.30i)-(164.9065750781912363906196189745577497508505165621357938820065182107142960571733194288330116576903125 - 255.7736403669080425654455012237246051402306640891736322674732329084396310656024722092859071945872444i))>__CZ__eps){epsilon(eps);return 173;}
if(abs(lngamma(62.60 - 60.30i)-(169.3632593867220799863942253592790131010186217605278241383032664772260920373282624028529879975286350 - 256.5483744554910528044048617005478717965073680654042053866320357723837630372594401312206968901830105i))>__CZ__eps){epsilon(eps);return 174;}
if(abs(lngamma(63.60 - 60.30i)-(173.8282318967764198928263540479369804154959334380883398727474568650558868155342724620418729191066897 - 257.3150604012511380535676929646281795055983167823336193389524424552595441364148246393785125517847376i))>__CZ__eps){epsilon(eps);return 175;}
if(abs(lngamma(64.60 - 60.30i)-(178.3014876645497005489995740718100489155558324227755847007898254349773686020549399461464731246888811 - 258.0738304774605436591436026066009539042787457216911291577832446476517821930895032617238958674099152i))>__CZ__eps){epsilon(eps);return 176;}
if(abs(lngamma(65.60 - 60.30i)-(182.7830197682960267239662260557525833694506977039319737802533196097442483852152832046887750759565943 - 258.8248146909724805417993325211754807069936951454932977542761597422795687852878109079207208588308147i))>__CZ__eps){epsilon(eps);return 177;}
if(abs(lngamma(55.60 - 55.30i)-(142.3862162791589253462657451176275726003857264651343509950957693660793746863734326554521916865294160 - 229.0474972316203435288188174128389032017308276896396827258188412666555426184444346078935151648963593i))>__CZ__eps){epsilon(eps);return 178;}
if(abs(lngamma(56.60 - 56.30i)-(145.9655713474689753168556009847734887663033552824290632709719191874805473283966808702482716223823799 - 234.2012259525622513896404861908422505950646506577988340677531054697523114853375505771896176207845654i))>__CZ__eps){epsilon(eps);return 179;}
if(abs(lngamma(57.60 - 57.30i)-(149.5627523253413003508200851967083007076485608754907532209664548084707244359306524068411586608941471 - 239.3727177204530395107173394215426561501560159557014103102685030670438401066317331091766069662051511i))>__CZ__eps){epsilon(eps);return 180;}
if(abs(lngamma(58.60 - 58.30i)-(153.1774470047839472501216057736005131302626263510371392880103904697841471694103329293425078496549758 - 244.5616624984797644536433102063654140139237547865421532878830803720762552799643139942619380524890401i))>__CZ__eps){epsilon(eps);return 181;}
if(abs(lngamma(59.60 - 59.30i)-(156.8093539260984043245770025957276995010069796775703177529274656935406571580476095484467127733135084 - 249.7677608875474964335171539461488545902215228674008981574984941307449419367892141512085156904698398i))>__CZ__eps){epsilon(eps);return 182;}
if(abs(lngamma(60.60 - 60.30i)-(160.4581818322128207752571131620498333645831099884594593949166210067133473205367535408753892850882553 - 254.9907235879958949246830907372060458378867915677707498070916381728065006920567219761323639093065907i))>__CZ__eps){epsilon(eps);return 183;}
if(abs(lngamma(61.60 - 61.30i)-(164.1236491593380218382957487779642572534385362007999916281283947968048913383213154195181013057822234 - 260.2302708970324395553848679531333038493595454481482560493315410820180244948561636909552645533403618i))>__CZ__eps){epsilon(eps);return 184;}
if(abs(lngamma(62.60 - 62.30i)-(167.8054835609733823774016164868506426238263526697353479782755961582196176989205680074917215202127864 - 265.4861322389681286058365065491944749198017327500214219083439023895059621709769558317157193105864721i))>__CZ__eps){epsilon(eps);return 185;}
if(abs(lngamma(63.60 - 63.30i)-(171.5034214625769205528980449555097665172285302158028025423161481941008052930058651761908875732005816 - 270.7580457256222186188843213325906832500862444373572311661827574319274457824608027119111557496467876i))>__CZ__eps){epsilon(eps);return 186;}
if(abs(lngamma(64.60 - 64.30i)-(175.2172076444693933495200678808489471651335658562522069741003825794583284267731429819984320358705804 - 276.0457577445122795003295082894754935609216218032287116765827545233934750440738775983322565095055686i))>__CZ__eps){epsilon(eps);return 187;}
if(abs(lngamma(65.60 - 65.30i)-(178.9465948507696967449494536146172974534191430062324139747191513973655253559309515112484546085877718 - 281.3490225726683461623186324992570909685317567794418009098339817182638759202079343286582580534821206i))>__CZ__eps){epsilon(eps);return 188;}
/* some large integers */
if(abs(lngamma( 10^2 +1 )-( ln((10^2)!) ) ) > __CZ__eps ){epsilon(eps);return 189;}
##if(abs(lngamma( 10^10 +1 )-( ln((10^10)!) ) > __CZ__eps ){epsilon(eps);return 190;}
##epsilon(1e-140) if(abs(lngamma( 10^100 )-( ln((10^100)!) ) > __CZ__eps ){epsilon(eps);return 191;}
epsilon(eps);
if(isnull(type))t02(1);
epsilon(eps);
return 0;
}
/* test 03 tests psi(z) for the following values
*
* z psi(z)
* 5 1.506117668431800472726821243
* -5 error
* -5.5 1.792911330399932941915445023
* 5.5 1.611093148581751123733626842
* 5.5+5.5i 2.005864860662911769895523042 + 0.8322301014098247099090843855i
* -5.5+5.5i 2.096773951572002678986432133 + 2.400271643089053271126857721i
* -5.5-5.5i 2.096773951572002678986432133 - 2.400271643089053271126857721i
*/
define t03(){
local eps;
eps = epsilon(1e-20);
if( abs(psi( 5 ) - 1.506117668431800472726821243) > __CZ__eps ){
epsilon(eps);
return 1;
}
if(!iserror(psi( -5 ))){
epsilon(eps);
return 2;
}
if( abs(psi( -5.5 ) - (1.792911330399932941915445023)) > __CZ__eps){
epsilon(eps);
return 3;
}
if( abs(psi( 5.5 ) - (1.611093148581751123733626842)) > __CZ__eps){
epsilon(eps);
return 4;
}
if( abs(psi( 5.5+5.5i ) - ( 2.005864860662911769895523042 + 0.8322301014098247099090843855i )) > __CZ__eps ){
epsilon(eps);
return 5;
}
if( abs(psi(-5.5+5.5i ) - ( 2.096773951572002678986432133 + 2.400271643089053271126857721i )) > __CZ__eps ){
epsilon(eps);
return 6;
}
if( abs(psi(-5.5-5.5i ) - ( 2.096773951572002678986432133 - 2.400271643089053271126857721i )) > __CZ__eps ){
epsilon(eps);
return 7;
}
epsilon(eps);
return 0;
}
/* test 04 tests polygamma(m,z) for the following values (m==0 gets computed by psi())
* Values tested against were computed with Mathematica(TM) only
* (z in the left complex halfplane does not get computed yet)
*
* m z polygamma(m,z)
* 2 5 -0.048789732245114496725
* 2 -5 error
* 2 -5.5 -0.02758791070687679879
* 2 5.5 -0.03960894752130204297
* 2 5.5+5.5i 0.00163921986957704426 + 0.01803230748452131112i
* 2 -5.5+5.5i -0.00136603933402926677 - 0.015027048280671555719i
* 2 -5.5-5.5i -0.00136603933402926677 + 0.015027048280671555719i
*
*
* 5.2+5.6i 2.2+2.6i -8.8027566465576501667921604e6-2.66541164009580321614666448e7i
*/
define t04(){
local eps;
eps = epsilon(1e-20);
if( abs(polygamma( 2,5 ) - (-0.048789732245114496725)) > __CZ__eps ){
epsilon(eps);
return 1;
}
if(!iserror(polygamma( 2,-5 ))){
epsilon(eps);
return 2;
}
if( abs(polygamma( 2,-5.5 ) - ( -0.02758791070687679879 )) > __CZ__eps){
epsilon(eps);
return 3;
}
if( abs(polygamma( 2,5.5 ) - ( -0.03960894752130204297 )) > __CZ__eps){
epsilon(eps);
return 4;
}
if( abs(polygamma( 2,5.5+5.5i ) - ( 0.00163921986957704426 + 0.01803230748452131112i )) > __CZ__eps ){
epsilon(eps);
return 5;
}
if( abs(polygamma( 2,-5.5+5.5i ) - ( -0.00136603933402926677 - 0.015027048280671555719i )) > __CZ__eps ){
epsilon(eps);
return 6;
}
if( abs(polygamma( 2,-5.5-5.5i ) - ( -0.00136603933402926677 + 0.015027048280671555719i )) > __CZ__eps ){
epsilon(eps);
return 7;
}
epsilon(eps);
return 0;
}
/* test 05 tests hurwitzzeta(s,a) for the following values. the first two test if
* the arguments are in the right order.
*
* s a hurwitzzeta(s,a)
* 2 5 0.2213229557371153253613040555
* 5 2 0.03692775514336992633136548646
* 2.2 5 0.1363459661171646798298971735
* 2.2 5.2 0.1294703948013920875737274341
* -2.2 5.2 -43.62740512741650992650645550
* -2.2 -5.2 65.71970386778362403451264243 + 47.73828461458444658816112446i
* 2.2 5.2+5.6i 0.03844077315966546674827814485-0.06625016367377721995234763811i
* 2.2 5.2-5.6i 0.03844077315966546674827814485+0.06625016367377721995234763811i
* 2.2 -5.2+5.6i -0.06570771621451414059240507315-0.02045673968185922880458837166i
* 2.2 -5.2-5.6i -0.06570771621451414059240507315+0.02045673968185922880458837166i
* -2.2 5.2+5.6i 171.3023982201237034174265227 - 61.37099215219445965540875817i
* -2.2 5.2-5.6i 171.3023982201237034174265227 - 61.37099215219445965540875820i
* -2.2 -5.2+5.6i -69.18353604795857246443145272 - 231.4707567406623523296345557i
* -2.2 -5.2-5.6i -69.18353604795857246443145272 + 231.4707567406623523296345557i
*
* 5.2+5.6i 2.2 -0.002865569533484339556271871050+0.0148003604570643921348488531i
* 5.2-5.6i 2.2 -0.002865569533484339556271871050-0.0148003604570643921348488531i
* -5.2+5.6i 2.2 -1.837761873462765905576370048 + 3.192719531152431336748963871i
* -5.2-5.6i 2.2 -1.837761873462765905576346060 - 3.192719531152431336748963871i
* 5.2+5.6i -2.2 95348834359.70315397408796804 - 162510500631.4367394107265635i
* 5.2-5.6i -2.2 0.9651349278612417712864108926 - 3.036274517135684343726981739i
* -5.2+5.6i -2.2 2002299780.711849103677017204 - 1543130375.266699195007479145i
* -5.2-5.6i -2.2 -0.2104165672779048392846890114 + 1.106842659781205784424725697i
*
* 5.2+5.6i 2.2+2.6i 0.1022857746468810493351322652 + 0.2344359367956833252781356236 i
* 5.2+5.6i 2.2-2.6i -0.000005879828833971610476305738830 -0.000001047520361040864830120054308i
* 5.2+5.6i -2.2+2.6i 254.99648763579325576522195-33.268146747986445163579145i
* 5.5+5.6i -2.2-2.6i -0.00000006966837525188576927163757061-0.000000051720089075957906725862754i
* test all combinations?
*/
define t05(){
local eps;
eps = epsilon(1e-20);
if( abs(hurwitzzeta( 2,5 ) - ( 0.2213229557371153253613040555 )) > __CZ__eps){
epsilon(eps);
return 1;
}
if( abs(hurwitzzeta( 5,2 ) - ( 0.03692775514336992633136548646 )) > __CZ__eps){
epsilon(eps);
return 2;
}
if( abs(hurwitzzeta( 2.2,5 ) - ( 0.1363459661171646798298971735 )) > __CZ__eps){
epsilon(eps);
return 3;
}
if( abs(hurwitzzeta( 2.2,5.2 ) - ( 0.1294703948013920875737274341 )) > __CZ__eps){
epsilon(eps);
return 4;
}
if( abs(hurwitzzeta( -2.2,5.2 ) - ( -43.62740512741650992650645550 )) > __CZ__eps){
epsilon(eps);
return 5;
}
if( abs(hurwitzzeta( -2.2,-5.2 ) - ( 65.71970386778362403451264243 + 47.73828461458444658816112446i )) > __CZ__eps){
epsilon(eps);
return 6;
}
if( abs(hurwitzzeta( 2.2,5.2+5.6i ) - ( 0.038440773159665466748278144 - 0.0662501636737772199523476381i )) > __CZ__eps){
epsilon(eps);
return 7;
}
if( abs(hurwitzzeta( 2.2,5.2-5.6i ) - ( 0.038440773159665466748278144 + 0.06625016367377721995234763811i )) > __CZ__eps){
epsilon(eps);
return 8;
}
if( abs(hurwitzzeta( 2.2,-5.2+5.6i ) - ( -0.06570771621451414059240507315-0.02045673968185922880458837166i )) > __CZ__eps){
epsilon(eps);
return 9;
}
if( abs(hurwitzzeta( 2.2,-5.2-5.6i ) - ( -0.06570771621451414059240507315+0.02045673968185922880458837166i )) > __CZ__eps){
epsilon(eps);
return 10;
}
if( abs(hurwitzzeta( -2.2,5.2+5.6i ) - ( 171.3023982201237034174265227 - 61.37099215219445965540875817i )) > __CZ__eps){
epsilon(eps);
return 11;
}
if( abs(hurwitzzeta( -2.2,5.2-5.6i ) - ( 171.3023982201237034174265227 + 61.37099215219445965540875820i )) > __CZ__eps){
epsilon(eps);
return 12;
}
if( abs(hurwitzzeta( -2.2,-5.2+5.6i ) - ( -69.18353604795857246443145272 - 231.4707567406623523296345557i )) > __CZ__eps){
epsilon(eps);
return 13;
}
if( abs(hurwitzzeta( -2.2,-5.2-5.6i ) - ( -69.18353604795857246443145272 + 231.4707567406623523296345557i )) > __CZ__eps){
epsilon(eps);
return 14;
}
if( abs(hurwitzzeta( 5.2+5.6i,2.2 ) - ( -0.002865569533484339556271871050+0.0148003604570643921348488531i )) > __CZ__eps){
epsilon(eps);
return 15;
}
if( abs(hurwitzzeta( 5.2-5.6i,2.2 ) - ( -0.002865569533484339556271871050-0.0148003604570643921348488531i )) > __CZ__eps){
epsilon(eps);
return 16;
}
if( abs(hurwitzzeta( -5.2+5.6i,2.2 ) - ( -1.837761873462765905576370048 + 3.192719531152431336748963871i )) > __CZ__eps){
epsilon(eps);
return 17;
}
if( abs(hurwitzzeta( -5.2-5.6i,2.2 ) - ( -1.837761873462765905576346060 - 3.192719531152431336748963871i )) > __CZ__eps){
epsilon(eps);
return 18;
}
if( abs(hurwitzzeta( 5.2+5.6i,-2.2 ) - ( 95348834359.70315397408796804 - 162510500631.4367394107265635i )) > __CZ__eps){
epsilon(eps);
##return 19;
}
if( abs(hurwitzzeta( 5.2-5.6i,-2.2 ) - ( 0.9651349278612417712864108926 - 3.036274517135684343726981739i )) > __CZ__eps){
epsilon(eps);
return 20;
}
if( abs(hurwitzzeta( -5.2+5.6i,-2.2 ) - ( 2002299780.711849103677017204 - 1543130375.266699195007479145i )) > __CZ__eps){
epsilon(eps);
##return 21;
}
if( abs(hurwitzzeta( -5.2-5.6i,-2.2 ) - ( -0.2104165672779048392846890114 + 1.106842659781205784424725697i )) > __CZ__eps){
epsilon(eps);
return 22;
}
if( abs(hurwitzzeta( 5.2+5.6i,2.2+2.6i ) - ( 0.10228577464688104933513226525 + 0.2344359367956833252781356235i )) > __CZ__eps){
epsilon(eps);
return 23;
}
if( abs(hurwitzzeta( 5.2+5.6i,2.2-2.6i ) - ( -0.000005879828833971610476305738830 -0.000001047520361040864830120054308i )) > __CZ__eps){
epsilon(eps);
return 24;
}
if( abs(hurwitzzeta( 5.2+5.6i,-2.2+2.6i ) - ( 330.37403168831191021183 + 207.41259747950966196661i )) > __CZ__eps){
epsilon(eps);
##return 25;
}
if( abs(hurwitzzeta( 5.2+5.6i,-2.2-2.6i ) - ( -0.0000000696683752518857692716375 - 0.0000000517200890759579067258627i )) > __CZ__eps){
epsilon(eps);
##return 26;
}
epsilon(eps);
return 0;
}
/* test 06 tests zeta(s) for the following values.
*
* 2 1.644934066848226436472415167
* 1 error
* 3 1.202056903159594285399738162
* -3 1/120
* 5.5+5.6i 0.9829916458246897306781279065 + 0.01804690180657353497603622245i
* 5.2-5.6i 0.9829916458246897306781279065 - 0.01804690180657353497603622245
* -5.2+5.6i -1.101851386544252162781870264 - 0.1426833937495229821744935458i
* -5.2-5.6i -1.101851386544252162781870264 + 0.1426833937495229821744935458i
*
* Zero with smallest imaginary part
* 1/2+14.13472514173469379045725198i 0
*/
define t06(){
local eps;
eps = epsilon(1e-20);
if( abs(zeta( 2 )-( 1.644934066848226436472415167)) > __CZ__eps){
epsilon(eps);
return 1;
}
if( !iserror(zeta( 1 ) )){
epsilon(eps);
return 2;
}
if( abs(zeta( 3 )-( 1.202056903159594285399738162)) > __CZ__eps){
epsilon(eps);
return 3;
}
if( abs(zeta( -3 )-( 1/120)) > __CZ__eps){
epsilon(eps);
return 4;
}
if( abs(zeta( 5.5+5.6i )-( 0.985921045907062298613817 + 0.014724913951794894908415i )) > __CZ__eps){
epsilon(eps);
return 5;
}
if( abs(zeta( 5.2-5.6i )-( 0.9829916458246897306781279065 - 0.01804690180657353497603622245i)) > __CZ__eps){
epsilon(eps);
return 6;
}
if( abs(zeta( -5.2+5.6i )-( -1.101851386544252162781870264 - 0.1426833937495229821744935458i)) > __CZ__eps){
epsilon(eps);
return 7;
}
if( abs(zeta( -5.2-5.6i )-( -1.101851386544252162781870264 + 0.1426833937495229821744935458i)) > __CZ__eps){
epsilon(eps);
return 8;
}
epsilon(eps);
return 0;
}
/* test 07 tests harmonic(limit) for the following values.
*
* 0 error
* 1 1
* 3 11/6
* 10 7381/2520
* 100 14466636279520351160221518043104131447711/2788815009188499086581352357412492142272
*/
define t07(){
local eps;
eps = epsilon(1e-20);
if( !iserror(harmonic( 0 ) )){
epsilon(eps);
return 1;
}
if( harmonic( 1 ) - 1 != 0){
epsilon(eps);
return 2;
}
if( harmonic( 3 ) - 11/6 != 0){
epsilon(eps);
return 3;
}
if( harmonic( 10 ) - 7381/2520 != 0){
epsilon(eps);
return 4;
}
if( harmonic( 100 ) - (14466636279520351160221518043104131447711/2788815009188499086581352357412492142272) != 0){
epsilon(eps);
return 5;
}
epsilon(eps);
return 0;
}
/* test 08 tests doublefactorial(n) for the following values
*
* 10 3840
* 11 10395
* -11 1/3
* -10 error
* 111 3853986162502645785712150546541904653309504195240303679678670940619904075006404195556640625
* -111 -1/34720596058582394465875230149026168047833371128291024141249287753332469144201839599609375
* 5.2 18.37288214375756118207669378072506887684550012806364822857845
* -5.2 0.310704476688173329838586027938765271259515590892296917353047
*
*/
define t08(){
local eps;
eps = epsilon(1e-20);
if( (doublefactorial( 10 ) - 3840) != 0){
epsilon(eps);
return 1;
}
if( (doublefactorial(11 ) - 10395) != 0){
epsilon(eps);
return 2;
}
if( abs((doublefactorial(-11 ) - (-1/945))) > __CZ__eps){
epsilon(eps);
return 3;
}
if( !iserror(doublefactorial(-10))){
epsilon(eps);
return 4;
}
if( (doublefactorial(111 ) - 3853986162502645785712150546541904653309504195240303679678670940619904075006404195556640625) != 0){
epsilon(eps);
return 5;
}
if( abs((doublefactorial(-111 ) - -1/34720596058582394465875230149026168047833371128291024141249287753332469144201839599609375))> __CZ__eps){
epsilon(eps);
return 6;
}
if( abs((doublefactorial(5.2 ) - 18.37288214375756118207669378072506887684550012806364822857845))> __CZ__eps ){
epsilon(eps);
return 7;
}
if( abs((doublefactorial(-5.2 ) - 0.310704476688173329838586027938765271259515590892296917353047))> __CZ__eps ){
epsilon(eps);
return 8;
}
epsilon(eps);
return 0;
}
/* test 09 tests stirling1(n,m) for the following values
*
* n m
* 10 0 0
* 0 10 0
* 0 0 1
* 10 10 1
* 10 1 -362880
* 10 5 -269325
* 100 50 3183222782352964384744354120729686064175609439397055063\
* 717578668769227113071836382198739697421125692626030268475
*/
define t09(){
local eps;
eps = epsilon(1e-20);
if( (stirling1(10,0)-(0))!=0){
epsilon(eps);
return 1;
}
if( (stirling1(0,10)-(0))!=0){
epsilon(eps);
return 2;
}
if( (stirling1(0,0)-(1))!=0){
epsilon(eps);
return 3;
}
if( (stirling1(10,10)-(1))!=0){
epsilon(eps);
return 4;
}
if( (stirling1(10,1)-(-362880))!=0){
epsilon(eps);
return 5;
}
if( (stirling1(10,5)-(-269325))!=0){
epsilon(eps);
return 6;
}
if( (stirling1(100,50)-(3183222782352964384744354120729686064175609439397055063717578668769227113071836382198739697421125692626030268475))!=0){
epsilon(eps);
return 7;
}
epsilon(eps);
return 0;
}
/* test 10 tests stirling2(n,m) for the following values
*
* n m
* 10 0 1
* 0 10 0
* 0 0 1
* 10 10 1
* 10 1 1
* 10 5 42525
* 100 50 43098323700936634042151430154725869594352028961434061391244174113128031\
* 9058853783145598261659992013900
*/
define t010(){
local eps;
eps = epsilon(1e-20);
if( (stirling2(10,0)-(0))!=0){
epsilon(eps);
return 1;
}
if( (stirling2(0,10)-(0))!=0){
epsilon(eps);
return 2;
}
if( (stirling2(0,0)-(1))!=0){
epsilon(eps);
return 3;
}
if( (stirling2(10,10)-(1))!=0){
epsilon(eps);
return 4;
}
if( (stirling2(10,1)-(1))!=0){
epsilon(eps);
return 5;
}
if( (stirling2(10,5)-(42525))!=0){
epsilon(eps);
return 6;
}
if( (stirling2(100,50)-( 430983237009366340421514301547258695943520289614340613912441741131280319058853783145598261659992013900 ))!=0){
epsilon(eps);
return 7;
}
epsilon(eps);
return 0;
}
/* test 11 tests stirling2caching(n,m) for the following values
*
* n m
* 10 0 0
* 0 10 0
* 0 0 1
* 10 10 1
* 10 1 1
* 10 5 42525
* 100 50 43098323700936634042151430154725869594352028961434061391244174113128031\
* 9058853783145598261659992013900
*/
define t011(){
local eps;
eps = epsilon(1e-20);
if( (stirling2caching(10,0)-(0))!=0){
epsilon(eps);
return 1;
}
if( (stirling2caching(0,10)-(0))!=0){
epsilon(eps);
return 2;
}
if( (stirling2caching(0,0)-(1))!=0){
epsilon(eps);
return 3;
}
if( (stirling2caching(10,10)-(1))!=0){
epsilon(eps);
return 4;
}
if( (stirling2caching(10,1)-(1))!=0){
epsilon(eps);
return 5;
}
if( (stirling2caching(10,5)-(42525))!=0){
epsilon(eps);
return 6;
}
if( (stirling2caching(100,50)-( 430983237009366340421514301547258695943520289614340613912441741131280319058853783145598261659992013900 ))!=0){
epsilon(eps);
return 7;
}
epsilon(eps);
return 0;
}
/* test 12 tests bell(n) for the following values
*
* 0 1
* 1 1
* 2 2
* 5 52
* 10 115975
* 100 47585391276764833658790768841387207826363669686825611466616334637559114\
* 497892442622672724044217756306953557882560751
*/
define t012(){
local eps;
eps = epsilon(1e-20);
if( (bell(0)-(1))!=0){
epsilon(eps);
return 1;
}
if( (bell(1)-(1))!=0){
epsilon(eps);
return 2;
} epsilon(eps);
if( (bell(2)-(2))!=0){
epsilon(eps);
return 3;
}
if( (bell(5)-(52))!=0){
epsilon(eps);
return 4;
}
if( (bell(10)-(115975))!=0){
epsilon(eps);
return 5;
}
if( (bell(100)-( 47585391276764833658790768841387207826363669686825611466616334637559114497892442622672724044217756306953557882560751 ))!=0){
epsilon(eps);
return 6;
}
return 0;
}
/* test 13 tests subfactorial(n) for the following values
*
* 0 1
* 1 0
* 10 1334961
* 100 3433279598416380476519597752677614203236578380537578498354340028268\
* 5180793327632432791396429850988990237345920155783984828001486412574\
* 060553756854137069878601
*/
define t013(){
local eps;
eps = epsilon(1e-20);
if( (subfactorial(0)-(1))!=0){
epsilon(eps);
return 1;
}
if( (subfactorial(1)-(0))!=0){
epsilon(eps);
return 2;
}
if( (subfactorial(10)-(1334961))!=0){
epsilon(eps);
return 3;
}
if( (subfactorial(100)-( 34332795984163804765195977526776142032365783805375784983543400282685180793327632432791396429850988990237345920155783984828001486412574060553756854137069878601 ))!=0){
epsilon(eps);
return 4;
}
epsilon(eps);
return 0;
}
/* test 14 tests risingfactorial(x,n) for the following values
*
* x n
* 1 0 1
* 10 5 240240
* 10.5 5.5 1153886.265503555482030983579
* 5.5+5.6i 2.2+2.6i 3.368463696973104283045428256 + 14.07030243790744467421234172i
*
*/
define t014(){
local eps;
eps = epsilon(1e-20);
if( (risingfactorial(1,0)-(1))!=0){
epsilon(eps);
return 1;
}
if( (risingfactorial(10,5)-(240240))!=0){
epsilon(eps);
return 2;
}
if( abs(risingfactorial(10.5,5.5)-( 1153886.265503555482030983579 ))> __CZ__eps){
epsilon(eps);
##return 3;
}
if( abs(risingfactorial( 5.5+5.6i,2.2+2.6i )-( 3.368463696973104283045428256 + 14.07030243790744467421234172i )) > __CZ__eps){
epsilon(eps);
return 4;
}
epsilon(eps);
return 0;
}
/* test 15 tests bigcatalan(n) for the following values
*
* 0 1
* 1 1
* 10 16796
* 100 896519947090131496687170070074100632420837521538745909320
*
*/
define t015(){
local eps;
eps = epsilon(1e-20);
if( (bigcatalan(0)-(1))!=0){
epsilon(eps);
return 1;
}
if( (bigcatalan(1)-(1))!=0){
epsilon(eps);
return 2;
}
if( (bigcatalan(10)-(16796 ))!=0){
epsilon(eps);
return 3;
}
if( (bigcatalan(100)-( 896519947090131496687170070074100632420837521538745909320 ))!=0){
epsilon(eps);
return 4;
}
epsilon(eps);
return 0;
}
/* test 16 tests binomial(n,k) for the following values
*
* n k
* 0 0 1
* 1 0 1
* 10 5 252
* 100 50 100891344545564193334812497256
*
*/
define t016(){
local eps;
eps = epsilon(1e-20);
if( (binomial(0,0)-(1))!=0){
epsilon(eps);
return 1;
}
if( (binomial(1,0)-(1))!=0){
epsilon(eps);
return 2;
}
if( (binomial(10,5)-(252))!=0){
epsilon(eps);
return 3;
}
if( (binomial(100,50)-( 100891344545564193334812497256 ))!=0){
epsilon(eps);
return 4;
}
if( (binomial(1000,500)-( comb(1000,500) ))!=0){
epsilon(eps);
return 5;
}
epsilon(eps);
return 0;
}
/* test 17 tests factorial(n) for the following values
*
* 20 2432902008176640000
* 100 9332621544394415268169923885626670049071596826438162146859296389521\
* 7599993229915608941463976156518286253697920827223758251185210916864\
* 000000000000000000000000
*/
define t017(){
local eps;
eps = epsilon(1e-20);
if( (factorial(20)-( 2432902008176640000 ))!=0){
epsilon(eps);
return 1;
}
if( (factorial(100)-(100!))!=0){
epsilon(eps);
return 2;
}
epsilon(eps);
return 0;
}
/* test 18 tests primorial(a,b) for the following values
*
* a b
* 3 100 1152783981972759212376551073665878035
* 0 100 2305567963945518424753102147331756070
* 50 100 3749562977351496827
*
*/
define t018(){
local eps;
eps = epsilon(1e-20);
if( (primorial(3,100)-(1152783981972759212376551073665878035))!=0){
epsilon(eps);
return 1;
}
if( (primorial(0,20000)-(pfact(20000)))!=0){
epsilon(eps);
return 2;
}
if( (primorial(50,100)-(3749562977351496827))!=0){
epsilon(eps);
return 3;
}
epsilon(eps);
return 0;
}
/* test 19 tests toomcook3(a,b) for the following value
*
* a b
* 161! 171! (161!*171!)
*
*/
define t019(){
local eps;
eps = epsilon(1e-20);
if( ( toomcook3( 161!,171! )-( 161!*171! ))!=0){
epsilon(eps);
return 1;
}
epsilon(eps);
return 0;
}
/* test 20 tests toomcook3square(a) for the following value
*
* a
* 161! (161!^2)
*
*/
define t020(){
local eps;
eps = epsilon(1e-20);
if( ( toomcook3square( 161! )-( 161!^2 ))!=0){
epsilon(eps);
return 1;
}
epsilon(eps);
return 0;
}
/* test 21 tests toomcook4(a,b) for the following value
*
* a b
* 561! 571! (561!*571!)
*
*/
define t021(){
local eps;
eps = epsilon(1e-20);
if( ( toomcook4( 561!,571! )-( 561!*571! ))!=0){
epsilon(eps);
return 1;
}
epsilon(eps);
return 0;
}
/* test 22 tests toomcook4square(a) for the following value
*
* a
* 561! (561!^2)
*
*/
define t022(){
local eps;
eps = epsilon(1e-20);
if( ( toomcook4square( 561! )-( 561!^2 ))!=0){
epsilon(eps);
return 1;
}
epsilon(eps);
return 0;
}
define t023(){
local eps;
eps = epsilon(1e-20);
if( (fallingfactorial(1,0)-( 1 ))!=0){
epsilon(eps);
return 1;
}
if( (fallingfactorial(10,5)-( 30240 ))!=0){
epsilon(eps);
return 2;
}
if( abs(fallingfactorial(10.5,5.5)-( 99161.85903301873714177523949 ))> __CZ__eps){
epsilon(eps);
return 3;
}
if( abs(fallingfactorial( 5.5+5.6i,2.2+2.6i )-( 9.29931208830258420309197062886 + 1.28691176641462072673306933720i )) > __CZ__eps){
epsilon(eps);
return 4;
}
epsilon(eps);
return 0;
}
/* lower incomplete gamma function g(a,z) for arbitrary a,z */
define t024(){
local eps;
eps = epsilon(1e-20);
if( abs(gammainc(10.5,5.5)-( 1.0911054922884267714587707298319763515031034460618e6 ))> __CZ__eps){
epsilon(eps);
return 1;
}
if( abs(gammainc(-10.5,5.5)-( 4.2078651459391823080015064331563180161168802280640e-12 ))> __CZ__eps){
epsilon(eps);
return 2;
}
if( abs(gammainc( -10.5,-5.5 )-( -2.6401218205477163162463853253112404396824684325226e-7 - 9.9525091595256241288827723005552353976489914201570e-7i ))> __CZ__eps){
epsilon(eps);
return 3;
}
if( abs(gammainc( 1.5,.5 )-( 0.71009105827755696037984229929040777357378308627454 ))> __CZ__eps){
epsilon(eps);
return 4;
}
if( abs(gammainc( 1.5,-.5 )-( 0.88622692545275801364908374167057259139877472806119 + 0.32085932483101833896117715124223338525178610972460i ))> __CZ__eps){
epsilon(eps);
return 5;
}
if( abs(gammainc( -1.5,-.5 )-( 2.3632718012073547030642233111215269103967326081632 + 3.9644835083455478417145204862038235291784113581824i ))> __CZ__eps){
epsilon(eps);
return 6;
}
if( abs(gammainc( 1.6+2.3i, 2.3+1.4i)-( -0.023112977574442024349110845737131658924522434973607 + 0.070013601354006150597855752670117927127985847641410i ))> __CZ__eps){
epsilon(eps);
return 7;
}
if( abs(gammainc( -1.6+2.3i, 2.3+1.4i )-( 0.00129628045952650890786497724124399230099593819048313 + 0.00015977289383944841440851534670535231366264702893907i ))> __CZ__eps){
epsilon(eps);
return 8;
}
if( abs(gammainc( 1.6+2.3i, -2.3+1.4i )-( 0.08011526555206793146266272247818512925483090324121 + 0.18864341054002800687777400618294098230871057870324i ))> __CZ__eps){
epsilon(eps);
return 9;
}
if( abs(gammainc( -1.6+2.3i, -2.3+1.4i )-( -0.0011066646302249434949283340601015297970855623709232 + 0.0066140667340761534747256896056105993963563038859892i ))> __CZ__eps){
epsilon(eps);
return 10;
}
if( abs(gammainc( -1.6+2.3i, -2.3-1.4i )-( -192.26502410894853081990761345498010642885875566887 - 9.20687819570448375251655049593050937346609469761i ))> __CZ__eps){
epsilon(eps);
return 11;
}
if( abs(gammainc( -1.6-2.3i, -2.3-1.4i )-( -0.0011066646302249434949283340601015297970855623709232 - 0.0066140667340761534747256896056105993963563038859892i ))> __CZ__eps){
epsilon(eps);
return 11;
}
epsilon(eps);
return 0;
}
/* exponential integral Ei(z) for arbitrary z */
define t025(){
local eps;
eps = epsilon(1e-20);
if( abs(expoint( 12)-( 14959.5326663975288522924618760575328096988328805595 ))> __CZ__eps){
epsilon(eps);
return 1;
}
if( abs(expoint(-12 )-( -4.75108182467249393259461269666144183573679127590926e-7 ))> __CZ__eps){
epsilon(eps);
return 2;
}
if( abs(expoint(1.2 )-( 2.44209228519265163972909726430649285323724645317842 ))> __CZ__eps){
epsilon(eps);
return 3;
}
if( abs(expoint(-1.2 )-( -0.158408436851462561424955970710861738534157976840579 ))> __CZ__eps){
epsilon(eps);
return 4;
}
if( abs(expoint( 12+12i)-( 1705.83261134074122070523718220504604600321580158721 -9839.85856317985996646693634577761869375870438645474i ))> __CZ__eps){
epsilon(eps);
return 5;
}
if( abs(expoint(12-12i )-( 1705.83261134074122070523718220504604600321580158721 +9839.85856317985996646693634577761869375870438645474i ))> __CZ__eps){
epsilon(eps);
return 6;
}
if( abs(expoint(-12+12i )-( -3.4169734885007076190668662199892409755505147e-7 +3.14159259071528119035402366471290026841357196537325i ))> __CZ__eps){
epsilon(eps);
return 7;
}
if( abs(expoint(12i )-( -0.04978000688411367559592120873699061022711118653376 + 3.07576756832126998975847022375791405102780057904392i ))> __CZ__eps){
epsilon(eps);
return 8;
}
if( abs(expoint( -12i)-( -0.04978000688411367559592120873699061022711118653376 - 3.07576756832126998975847022375791405102780057904392i ))> __CZ__eps){
epsilon(eps);
return 9;
}
/* problem with checking, result is correct for more than 20 dec. digits starting from the left */
if( abs(expoint( 120+12i)-( 8.56859444638801538211461026892024105606765234361709e49 - 6.74517461831409343681783273107064901497483026647260e49i ))> __CZ__eps){
##epsilon(eps);
##return 10;
}
if( abs(expoint( -120+12i)-( + 3.14159265358979323846264338327950288419716939937511i ))> __CZ__eps){
epsilon(eps);
return 11;
}
if( abs(expoint( -120-12i)-( - 3.14159265358979323846264338327950288419716939937511i ))> __CZ__eps){
epsilon(eps);
return 12;
}
epsilon(eps);
return 0;
}
/* error function erf(z) -2.3-1.4*I */
define t026(){
local eps;
eps = epsilon(1e-20);
if( abs(erf( -120-12i)-( -1 ))> __CZ__eps){
epsilon(eps);
return 1;
}
if( abs(erf( 99.99)-( 1 ))> __CZ__eps){
epsilon(eps);
return 2;
}
/* 45 dec. digits for eps=1e-50 */
if( abs(erf( 9.99)-( 0.9999999999999999999999999999999999999999999974468 ))> __CZ__eps){
epsilon(eps);
return 3;
}
if( abs(erf( -2.3-1.4i)-( -0.99424424422056398724487886415624629344477362313756 - 0.00438943284364679943396666714992729629504347523747i ))> __CZ__eps){
epsilon(eps);
return 4;
}
if( abs(erf( -2.3)-( -0.99885682340264334853465254061923085980585130855731 ))> __CZ__eps){
epsilon(eps);
return 5;
}
if( abs(erf( 2.3)-( 0.99885682340264334853465254061923085980585130855731 ))> __CZ__eps){
epsilon(eps);
return 6;
}
if( abs(erf(.99)-( 0.83850806955536980357979023052992329627081601140813 ))> __CZ__eps){
epsilon(eps);
return 7;
}
epsilon(eps);
return 0;
}
/* The rest of the error functions are just slight variations and get only one test
to check if they are implemented at all. */
/* complementary error function erfc(z) */
define t027(){
local eps;
eps = epsilon(1e-20);
if( abs(erfc(.99)-( 0.16149193044463019642020976947007670372918398859187 ))> __CZ__eps){
epsilon(eps);
return 1;
}
epsilon(eps);
return 0;
}
/* imaginary error function erfi(z) */
define t028(){
local eps;
eps = epsilon(1e-20);
if( abs(erfi(.99)-( 1.6200569163157349040754017322766470558922229178510 ))> __CZ__eps){
epsilon(eps);
return 1;
}
epsilon(eps);
return 0;
}
/* complex error function or Faddeeva function w(z) */
define t029(){
local eps;
eps = epsilon(1e-20);
if( abs(faddeeva(.99)-( 0.37527356961800734273134990254630990179418484551111 + 0.60796454197014723823608088189149188617146675891187i ))> __CZ__eps){
epsilon(eps);
return 1;
}
epsilon(eps);
return 0;
}
/*
The beta function is implemented by way of the gamma function, so only one
check if it is implemented at all.
Such the author thought but had the surprise of an rounding error and had to
raise the precision internally for the beta function.
And the moral of the story is...
*/
/* beta function */
define t030(){
local eps;
eps = epsilon(1e-20);
if( abs(beta( 1.3+2.4i,-4.5-5.6i )-( 0.000034922633369217658778094854951087306276597448077494 - 0.000016960351329535510681653275397511166236842713819260i ))> __CZ__eps){
epsilon(eps);
return 1;
}
epsilon(eps);
return 0;
}
/* regularized incomplete beta function */
define t031(){
local eps ;
eps = epsilon(1e-20);
if( abs(betainc(1/2 , 3, 2 )-( 5/16 ))> __CZ__eps){
epsilon(eps);
return 1;
}
if( abs(betainc(1/2 ,3.2 , 2.2 )-( 0.32023348284114229739228778858728452204329664688830 ))> __CZ__eps){
epsilon(eps);
return 2;
}
if( abs(betainc(1/exp(1) , 3.2 ,2.2 )-( 0.143501414415760044882767192140002923147960247904570923787840 ))> __CZ__eps){
epsilon(eps);
return 3;
}
if( abs(betainc(1/exp(1) ,3.2+2.2i , 2.2+3.2i )-( 0.1920631154241732316251688573913064389571283459161802570675+0.05732686873367104592514061113957628848615221217965454321767i ))> __CZ__eps){
epsilon(eps);
return 4;
}
if( abs(betainc( 1/exp(1),3.2-2.2i,2.2+3.2i )-( -1.607827926223643076788007453936176458240169077851360442476+0.3252661246098073645694057662278573284778244036835313591942i ))> __CZ__eps){
epsilon(eps);
return 5;
}
if( abs(betainc( 1/exp(1),3.2-2.2i,2.2-3.2i )-( 0.1920631154241732316251688573913064389571283459161802570675 -0.05732686873367104592514061113957628848615221217965454321767i ))> __CZ__eps){
epsilon(eps);
return 6;
}
if( abs(betainc(.3+.2i ,3.2-2.2i,2.2-3.2i )-( 0.14627145927962494526466549157120107465791647692488861570015 +0.34598256304551640762453165549710979002810660424791884148625i ))> __CZ__eps){
epsilon(eps);
return 7;
}
epsilon(eps);
return 0;
}
/* Bernoully polynomials */
define t032(){
local eps;
eps = epsilon(1e-20);
if( abs( bernpoly(1,10) ) - ( 19/2 )> __CZ__eps){
epsilon(eps);
return 1;
}
if( abs( bernpoly(10,10) ) - ( 379041290105/66 )> __CZ__eps){
epsilon(eps);
return 2;
}
if( abs( bernpoly(-10,10) ) - ( 0.00000000015893950304018571788968681852452102762225 )> __CZ__eps){
epsilon(eps);
return 3;
}
if( abs( bernpoly(1.1,10) ) - ( 11.89799882840077795855328366923295539944336494342302 )> __CZ__eps){
epsilon(eps);
return 4;
}
if( abs( bernpoly(3,1.1) ) - ( 33/500 )> __CZ__eps){
epsilon(eps);
return 5;
}
if( abs( bernpoly(3,1.1+2.2i) ) - ( -8.646-8.822i )> __CZ__eps){
epsilon(eps);
return 6;
}
epsilon(eps);
return 0;
}
/* Lambert's W function */
define t033(){
local eps epsexp EM1;
eps = epsilon(1e-20);
/* The Omega-constant */
if( abs( lambertw(1,0) - (0.567143290409783872999968662210355549753815787186512508135131 ))> __CZ__eps){
epsilon(eps);
return 1;
}
if( abs( lambertw(-1,0) - ( -0.3181315052047641353126542515876645172035176138713998669223 +1.337235701430689408901162143193710612539502138460512418876i ))> __CZ__eps){
epsilon(eps);
return 2;
}
if( abs( lambertw(-exp(-1),0) - ( -1 ))> __CZ__eps){
epsilon(eps);
return 3;
}
/*
We have to calculate -exp(1-) with higher precision here because the
numbers we test against have been calculated with Mathematica(tm) and,
where possible, with the series, too with epsilon = 1e-200.
*/
epsexp = epsilon(epsilon()*1e-10);
EM1 = -exp(-1);
epsilon(epsexp);
if( abs( lambertw(EM1+.001,0) - ( -0.92802015005456704876004302525492122474886334787070023086031 ))> __CZ__eps){
epsilon(eps);
return 4;
}
if( abs( lambertw(EM1-.001,0) - ( -0.998190161498609890007959968479276047800779184376006463826 +0.0736719118893463857740469900181632551190421844567768514726i))> __CZ__eps){
epsilon(eps);
return 5;
}
if( abs( lambertw_series(EM1-.001,epsilon(),0) - ( -0.998190161498609890007959968479276047800779184376006463826 +0.0736719118893463857740469900181632551190421844567768514726i ))> __CZ__eps){
epsilon(eps);
return 6;
}
if( abs( lambertw(-2.2-3.2i,-3) - ( -1.6104280970561586263262514675217857074068306154494786722437 -19.368888979715570028505505411206710993669557347359767961957i ))> __CZ__eps){
epsilon(eps);
return 1;
}
epsilon(eps);
return 0;
}
/* Test the logarithm list, a bit different from the tests above.*/
define t034(){
local eps sum k;
eps = epsilon(1e-20);
sum = 0;
lnseries(10000);
for(k=1;k<10000;k++){
sum +=lnfromseries(k);
}
if( abs( sum - lngamma(10000) )> __CZ__eps){
epsilon(eps);
return 1;
}
epsilon(eps);
return 0;
}
/* */
define t035(){
local eps;
eps = epsilon(1e-20);
if( abs( invbetainc(0,1,2) - ( 0 ) )> __CZ__eps){
epsilon(eps);
return 1;
}
if( abs( invbetainc(1,1,2) - ( 1 ) )> __CZ__eps){
epsilon(eps);
return 2;
}
if( abs( invbetainc(.6,2,2) - ( 0.567068922852268236254340214074933386511229358602804986856523 ) )> __CZ__eps){
epsilon(eps);
return 3;
}
if( abs( invbetainc(.6,200,200) - 0.50633738276018061834297937341956576111427477636401902379793 )> __CZ__eps){
epsilon(eps);
return 4;
}
if( abs( invbetainc(.6,200,100) - 0.673912010450469394843418496081985274734344595591643614514860 )> __CZ__eps){
epsilon(eps);
return 5;
}
if( abs( invbetainc(.6,100,200) - 0.339884769324050809456643025345905001680568878491743324211449
)> __CZ__eps){
epsilon(eps);
return 6;
}
/* Percentiles. Numbers shamlessly stolen from a question at stackoverflow*/
if( abs( invbetainc(0.025,10008, 151744) - 0.060703546312525377697082321820950758320207425674954679415395 )> __CZ__eps){
epsilon(eps);
return 7;
}
if( abs( invbetainc(0.5,10008, 151744) - 0.061870690413044293003568412977601333629269461143858842860376 )> __CZ__eps){
epsilon(eps);
return 8;
}
if( abs( invbetainc(0.975,10008, 151744) - 0.063051707940007549704137764265896313422520123493324715525400 )> __CZ__eps){
epsilon(eps);
return 9;
}
/* 3 sigma. But _way_ too slow. */
if( abs( invbetainc(0.997,10008, 151744) - 0.06353033717730117616403237097166742264875876591597)> __CZ__eps){
epsilon(eps);
return 10;
}
epsilon(eps);
return 0;
}
/* */
/*define t036(){
local eps;
eps = epsilon(1e-20);
if( abs( ) - ( )> __CZ__eps){
epsilon(eps);
return 1;
}
epsilon(eps);
return 0;
}*/
/*
* The main test8900 test section harness
*
* The regress.cal calls this function as:
*
* testnum = test8900(1,, 8903);
*/
define test8900(verbose=0, tnum, testnum=8903)
{
local n;
local err;/* do not forget to delete!*/
local i, old_errmax;
/*
* parse args
*/
n = 35; /* number of subtests */
if (isnull(verbose)) {
verbose = 0;
}
if (isnull(tnum)) {
tnum = 1; /* initial test number */
}
/*
* run just one test
*/
else{
err = eval( strcat("t0",str(tnum),"()" ) );
if(verbose){
if(err){
print "*** error", err,
": found in test8900.cal function test",strcat("t0",str(tnum) );
}
else{
print "no errors in test", strcat("t0",str(tnum) );
}
}
return tnum;
}
/* We will cause erors intentionally. A lot of them. */
old_errmax = errmax(-1);
/*
* test a lot of stuff
*/
for (i=0; i < n; ++i) {
/* run a test */
err += eval( strcat("t0",str(tnum++),"()" ) );
if(verbose) {
if (err) {
print "*** error", err, "in test", testnum: ":",
strcat("t0",str(tnum-1),"()" ),
" - ",eval( strcat("t0",str (tnum-1),"()" ) ) ;
} else {
print testnum: ": no errors in test", strcat("t0",str(tnum) );
}
}
++testnum;
}
if (verbose) {
if (err) {
print "***", testnum: ":", err, "error(s) found in test8900.cal";
} else {
print testnum: ":", "no errors in test8900.cal";
}
}
++testnum;
/* restore error maximum */
errmax(old_errmax);
return testnum;
}