Sindbad~EG File Manager
/* Akiyama Tanigawa algorithm for second Bernoulli numbers, found on Wikipedia in pseudocode */
/*
5.17.13 created file
5.18 corrected for n==0
5.31 again corrected for n==0
*/
#include <stdlib.h>
#include <time.h>
#include <string.h> /* memset */
#include <assert.h>
#include "heap.h"
#include "bignum.h"
// NSTOREDBERNOULLIS is in bignum.h so deval can use it too
/*
In Python, % is an operator on strings, used like this:
sage: for i in range(100):
....: print("\"%d\"," % bernoulli(2*i))
*/
static char *bernoulli_strings[] = // Bernoulli(2n)
{ "1",
"1/6",
"-1/30",
"1/42",
"-1/30",
"5/66",
"-691/2730",
"7/6",
"-3617/510",
"43867/798",
"-174611/330",
"854513/138",
"-236364091/2730",
"8553103/6",
"-23749461029/870",
"8615841276005/14322",
"-7709321041217/510",
"2577687858367/6",
"-26315271553053477373/1919190",
"2929993913841559/6",
"-261082718496449122051/13530",
"1520097643918070802691/1806",
"-27833269579301024235023/690",
"596451111593912163277961/282",
"-5609403368997817686249127547/46410",
"495057205241079648212477525/66",
"-801165718135489957347924991853/1590",
"29149963634884862421418123812691/798",
"-2479392929313226753685415739663229/870",
"84483613348880041862046775994036021/354",
"-1215233140483755572040304994079820246041491/56786730",
"12300585434086858541953039857403386151/6",
"-106783830147866529886385444979142647942017/510",
"1472600022126335654051619428551932342241899101/64722",
"-78773130858718728141909149208474606244347001/30",
"1505381347333367003803076567377857208511438160235/4686",
"-5827954961669944110438277244641067365282488301844260429/140100870",
"34152417289221168014330073731472635186688307783087/6",
"-24655088825935372707687196040585199904365267828865801/30",
"414846365575400828295179035549542073492199375372400483487/3318",
"-4603784299479457646935574969019046849794257872751288919656867/230010",
"1677014149185145836823154509786269900207736027570253414881613/498",
"-2024576195935290360231131160111731009989917391198090877281083932477/3404310",
"660714619417678653573847847426261496277830686653388931761996983/6",
"-1311426488674017507995511424019311843345750275572028644296919890574047/61410",
"1179057279021082799884123351249215083775254949669647116231545215727922535/272118",
"-1295585948207537527989427828538576749659341483719435143023316326829946247/1410",
"1220813806579744469607301679413201203958508415202696621436215105284649447/6",
"-211600449597266513097597728109824233673043954389060234150638733420050668349987259/4501770",
"67908260672905495624051117546403605607342195728504487509073961249992947058239/6",
"-94598037819122125295227433069493721872702841533066936133385696204311395415197247711/33330",
"3204019410860907078243020782116241775491817197152717450679002501086861530836678158791/4326",
"-319533631363830011287103352796174274671189606078272738327103470162849568365549721224053/1590",
"36373903172617414408151820151593427169231298640581690038930816378281879873386202346572901/642",
"-3469342247847828789552088659323852541399766785760491146870005891371501266319724897592306597338057/209191710",
"7645992940484742892248134246724347500528752413412307906683593870759797606269585779977930217515/1518",
"-2650879602155099713352597214685162014443151499192509896451788427680966756514875515366781203552600109/1671270",
"21737832319369163333310761086652991475721156679090831360806110114933605484234593650904188618562649/42",
"-309553916571842976912513458033841416869004128064329844245504045721008957524571968271388199595754752259/1770",
"366963119969713111534947151585585006684606361080699204301059440676414485045806461889371776354517095799/6",
"-51507486535079109061843996857849983274095170353262675213092869167199297474922985358811329367077682677803282070131/2328255930",
"49633666079262581912532637475990757438722790311060139770309311793150683214100431329033113678098037968564431/6",
"-95876775334247128750774903107542444620578830013297336819553512729358593354435944413631943610268472689094609001/30",
"5556330281949274850616324408918951380525567307126747246796782304333594286400508981287241419934529638692081513802696639/4357878",
"-267754707742548082886954405585282394779291459592551740629978686063357792734863530145362663093519862048495908453718017/510",
"1928215175136130915645299522271596435307611010164728458783733020528548622403504078595174411693893882739334735142562418015/8646",
"-410951945846993378209020486523571938123258077870477502433469747962650070754704863812646392801863686694106805747335370312946831/4206930",
"264590171870717725633635737248879015151254525593168688411918554840667765591690540727987316391252434348664694639349484190167/6",
"-84290226343367405131287578060366193649336612397547435767189206912230442242628212786558235455817749737691517685781164837036649737/4110",
"2694866548990880936043851683724113040849078494664282483862150893060478501559546243423633375693325757795709438325907154973590288136429/274386",
"-3289490986435898803930699548851884006880537476931130981307467085162504802973618096693859598125274741604181467826651144393874696601946049/679470",
"14731853280888589565870080442453214239804217023990642676194878997407546061581643106569966189211748270209483494554402556608073385149191/6",
"-3050244698373607565035155836901726357405007104256566761884191852434851033744761276392695669329626855965183503295793517411526056244431024612640493/2381714790",
"4120570026280114871526113315907864026165545608808541153973817680034790262683524284855810008621905238290240143481403022987037271683989824863/6",
"-1691737145614018979865561095112166189607682852147301400816480675916957871178648433284821493606361235973346584667336181793937950344828557898347149/4470",
"463365579389162741443284425811806264982233725425295799852299807325379315501572305760030594769688296308375193913787703707693010224101613904227979066275/2162622",
"-3737018141155108502105892888491282165837489531488932951768507127182409731328472084456653639812530140212355374618917309552824925858430886313795805601/30",
"10259718682038021051027794238379184461025738652460569233992776489750881337506863808448685054322627708245455888249006715516690124228801409697850408284121/138",
"-81718086083262628510756459753673452313595710396116467582152090596092548699138346942995509488284650803976836337164670494733866559829768848363506624334818961419869/1794590070",
"171672676901153210072183083506103395137513922274029564150500135265308148197358551999205867870374013289728260984269623579880772408522396975250682773558018919/6",
"-4240860794203310376065563492361156949989398087086373214710625778458441940477839981850928830420029285687066701804645453159767402961229305942765784122421197736180867/230010",
"1584451495144416428390934243279426140836596476080786316960222380784239380974799880364363647978168634590418215854419793716549388865905348534375629928732008786233507729/130074",
"-20538064609143216265571979586692646837805331023148645068133372383930344948316600591203926388540940814833173322793804325084945094828524860626092013547281335356200073083/2490",
"5734032969370860921631095311392645731505222358555208498573088911303001784652122964703205752709194193095246308611264121678834250704468082648313788124754168671815815821441/1002",
"-13844828515176396081238346585063517228531109156984345249260453934317772754836791258987516540324983611569758649525983347408589045734176589270143058509026392246407576578281097477/3404310",
"195334207626637530414976779238462234481410337350988427215139995707346979124686918267688171536352650572535330369818176979951931477427594872783018749894699157917782460035894085/66",
"-11443702211333328447187179942991846613008046506032421731755258148665287832264931024781365962633301701773088470841621804328201008020129996955549467573217659587609679405537739509973/5190",
"4166161554662042831884959593250717297395614318182561412048180684077407803317591270831194619293832107482426945655143357909807251852859279483176373435697607639883085093246499347128331/2478",
"-1369347910486705707645621362512824332220360774476594348356938715366608044588614657557436131706543948464159947970464346070253278291989696390096800799614617317655510118710460076077638883999/1043970",
"1124251816617941290026484851206299982774720467712867275292043701618829826708395745459654170718363182143418314514085426692857018428614935412736063946853033094328968069656979232446257101741/1074",
"-6173136454016248924640522272263470960199559328290655337530202055853397791747341312347030141906500993752700612233695954532816018207721731818225290076670213481102834647254685911917265818955932383093313/7225713885390",
"4277269279349192541137304400628629348327468135828402291661683018622451659989595510712915810436238721139546963558655260384328988773219688091443529626531335687951612545946030357929306651006711/6",
"-857321333523056180131194437347933216431403305730705359015465649285681432317514010686029079324479659634642384809061711319481020030715989009140595170556956196762318625529645723516532076273012244047/1410",
"22258646098436968050639602221816385181596567918515338169946670500599612225742487595012775838387331550474751212260636163500086787417640903770807353228157478339547041472679880890292167353534100797481/42",
"-14158277750623758793309386870401397333112823632717478051426522029712001260747920789473711562165031101665618225654329210473605281619696918061316240634857984019071572591940586875558943580878119388321001/30",
"5411555842544259796131885546196787277987837486638756184149141588783989774511509608733429067517383750706299486822702171672522203106730993581242777825864203487238429479957280273093904025319950569633979493395/12606",
"-346465752997582699690191405750952366871923192340955593486485715370392154894102000406980162521728492501917598012711402163530166516991115122131398542029056286959857727373568402417020319761912636411646719477318166587/868841610",
"2269186825161532962833665086968359967389321429297588337232986752409765414223476696863199759981611817660735753831323900456495253961837175924312108872915089534970310604331636484174526399721365966337809334021247/6",
"-62753135110461193672553106699893713603153054153311895305590639107017824640241378480484625554578576142115835788960865534532214560982925549798683762705231316611716668749347221458005671217067357943416524984438771831113/171390",
"88527914861348004968400581010530565220544526400339548429439843908721196349579494069282285662653465989920237253162555666526385826449862863083834096823053048072002986184254693991336699593468906111158296442729034119206322233/244713882",
"-498384049428333414764928632140399662108495887457206674968055822617263669621523687568865802302210999132601412697613279391058654527145340515840099290478026350382802884371712359337984274122861159800280019110197888555893671151/1366530",
"2250525326187264545900714460628885135841050444551247116222631411681549780530233516069957534394574922579290608180427520318235621123686109474343887857944611842438698399885295153935574958275021715116120056995036417537079471/6",
"-110636644250856903590976481422794879200517231299540994715372334521128669716264196333811025709747746193210786820114369025849897345722531098042760530922656878891556664782168465095563132092311332073097630676251482491663634626858373/281190",
"2525292668891404920279427026668969389456388249389889339455604316691573384284678293620100066924361693666444722338743839198221347931651916807651198800935942493038194104759967208073711284671045255047521429204396148980705984836743/6",
"-12407390668433023412711473483696990726334795896412761472587854072142800403373577087021298541061094633377354326966623278849423631924808044397822651135905640812063181221280972334965193338438214107578486417026806166184210160001817890901/27030",
"4708181368529492614110644197951837317202610608341257204206693195241245204360822875910613010433572133227831741097261618833206537519198885812254347219150482005543422997225440204041473518187636442241332621804718967775203938403965710395632762155/9225988926",
"-1856110669947388268389361040689764027464160460436671923253131176853224087741924378432403442710398247642246902212818749685974336641529240178398124235555437625251481044526024910356131819016670047949661636539964662370375622630863327168696307/3210",
"4005748930070152861935826766476856180706477227448622268042052745245798242539770546339789899546160341590069109467023517085578618986055969187202731878271685432460708841118506310943865592568791360294244451765746911808994482063783730693703607/6",
"-11993122770108617858536443322964878003618156069559794803117809279608039120818829088000103355036592864877954563564831932363414886811786054601318517206937549605059298307895591515771731031691422489377098686236263367916404512751010916862894129855138281961/15270994830",
"5646413644023523531472659729552574911763686780871700375627426663366507837122353997075891736706811337698248660838754243486778190331522785903661556458651175061469825204821206611273990250663647381261360659950519735730925202117606150672170127523599/6",
"-8717064809960074651332043679796544474420053189621803209941154764877242575579617540185166306094852502223738126111951612525627910517501081576202264770178546608710937474005742969950212404955732473198451623024108934373488641161751158901712323446768306053/7590",
"13368053158552172665210852539359893340369870651951497976111882891296650008003955172160792457229376320993686817755409436399268291095350295968657381088168219133490277914269064723832062615431730061224649980566693258603099340996988542301914519271322675688591/9366",
"-3018240015081392087620978688311925380399983229633120268872695911807562982111154053235820050168829922189401964755775948260724401542319799566237745986245598102255191922935742610508280966462644022540839619861091049093129359799053781543195492373882916779852781709/1671270",
"3168221108903401670436878558215734893322849540781208738796672473984272484396317849596978630272031342024194689871467916186898192771267438982228710525079886956295106197431401217357893460897221381410667385636049264583380749631776691121592016493432807733153743581/1362",
"-1906502909997888166123201923177385833567729039151413143876271870599057704445939156075718972624235764657102074902610737729027517674632609562387841658709266014329005407533521950744449109807215808770201247724932231495252981632908042371307965561986133763291349835081839/625170",
"12620737044909818561832856090355555624016887319605261762997689571062646649745107532482632213152948299491122977690702642386377706799989565320538433072623252159464115918057294711396625436506736041542403370025258477205101808063594056759977272469883621048184279331863155/3102",
"-2277782962749544647786193093844710000584561145527861043594866852071596440076587235747852022645695523676561694856919437156369375152041285055935622032497285897151359345040171955786899011718891877065760345722163063921177723102631428767500963315657655779698470644544064472947/412410",
"480867224771001697116513683699011649496855159878152931805742068517626950204279499281932407966997815888727039144001177194783700618900740782637516562256421883686495287564849123342843286211825800198337962453448529082007644439295666002669973893196613894216505936316966183107269/63042",
"-321467133590936589398380572003196190798000628347443663674019204361034039315014370869884972981404460888272855773233080186485230316544246541168364468343631969225480324799028067015621769939718443419712110857965409179947456994970687005134042835903494172569465751671057323145801/30",
"21954828084819816230623427376391154946628510524415478471365831649487269438565442138452375719697629394886161086199009071745032148355699097673730377547354631757000924688032674454208386076360699273002129330161098228962653466112032300056534380609136268347425707537340996253935261001/1434",
"-212191008579182060478563837945461872287372869333130175188325135660897759482730035448146388858205966593247205572842356279587190846758925659038643395344396334821348861518596112373605365460921821915409949436456394757252173113308288776951844012432992719925522001911419529928297005743854184672707/9538864545210",
"4535049728315239205021018362829154800039522502549714840841943960634084990270225535043892135549408608572877513963384530325758104248133124392959997485849004663162061065909846598215984547677506961593292880902830325868627515047168286738527241360778218692535254144583771935549805772798793/138",
"-1480677868678810347062135814574727890490996459903153909612611791768134015908900253197632543925157559965099005581639883558125985134242978146873558628010545299879178299856929100217178891524159543673803785481607540954533057560554704283718320006046424881681934129216249889269701182688055001/30",
"262668605206102118430195944953058387315319589613263079853189811674338644589939356676047394737425651989092115424635212785341601958591806782599345416064945113338168378810138043832891536358769753916174695061208903056552776976154338169779827414504134808495078925108569042616724875466536400029203/3486",
"-3507445546375253318342667741949651253516986113349672180095468758145505921133172244240023419466113277413785800736682458966212429373095894934752041434119711352215164597094886530278429206637066302031501412499166263642447542289785723225064437740655097573160922291075175522551466276032634749948001/30",
"3053985414762198703102020975667535181880294373982570358384262712216099013630127381226064671248970168701164841859177635139561220373102316273710980757409295039231697360536736113380473515993580188204966808323201772081668695321316425977503713933894934399351348240918411922863059423248058823372368106375/16566",
"-89774288871630307843644520580598652632613559409413344033893019938898862113876440183943307724290509165539815764354254584162176909463971675189351699717189454959415964995262823025743004001915975128242680213612581748367743077774468104545056300803334120339537905702856877606246855867891786763741486735368783092237/303940201110",
"2884759276650094186013272224259584433367802183845217969121665253431996536437413850716488026971480747022580182931940812035472752343853999483816456012957551120812115224018480617695398681102870535795278832047330709610952952566962354787854087985127629191094880078635434933391568643930279007460403102076327/6",
"-104203435297641800915507592803138769896333127491490532929531166632958450572751929026080533456531382568746630428805839898606131705503722712567379172835813497582706763790263297372586804372654090271412733654409742029405259156130663560412599913831518338400385290760913773448329773518728092595019422753511174189569/131070",
"56081693586889462275051589447484617682656486262465693822181172785524218338951641908717980184709547885060218908068568000776767834360070429300833879662707069272458173745883316346369196270761641325176838738153606175963665383216626724969370509650128327157862121275587666040290047452303859942885949047756404247033/42",
"-5218507479961513801890596392421261361036935624312258325065379143295948300812040703848766095836974598734762472300638625802884257082786883956679824964010841565051175167717451747328911935282639583972372470105587187736495055501208701522099921363239317373617854217050435670713936357978555246779460902210809009009539232173/2291190",
"6225500408881102797510043328034969466304425964851480796588968345345616249056035479080489691323529597769377127237910326626106353639640430862662758276037155818313797361926063056784629357346246050085674910484712331211955483400507386944492614175497512823803191508029088188458205305675244351279445756172428826335261196513/1578",
"-2597900408162896058710572658949818524468219266931291835479959418094890120803707468900281325124704535527442908101022615930505212028093980003061941163493997948367473301269937152541190254678821414979800759785215240308773060568770563333752614741579673909061322574414039421772773951907381124389083123642187877106727324831409104559/374416770",
"74333782054653889423743469213152655799143173104421681719953140280099539295673341397636592724713785397334372991707306538931885461890982390991361955644690371434518008626267056713898856350449471518770634624568188698734199687848634136577815884007651660546155376602651878199847336975669075705029220024942988801596540479832623/6",
"-181215287752963297591649028858266281596159320543301504003425598637697061538040522696126018237983659329700516696739148841351912957174525785315414144429136591554131215700560325949733256954674813149699783016318415338094395743152932542723256830883071638325957369194991055197776850603497527503600109515880553950890416293966947553269/8070",
"3046520935696995573515824242272701117754774305790084108344788704634810391537752246673386049133783821395486096239148415641722199623177956366799133314531041402021345562799254459886856571341036470447536143349353694309187363616222605848012490292828963830868021774140963898080446961958927794750526681977409210580806334902707423302910890705/73743978",
"-5389479287019828859012200442343326192355509012382167997444221939499202340581932428533725140323939479047999949436682248001244967154707104896269136682582392582110484972339408510822230035412430172890925658230152084954903826143390588854318458185729506889417244891371385482660658834892925089584501833253476537744400283864408173645832802729/69870",
"876921640102601760383168273082801324788039055564836901409234298002253995782034121007322766508391364331313364222035613918206397636790569250311165509441010945170696883786500399759308075144882184008248023432975450281978336106603716700929424210717924897570827498252893067062775490058563356806930680935200945326351681714440032862515566687/6",
"-1388182772753480224524259543538426023294781120119840766760993950456297256537536762358314128425435909635398077811882539199662711471185655335807263675649242817349083277475519035786895107126764049407549359856712249235123586468592541328115099760851178135792262280438168965402774928136789551166963401124472782522202058296880872854126156007513528607131/4940319930",
"3288574272791325983707258196648395370596305758341699742238893225440550539879910098002426164478935667759666907669638986616709137799200377160559516125812795457124992507785560266265469172399329113247421069765604730822849303184464007727659407021486798188927253139176046166778181472669994161900278671855691024038916704559966546186751742476372279/6",
"-8490228242595311199119920565849009760217791023572798918266374350550246366225435144540895862924269878096526376888988896473279190955432566511173411205746712397692187887537779437718173050158951105924254322875775498449791436769311967741327489636985694874281460516082075289295724305512800386456299241907049270636679469815489106102786158831873003971980149529/7828173870",
"25875593499348128833220857256544133843109199942629172661571575831896009002717379314993110538912888759932261638883397790531299585084426973156913779915781848556311555818927755071422637872741239146696501724664788565419251002500248036396312656297993421996811407029386847063439782311617981818206546311041142991312322619717261878315979033851316268092742291/11886",
"-132959963583526612558423182997702578242047892089625754241387587021938995020766563989990185987109982064786136276402406795608981540644133005568845598733701027267134930895872207756078937107416605123323092749911180763524271940975157312568091937739185681066178901105822385739566191012805835839265694429000135104051173197039224461050364993416415448157657001/30",
"1262786340764743836543650366374180273258073609841543441787781675688541881984249268360325012510167918286412665710785332495002470256724535451201518584261363284544626088778140281353574806840036456927404244048497506339393258324386379574048562781825209799628261527492591555049229691481538713081331723845462120745928641410668923052992096071568118182416749081409/138",
"-4426158122015997656918081228667589801499808940970897924307086870252646875948841652238923933674489065786806672342321537012751674084821846458685429618183214525289276658012594349154796284960120596423811831259041410965661717709958659062147534583171671141655182016580199364485449629732438469542501153689517957906763036169880300563526920600913900347892060168169080524563821/231026334630",
"158378960459933745353732673983377704622086418682000111407542005580986544145352715435649528631197645211762019722767661122078958064217177336225880988737955740461066476486097551548991955116319546315427449493825430704787375985685635337262886136570504412827663590990198163434342208367501561777230870660164068668650416176368657029205310526817730948015526849382859712055/3894",
"-769496271232217048566454403451119653773906354892060893481293713784107951847019857310739767770463076516560575249619621659718985646126964039659981825577646225301189082287264198134787013538174178383958494473734277012586809351930781277345290942985827690026019144748986116319143448962997698665018791994064217597704711709748695678908604180272686662449493086793580970828093/8790",
"344977368185637380304333898730614153996525419281986770522385915720139215554847760949870834982202303432587625997234795118134923343663265548204594792841811439303451011251437993865656175552484850145014444202587617378736472160288579064961864004275382498994164923679644150818450558302750885234058860046684381556954878962153088786251490404112306387375170114820733240249707147/1806",
"-1888575590158495996440108433926788958859450449505827069108529221911737605491094242128180304966356165162290173103044092702582217959772178183606221416867140355106476799094653551123469827906281690228047604677838808485752658196964935031379587556530427680306537879720377479310817318584744711522453387072627648438830200285728320936098194745411999104991803838665658699650727659349/4470",
"5683175611528696607080062478072501820703250802520963611339740016328084145085898175251616359343168595858108624167762131679681416977895536025003761007598913177279789271071880600643885302907670572288368816385439218707793725555126269377090645484013184046265389329719449523663221529092764894703813815177897980268745011893371899061378940560801507189664711567121796987700152153839/6",
"-1863878995204859011995045341848156066182191846635905937518715320655775958174360523134990756922303410810482600528769479642021001218415879006164302955370460829146434807964717737195356935144151583424833154250047747433575584999029126775186293388721514970183351129809976971603227633930434923843984829580311593372565398574762880028289167635570012415606941367995702212211519561707046505473575241/866054419230",
"29732914652005326308069038299046877228165947489285775398232775554326821654997284254954541436759755619186929818878962419179787160694148360451817997811323189321730570436847238527392204080083670713746104123180927363450365552833743396887002966884296848913481132785586683120732369858597153076261127975076406564459518695821788635361711463230165952857117226399909961673058570176834883271/6",
"-5896752302971586952817880137553548037522952101385717862219869597959540714708235406233632122536677446426246295692119684486036889235399687553979484886254426933587637080451003789769961323298135257953657891721726854085498886402779031921701364180427128346719739542203363106920603436185256970882544947794042043194815113693600814746189709447821507079960920412101317160689806936226622681106017/510",
"689735739192864790938869842200448522491622174065530181755219067505817267965189978776569968680399983089600630968341102178380777713630583306140103562669027424552384203113812510243331805627699809267240054344772443480095752572066698167737729190346148297831547431732607091731942172905658944645576233950351675859756367833238423434368779109181349635099892383418900862720397266277623080279813067604999/25233558",
"-1310028313878567907114692495908315703121191755911131111984360268010339291958527789632281425987720420051304810543373657881574797353695997625625576992435250954115647419075544944736054854015711074248873686155373327776946348644567049129984144807198780234107278733859628145334731952115798551768101817753443736023659080348249001450368140437083583099127029870537678245450148711191680759214684176445667/20010",
"3260606235276851195099437047707916012280054709370077715052312896011476347066426313756906147929976324639617487079038182718315850586912998681890040154101217023601746358548442139356881761209491879344448144235471024519916730280314406401197057752850694124801781598205133338269426259564611182358074475139266646779460335469700559434884540406485299632013344690352700850048935613677493364152601347478976955/20526",
"-219310221923496085124921823808404575155215719519880743817262187359846676808720933963496193287320441312135479981243085410780329920552595746251706979452929554249409283208988310305531179583355242953344731240610852110199480347842183280905881606393786883347661578747110380713468900860626627458517735797820729101052113795399477516376330508889102106163067720003973339359314302749857453315620772706780505888813811597/561706691910",
"5831963211655227469096364047000879785191356939385161602680269994879257080042651495531334620369899431331189755049833242684170073167978643108706019166324688447112227778757784415956624614457808484212568132108937476630344240535741105415692911032767001030027558118855855057952089777910853586423077582781831060554157175555095233630076901455631073919888020711465283697536929732899568769525385745975473155407/6",
"-23306762036180954707239902303733182709978468580325093149239040051634149745258544596562134540960231525935441270015799599621135682414015382311861534597843756730857227145200622246509066032795288017634942726754909458234645264430702930529842456653080378544365215066466596986953601385998432554535709196917229350478449221406496506432167664369239478872974247912601100426306339312275565475595669640092216631914518917/9510",
"28122967090195287981055019523746421026174611154606607881410834553821571195600077156388139504050817072318352135336014937133504488344591033637378875175488860842142200215544952457462251551728305545862703146471647483394138505742989863336231595764600339418866218322681285266901817977284569573044604541872422517736195703069383015638214571378546092320911382385141634160156861783095114673655212399723765743717305197851/4494",
"-3721822981147963543473628721718160389675395897437503779226807860482566691214705959016239951890193486758232537597591642279654459920857716018601998378015710967458002507660860624568924448328452560808376796224541899685756821793434321138838512925307216420554703983171171540795387100799809353390519107647717976213032752752815159815739322121041527686676774334782328158773314452206678687770745486976844581551304048486668867/230010",
"11947011202513683767723104489271471097868501873399758887514336934592822829976646702161909309680237660201998669294617552009638464244432709441651377979627696796385888263305915811924616794303093449550416640107641304231571552322204363229110497299236034396583681906657985198177302972578027688117382447661848083476283296893356637990999976607059658190271101386708876477455968880271181353449021120174672279118531405266405457/282",
"-3829393826694851442367963605345986414644123194149055126713238369521199883032584377556163984602775965899294620028160948209504229098195604243661949859717087550540749941206115020546490009175884700307199551574107407855402424207686775155726579245497021834551699678553804651177095786249593672236240744422195553711332954204942399883879329051596664648871055498926334411033125995310873151284771962309916237507813788879633942447325937291/34098248730",
"1808383072515392862130370135635372000131626793093148880779287649928820293768508592707521055628027708276165829705670838064031068574527612930799078981578676791129015219438793213734036863426110360623900757855812426023541159774905365518756692026508213803668789819570234151094586211640196633499617063941661470860479560003474875427679061750173843509685528353151826146684405535206504936136026796030365288231301797295663647612503/6",
"-2038920955732166704563544675871539298534664548832344594940419211031004686244887980129990722833481906996574995006272283772989552251711645339529824674672295721387444989765197094356625686277258759887529063884063441729464466695304817154879753936013360244814470171255312860420052459456595966677396165132301906628818307744454944935388834925108370678592735494494812411438800013100442226704887804736057100084506757161238437561170752083/2490",
"16450740261761201488286514086666341385844412580813949724000155038308870188720719658119876451207931032748030811189911338403495201879917853940007778344522354341186748832271809821828409298207968739139227014609598106703237472043228932298563800984396865943755795758369082954888437302866500408097109163018555655697695594114688192421141599313689189778427690359665256283948257291245464556741556264558183330312680675299274129472749543281530376155/7305236862",
"-31404740573139387013607323899060788461129734403267877740839079468522117216337083625061725107066347029224470970177830290797457104821060170534363148276651160571699094881049180803660482733644591278636224534484481850814754420273709821201199908209760469191567840252247706876075856090781209456764232767086688491357087469900906692342923336064928179724546370791109956974800789303951709599892246386582961297095349501749155074025993332911366367/5010",
"105959450712139358561614326750678748291627849550191512662380413294068107407247886566713525350838198788534238121678429166419664041236233803606051817627731575939553790154021616196778501189528768078400811107009317850171384096998455082824610437919969197421385189475358775596537026092374519645052975059595487888618614275545703577191947383711761849232715855501325445057452043875112980841528855594013764288125280661970576229405994478822053767/6",
"-110968358518556750910569006059104612436322304793290197896476208195051113971187304256671882613201063543710887491006989203213468862095728086421327649757926706375373160032479060881414285316805050049998250096629298691714712337731033133063244894833650574221421335477496494331790029997128928883270452912343595756835759921082499027715633187483508227173954421007445739076452215234463953952029377612275096135644427285378787750547213980148328191792731369493029/2203871994870",
"871667613876289947152259213998641324359438367113245978510277002562210922288209180150151793852558736029189876363096736208315035600167649273464678134646229708161579214485318416128870291425640987624153304026736765522468963515580422620761261195314156252082303726799452238319359220112879725078451979791840912313059346932550771416018721541922207119333620480831014488368439858212426770461809324187079997350701358985200574078187666941445255865364959/6",
"-139969199374294532188729693702577000000465664934371179035889932037927222630615161871008568258760858093560212970955512057983700284904139662988796471588843837914664871339017278834524915750717069973487760152722966363103180527139199261072959205960570607504345672675033426810959288741490491658133099197637151741354653719448795255505120643394167214213806837785207626077991226383344774422283805854628774864645574223075309564129905544107459811288704862611/330",
"999866869350557363722458479004395830847953169240152118030482972984856254139343285563059710426142001310818604300278555911104883557186325333153917124330048368249458087059040520529706556642732809436335612822769043297715578151918469336944179483860946506334004186007324467864842978559250174108263899703085692274142353761805113570952308838426945093917953996642662776561930695988488695006166233701104386823791719249365863288962981240951731129450241042813203/798",
"-19435667946412236600006355752680318177378018998686558693047046847185922842569405850478643326624807107024135785299799674685846584030230598008329461654964640062557602833521189158599030670653044302429200521250792329717629531968392422269289900710918148435060503372045597753741275339144955223007618411222546697775810780747446478661790743019087588298611993809224843559412437328287256779856482337754827908028601591041648043989896358637724179061858684905231780173/5190",
"23574815095404701575006138342677814737611117002189168884514625588124591088321558700476292561495266316421750730681754426899890383276767887403267480686627676268685966493677023072554534770488586483642062259843015737466820417963854802166458232968082382836216212063844897312505105552626378830504014452088433926239997258280111620289793360632141212087877945966075033938687737132829040482438463044913103827680386355585682702291192692673999705957317036687127526488661/2082",
"-1946958244926408519819928540035312319794025231154312283846941445533833885684884185938663359749293528922631351379885288320544746558558870084671027543542465268801245629638273090846490014696481293058172945225573249920181321736453062629022981688433233577329127459928765113606300176648832109875139888454987326886636880988465878410619882237596781152380489370724295257792104332503696582825373077048086525583941198173749084587321884232599450628448598711165788748886648206781/56213430",
"502172089109637973079905157308517324166048351810351159422375337574332573514046742139861365117790762795398322755462389540876498686325519933386024542998456467504352201616875674226702066988781736776780983675270711591178536297327588046501114273115924942240089195877277170211145955479537604561876530663522061491492548171664129861255728492613537859772665546205365872403842851465588616941966018356565181922169705164734493393477247978508055348618032704534473742084629023675/4686",
"-123595612458163473336102111542838674764831835495331502431774135351050074096606458390189947949855899933224956382090454659506523733852842909886351324966274684823091833542355636103776512914842749831251392589846063826895163366115470020631076054800071496634622909233303706997995125130120515859762839469193960001284685791277467069230539953616534532549898448827387071275667857164787765007253139087944551495091418632200084873393873944046407490699550148256008464127109223283763137247/368521410",
"44586958800126786790452414833451737276485269217604041493957832153847748776691019563443875873891685730191225792159808508144405955278309411839337401759278396174609624192685884123993968501104767184346477939067903846512439522927159649898761965816525286791728854346485686727420275292569511311545587705052888988969140031330003151200601432709893613802729701685072968681090703554561525613786761794587069881004247080811531298610122589066840923344874780872870506826198179146216889/42",
"-18249520604687390491188873019557839254274215818941916557220148305863171323999328631073000715354712349442824804877473011208435647924577393976121564194070391790525169749128982828132077146902780721841387850162775862442199934474879939605150425883830706636702361084052335568869843628198626221242494076538767614229186803516353130263179834649242288787960314531149564506544752097614513847899020629776701115098262552562151629993531946710430672386743677617308205579019072302696542508379/5370",
"23698146493089350432280213985162669959262841111102470546871456237323693618435911411642184657663645971277792033537906347762183635901158641375259341789919760310568146035244593237879245436647800609988327386298127942914981131212727307691555784531721623262685912374782653802898934200911324353096490548706043962852465907958751649549222286885339380268684947173053181005751121488921877337975992137735046528729900037937548187674111044469106308867226010497700021930277136809473041010432321/2154",
"-778920925563520089023277887716919839298513486135455047496265119151473505464734957690937635048394537294415972122421086877478533967411348994474171388256074145035237797802154822761617528172700015731068657547092679836095543042179681364991968425138238530710252585175316218097390905698054739393609117605669741881868029805237983772228322424502491583995084065878787104609542382045050185577023575049548616444750140539582676309391395859436260664778641733708499657047550739325300732722680932200039559718809/21626561658972270",
"715341102258098940319912343996707811685084551356244645540933308810413928160891724298276851619649551829973697033587181069271380692407132317161739109284011945227649892560360729074672778640720680874112214109997197387525352062913504682830983772725393570468326491083187300331970668449041594296073065276692887678729691114916079642579900288026881432235979137544823640729868705093774645241454622836223176904124630526882732099120398430089179339282190314646212515622936459121100998906169917551/6",
"-18399470428456050908014333117886494595730651014055636288722717429950917809500136272557117402977052839042105693597404693257617634201600598895359708213302738206862242849606975947076539483777341046657860376203296993121539300815161693660027527850273081527494673550440357634430596208643360358204371232957151165657607509017253243152916116719712350843286172274487990507840124030754833011930721808729659207188165402273267771908929719004881279785191361391914450528631012111465559730900716078151518537/46110",
"20813243679670197402657864594700362248333105628735574505407748752194329210363364029904045498683920274785904391711886368296491226342074760936891789529952828353712861964615536938434038079631985205838319830159148784466890765577478710750411239086707279314113340423502528151089538256774657292895067372560433868261285932669643784461912885034984352745012134324851266880718011466493208024572308839966018431480701067038072465848677106468318507151450224167148317101357641051334844151154035628560478914687/15414",
"-110725230879881321879568054811797526267115166186538309029826133137308115277324207270571040263441920262386242076342056949047866353534514266980024412370434220187359560062050493440457221035440089226046696014690219122751069156630764313360960761587856716000690131098571105908045239988081704908481660126863809763243757816063349431021332536632587298653399772920535661074013239670953426088742833252653499763654446938447050846790045870317112050534444840968778815676707175954631059728590843972403931253118799/23970",
"1054364681019267121830159662373420279818225480653781839149178920561555806813202030269003305294989784104213489890426332509828119920399712689187184649711689415835280384720994979874232796860338473523737136345243289020296312370876276856303158404225225651223912805235434755784151235675589206423964860803286777387807480810963355146229723274524146948489417884118537852386976826754447246469153480716621041563108596300892747446848622658459755002905969181236655822204297783975692352381312064835994355860201685/66",
"-56868988747972506254659596935683883463716573524427146597376366171981802233487630537261600452515928180502785214820124586232687460333822056190451678107485446400177877446417556715711032055230455854240595868388654451080202675047744244991416192115524025084813812227930163123287145588705727429456779082968390877093897979160965323905993195706278985485896440595636775123847679345910845046714163301325224520710766325936895600819434580574518875433796519293151389916795779147962584026929392606854485528272956190655743/1018290",
"27233521998844117466571164441681703778822231688822656418920849017523981696494911618651082582707143082377020546888216407884466480834780583096823087696141619926246646927066679156637706667759198043548965512948036645725109831717082230384665542660596536212413188407637782216353393129995452568219713750918323446571634462816666446106121343241772625570723451925602179037604045813434065564118195563426039220880907100156027093090547687363620867038635244235643402355449232121698090257432456131056504444320853157345201/138",
"-21144886325968847421136862640933605790730878065158231117894812330764874940817232709655287449203776974910988576503561661800249278991319113309582335281592647442495030553208258548341339318764197461147432848991686338242711098654931144304725148541437215370995347051713517773502906169174089944259231510484935144428438091067266131242394201122670888252772064856423958372374082615970685597386991737179844349495505700142239123902982043714578671787314293339023048726217119025452344630237832665698519639606247957083240801/30",
"4202152324841490851582198491734154054898910989229835692416027795481485467411812516892366095348619673337490550280425989691409092856177027846893427878738640633197809375983848427036487478678839362355759610808529212110936501477008097429319817529927993776215011685533261432410077791728458394351343228912812829117361997697793433448908490531697660725893829519644454139967318758247135377025444352170089166553939801451419735179550891309557305319624844923751198154628001739638691998206529289924753014269328705445340396548203417533/1651635762",
"-585016197049150516429606755440285431916223316191798033687181061470667150509536113671258201054717866226570169976401850360230659699699301963057743166370714339259000981058060988677132844370590538962044247092297537672905410985648312911796535010450651733583075122028847986584025427113069993778348629306554503407744980050377057969061170508810412927919930789637438916383763636475443274955653725558963454824998976936559504337387796596709727547538729277633022545136032386860825147973153846428111580196229784765036789760566304701/63030",
"78631979609289345055469501119395008379118096513723589634568877004799927202495863945986283823608714469880713486237817037414979036031006235383025032476262083964387973243898060840722936009590301165543812264089314197515688838727901018644687053389435289951515626740339208758682375061416597195951759290458697298602770109818453665947288873748972700580769864649544946817207071904078063454972954577208463927530056857030200986057709786810533019838606174872050746460837475834260566055441410395805129523481902672214740177851314801113/2298",
"-110754162756402172153014550168566972984876925083693264831143127544432717811904992984077240231351850620045442158975752476209437945003921292257289655906112174208294630503691959241009346814626779961417257948400146389011140929210993075671069409245612465372014808443841918963732454979635619634196765514065569765406021995951240364020270070411437377187081353045931837302854850452592893523482298799136698133585855070465304605234654821626817847160151252277371211732021978740981118935331815732788765628347320001270460720535171080710693555387/868841610",
"2879114883186609620826723532068276104139845449825894019948530676086618349883233245139084663416929458760597036667413717978530021472148264070597286070616857893183807259158771980877711836973364470227289919568822358886590073234578910075775184060367188577311832614887005612354400063672439629984465735358226535865532910705094242132700635264096296205052370626838252677418749801518077664289390262828965585623070897002640768910479324438878660938953441067263764560452279108930457475258025425810584201571774449957241464340109525100976383/6",
"-21299114788094757397153706724714536413292077775222009197296487570276368549767668483739905654759629794289722059088574391474394384116388842393472198779890845792835783368209072403070166818305644992935634095949389005892015797599060514475400351300665686095027668428158520105490245612578226308332064019874832238296603858849991741989885454092253889660892754436759635904520725519771622791567806625636568537908996210911982475409155309551762403125143065067389753960600797968698009862634474184891040512288957749239742206998790145616588343479389/11670",
"1039554412204304060999050471842935871664238236129525031050621197904673190252061816306076783004652192616133527774723493749394461545816137751676691165637363944930483826319036927422553141330104483296290342476507053344206817648719129001417301179730182909494636606795995576156560517060235847592695182729113023238975218843912996538779543747649999358252604590089345118921257104639445913236211149024538216358616556115899687337155136781007563112551684977465108319504450250735437471011340987371661862741413337000516697089619657504784045957077408711185/148218378",
"-4666956320257517816926480178489878702719387148900232522527912339796188714409776663856362141719980502875970806945762712937180144475887677992558175799481301586019202060028185307056311432687319799854135340241062231395259919629305490635354239890090217072557890791528689479267987496699263598146171495893203013485575227547175970131771602894568516495986613037151863666577390670765165933422564746168996994413125484969251071189411262200344536746879649016328422523901374916569404613335757056186544409616787583076594896302119414868190918059336879970513/171390",
"640808912350356174378073333715330795309912947431801296035514496305956924194050478724997308276302531933458844716623312895516343306208024932183790655351844102967791249508631724180677304236114904329953319103713608769803340518450516179464461284806009110502342220743568034682133273443656465906102058462073733441986152637932219455262690498783033366796807895595451968974170018589790265173871732540219203496470134837096254721957294282692027321105998231580155273075570903000709400332769684568638209079266772432973508791091418552966827434770217964847/6",
"-98872162196656114876533219362632891391774839342005000436956938726481191695417122725991435991920485003784886516420949151408274403750897124053086048470809705387715020563676318491207223028465413318847625119271235350352217955302858427960756286710348612322463571556662841990100314844270405671459605112346068263402145070889841697007530455932282600691314028702416310723147417755942945877131986599840610369192441659461647425950295710718456957848137284733782503430592302360661270817820862416426647830439342025098395116603056716015807642935747540566951812504354652379/233649143825370",
"10161900313215566319953421591388637402328180425349211048816698980319072816903521145345726221163084105611450343443221137527690722856383209708142471452342875346539666863558482835019156804751669116932322755085721460877938790181414341174421583630169802248409852214724801939766701626707662229904797008779706437578874336997303238218116573968772216970036489561373747407630110362020821819680854208929607112013855668348426244596961480597381595137016528270815603652018778457314919825182032768360703403384404569260876760458965758437801728169587522360995301639/6"
};
/*______________________________________________________________*/
static char *euler_strings[] = // eulernumber[2n]
{
"1",
"-1",
"5",
"-61",
"1385",
"-50521",
"2702765",
"-199360981",
"19391512145",
"-2404879675441",
"370371188237525",
"-69348874393137901",
"15514534163557086905",
"-4087072509293123892361",
"1252259641403629865468285",
"-441543893249023104553682821",
"177519391579539289436664789665",
"-80723299235887898062168247453281",
"41222060339517702122347079671259045",
"-23489580527043108252017828576198947741",
"14851150718114980017877156781405826684425",
"-10364622733519612119397957304745185976310201",
"7947579422597592703608040510088070619519273805",
"-6667537516685544977435028474773748197524107684661",
"6096278645568542158691685742876843153976539044435185",
"-6053285248188621896314383785111649088103498225146815121",
"6506162486684608847715870634080822983483644236765385576565",
"-7546659939008739098061432565889736744212240024711699858645581",
"9420321896420241204202286237690583227209388852599646009394905945",
"-12622019251806218719903409237287489255482341061191825594069964920041",
"18108911496579230496545807741652158688733487349236314106008095454231325",
"-27757101702071580597366980908371527449233019594800917578033782766889782501",
"45358103330017889174746887871567762366351861519470368881468843837919695760705",
"-78862842066617894181007207422399904239478162972003768932709757494857167945376961",
"145618443801396315007150470094942326661860812858314932986447697768064595488862902085",
"-285051783223697718732198729556739339504255241778255239879353211106980427546235397447421",
"590574720777544365455135032296439571372033016181822954929765972153659805050264501891063465",
"-1292973664187864170497603235938698754076170519123672606411370597343787035331808195731850937881",
"2986928183284576950930743652217140605692922369370680702813812833466898038172015655808960288452845",
"-7270601714016864143803280651699281851647234288049207905108309583687335688017641546191095009395592341",
"18622915758412697044482492303043126011920010194518556063577101095681956123546201442832293837005396878225",
"-50131049408109796612908693678881009420083336722220539765973596236561571401154699761552253189084809951554801",
"141652557597856259916722069410021670405475845492837912390700146845374567994390844977125987675020436380612547605",
"-419664316404024471322573414069418891818962628391683907039212228549032921853217838146608053808786365440570254969261",
"1302159590524046398125858691330818681356757613986610030678095758242404286633729262297123677199743591748006204646868985",
"-4227240686139909064705589929214593102933845388672369082676644542650248228369590525634078984302153217507945782396923579721",
"14343212791976583406133682640578565858579882148843159111106574955509790196812618254848857854461550714631444034921517907250365",
"-50817990724580425164559757643090736003482435671513413926813239886828210876247074897752122164140484881907534297068189565042330181",
"187833293645293026402007579184179892539001444997005361637080870116823642645755601678579681159136078780812233831035373097528077899745",
"-723653438103385777657187661736782292986259565181067232760712431055015669043224647591792236141452770950810842191949814198134897708964641",
"2903528346661097497054603834764435875077553006646158945080492319146997643370625023889353447129967354174648294748510553528692457632980625125",
"-12122937378929218210539295497856098807695880456925359878374031252051425324802983023259164661895562465602169682143385407744646483057903979627101",
"52630642496169907060022407358423666139200442518073843505404940449800003302063127338662338497391497609499419661748773660506383501215821938795634505",
"-237407307193676634703461698760652651633454428419287776842645279528164787872297417395385346705721704571478255056084593759586258920375695854688654461561",
"1111890094248282302497023358817578932825829534468708403452929407174064284980244814331727650672071012464829426226669534375777258933146494169710719722335885",
"-5403078659795293205619115494263476990474882718296420197408516010249814711845963278802717760330206627628886347827381068652979312079075986736179581399343212021",
"27223410855722270213715341445890954891150192452564467008366005911126658490094311265116229345791312467273661582061462389296672527429047120477605834230481160137265",
"-142130105480096698118085204572231882248930706699532629917096701279605797073330019342069486123313307158077690567828653038008322871113514777576211651539204744250822481",
"768426182064690265317095628366647793640120107733727644086704205408475538272770397647212368961686021466396893832789095280670677561989835334271110534014930150192489246645",
"-4299621925439749642818890336486327550230296183651057083536623360354334771425729606583055234978935336116864465814878673654837862352124705254397361106883186269500698123036941",
"24883915747829871631690245540848940823728670907090814055549996853018422439857255460434636907179279971030115914025391078487144429408300462747699810654037377064816073847531472025",
"-148875820890620408401048810913362395915478793564083833973207237459816306501767343796140793737097206398217384861379191422469834206918345616804639191657370276470685113028113791999401",
"920261411885209418840864126560312709303188948754786396791215222653149731663432347100659323257330657824214531723965200565829728484354443523626140017386856515799079310476245590771021405",
"-5874244457292435607478065500517984430211674718162917379004377873044017144926171891266074084469461144112736852192606411496471264275390680348174759064256336391461933148218214049172761853861",
"38701335541759272489972612533946579961352365553523768738072135618177504244633546143840403169376492579607451638909625298032991497065209765804220290008687022549327267049867240582378815415302785",
"-263038464627282201918918005755736144830032766236489151905754681577981916252171316354973105486693742840216041344801990544825902436415863797115667159863613239597675722668781930227771509440274344321",
"1843421861906816432167393181032769665893649202553086673267697133400715329732610535132157060489416615730057631236849420277623544223308406050150049799386558982851267671436620884430088317515295375724165",
"-13315007608319975977798961906119591948409991994360182770848972097447201015445473110217825457685126268173968861952162736998351819924050543324674977645504022076111979662987053574616656318380157138294414781",
"99077340794640997027571994159414814352766157448188315407641572135205372433534236192424515676072423075561333548313166135347683467200999487267074099854449273061324576815951156531081456210665221369757248493545",
"-759161615376086554230567716763177263596944504514401890020970373192868465823452797551910845855011701531872230496643502087821632708042485735973318858027365853586062132254080496505748002294983034498658913855809241",
"5987386904215954780609340300928990507458814865030864762440959127489603790251637145749604626534662068704764148470130069641596881837375711869240420745498089109837751540966769902924250247702626992182004595330375418925",
"-48585315368052700716602256744577433881085302499382663900836359958053978334679521678499235910862547923367522652693577120760677663074098391609655555981666832137542638488228486996579524820945684901178997088057060206671701",
"405474737750791455464680535308584710004101929169563905467638405199707140521827004885932487194196311384629842084483076219540852954566975387306730824214150387836999985900790862094369844554013935010614141726715992833064708305",
"-3478923713390906014155853271332923403541090203929311448899155714127815582861789055632949031284778695873663565420214533346695135750726198835095396041501642366149906765137230219951898327177614490241412422254951219744444195146161",
"30674973882510848944914435747946116083220899412955570785330782125085850822994275592137937387166344104853428704382523982556306276256496841127419594437788971414267195014927164088859438013568143250274310527345494536583779461051769685",
"-277857404780457414987248665136951661385802997430099285750035845293762404084709969434016870389430000091054914408044748463535290871776626229195061384515613583189227656542091580147189163312909279754107124154692415552717409356305334976621",
"2584656039027118150988150827308379115174812407188367803116872758991930250566541562544589073989950578909935058466885562351129428635550443922611127558529813801436817726453531944624537906808585432270433693391096422761986801214468540280011065",
"-24681704804636405045563113396740422284913963613553381119310714464086897710328935966343204704821215011220396889041957887977272838988705114952616785989353166602294179183185568410133533879320450255743187047640813787854468601259236495019991107081",
"241875397603671333264713788326666700197340671860996631175487477066149092945173527219287017153434893262996063114359308897474705967957820772263285333425790096468917055702203670672158362936004666044597880710441727543177247110710982971270790081640445",
"-2431692647091072771710367899825329042978312858255265849158106543369003845838171255990749023878827646026837755570989027633721272578260760823216194666305433150677044259166657997395157392763097373982550910734972959189271202613947473869254971668125281541",
"25071830005737144960191522234762834423570096759890580082823874229833831690163136732846143787945517516134004403918012093742445562612207991873892705782881588541832155633594558800737824587847195977958539176361385963043761572318045891668199089009014838465825",
"-265025200052581375350895159803901659831186509795804976877103932177542318020045779086519791106794538569945733045234377251046033088600368744492574825867396946527628023569009258037862311192069917055607116562400084986721097342260635717067052951262238000041644001",
"2871301973166679684929916211003699350355491665017882386576590810781414905230946265312174490667829805944220519593098737669793312212344655925347962998276676335569668032112763438792820788122201865888588272479167270021118497953360503208862391552292341523102202695205",
"-31873602162354110469925167469864420834098442078376136286226148140338287017035197695328756656809299667273307907347165190625178484077234250517204540656593113024059121265558241036200035381298702075631555671297449641204531137714340685546565807854440168759599776572338461",
"362424164505845624987618515668413679297368428470959430419177372722357715496048789904222294162298755472011811233179520097862835432818460155300478788728230612306992230546368708538380883202464365353259572681219213078461599999667716627989875973031221525692129832253957736585",
"-4220005513130260808256874149121608869388378226451438744419711766672691776484360898579943327229799071566569220799418193734460802563701559836740994854234132201397018022945474085831250467336792289975504710405831631768298471319957990591150241176345336500257174834567448143108921",
"50303455785315004160948142070710660439593901544551597080356572244210205075773159284826676928099940270939872774526099418212704602457883015550880609374839741032031206179280983823453694340619758267342883548028892341280034602479976747749715703194419086815449426273168058911598997965",
"-613696178494213385049453688204944204636835041666802209740192483994522535138197632032027876728439620218036076551166502472414087724628932609227576010540315789096026864349046503109733067745459186861716167337508369354851430550336742702533171567967843591218910874037226619687146158899381",
"7660628138463373238117993486913117308562407748239554636851645244118393096760642580070132782182835772493668906831994962418261329110184210711316709924323071512994727850216635598213049818871992930602710048380205776270646645138991027539523682417662144159357039711639395335257387062714687345",
"-97817801128396745489203682500546803403872360255612057472290995814028940657569551872612602635030289576006285112163460487006788750275459045674761339526892435304437523912608229784910115289726075080865329433014362080464452506657150132777910025357685051079641459420210025598173827232784149453841",
"1277331663671980642072877732151869284598756140342756862203699204780475335159504968151690204213663447105620949434717932676191266292193883436288813754387946456540481384238565159064871619288178168239418776112961210567471496320773832611346566378550845636826548410755837970746928546952030526246612725",
"-17053514185447205217802426378725362724508399481812665196183185839469158011648800766414345172492040882144780940250055450502103811937337627649553535279031334409027446814293963189746329859680133956137807801542189159104678231823917756570426736742078313409641795708676878010710355206142559271906114916301",
"232725003482003005917234767874590750828843210540078047886281880700396232654117603097887120350825606802684020540169008897758864075968133355897378097264320973459346754734349027374313232867002671030368528250677028109112619357305414420227914198997205241323025418795823117397360370536618314153609214710982105",
"-3245547458389246952777103278832933845184956449666944106748081221098004971979502254066582528906284770073761549543383103906303927727715342889541355685586978553240908139221233064498655969984337576192317823239580542304520495782233845892636036159572214042726477145501581518761100340306057999006722621375511430761",
"46243177258265190424323902925304114170042407076432117483933721161583024270375494907464953195040624432240322320524712189124876144822622634965765704667430207111740179646363567338066782394601826449410342985107494978904849450964415996016936759144300290944854767428786461007606000519224362860938359096378859459203485",
"-673012788703472215217655714452463930422605593618476965163010790827494348121050458458808167113687985498382728742497229884244318774989604658830071458046921180500294567182145032339021048987567078430867278430624720984803716761303615031141015161171583843163932861106497453752681124616309213188697054892019876070316741221",
"10002721075470702948386265823026163483669895640610599261740249751695410931924413327478644502636080554713875722082771962115974026208927494840484734129931938169342255775893709360766347394011188907826733272885243025212741698396828065372822136390127954643055484089178808234471480911904213409154650594583875686878661058684865",
"-151788001742576903207992143170625804833367146840512593697581109803783441062418722292353173362406757387163026277835502193676890265097747214978636721147025650948227001182968868695553697475091643369886230824266660346218002431650200371581395332787137185347364025966640370770231764554924669204389544777746423420568870837615791681",
"2351193499087345796723059513465729828732643551726453855632947768834488841240574267526618069087082444522917989055071208177640801828380347055695483276792815627924286073156053942543260992726127997093077262395345452290413895503152387428038999308953349450266404696081500346419631099459378277091987128005553701083364955338990873634245",
"-37168927911752344259554450025446386263738115190206227035342905404073960705579064409393910218246554903667588933376608359428813721567857067610081709486776372691962009144600733962545317580343173106144644644391227295633903176580399562482533877865267820980327228856581651044166815445017498285511891868913191332493115349670323865146326141"
};
/*_______________________________________________________________*/
int exact_bernoulli(long n, bignum *num, bignum *denom)
/* return the numerator and denominator of the n-th second Bernoulli number in *num and *denom, if
n is a positive integer less than NSTOREDBERNOULLIS,
or n is odd. Return 1 for n too large or 1 for n not a nonnegative integer, or 0 for success.
Thus the num and denom are already relatively prime except for n==0 and n==2 and
it is never called anyway when n==0.
*/
{ int j;
char *x;
char *marker;
if(n % 2 == 1)
{ *num = bigint(0);
*denom = bigint(1);
return 0;
}
if(n < 0)
return 2;
if(n >= NSTOREDBERNOULLIS)
return 1;
x= bernoulli_strings[n/2];
if(n > 0 && n % 4 == 0)
{ assert(x[0] == '-');
x = x+1;
}
for(marker = x,j=0; *marker; ++marker, ++j)
{ if(*marker == '/')
break;
}
string_bignum(x,j,num);
if(*marker == 0)
*denom = bigint(1);
else
string_bignum(x+j+1,(int) strlen(marker+1),denom);
return 0;
}
/*__________________________________________________________________*/
int exact_eulernumber(long n, bignum *ans)
/* return the absolute value of the n-th Euler number in *ans, if
n is a positive integer less than NSTOREDBERNOULLIS,
or n is odd. Return 1 for n too large or 1 for n not a nonnegative integer, or 0 for success.
The Euler numbers are always integers, unlike the Bernoulli numbers.
*/
{ char *x;
if(n % 2 == 1)
{ *ans = bigint(0);
return 0;
}
if(n < 0)
return 2;
if(n >= NSTOREDBERNOULLIS)
return 1;
x= euler_strings[n/2];
if(n % 4 == 2)
{ assert(x[0] == '-');
x = x+1;
}
string_bignum(x,(int) strlen(x),ans);
return 0;
}
Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists