[ prog / sol / mona ]

prog


e and the Stern-Brocot tree

32 2021-02-25 01:38

>>20

cpu time: 2995 real time: 2997 gc time: 1174

 group List (Fixed RRLRR, List (Loop (498, List (Store (a, List (Load (a, Fixed LR), Load (l4, Fixed LLLL))), Store (b, List (Load (b, Fixed RLRR), Load (r4, Fixed RRRR))))), List (Fixed LR, Expo (Fixed L, 1996), Fixed RL, Expo (Fixed R, 999))))
target 2.718281828459045
result 2.718281828459045
340017086135953955237517024368071023319667336443292804743952295811218300447359859240275563254009942677431489707597147675747035681413226512627011095930560268265456381178976392711767087225557220527288583530246999554026111396756681847411034069691700458364305110849779785985479469458249422285136155670021333443718590111827401706503305002386802304743268641986242675018801066689637090293781703589884119797742595395970458469615457316464652161835058300625085365074839652205963909281728057007645884413972470559421095590641084923213749096077911891464157447244982848623998799902248659508491205347662407542487598477506176854976430107224759805723469500480207518560065060801139517286177001208163592054763542622442833088837014707870098680498790101406422989090225950831187269091905076078387996734933063315154563648844011105458348826524339618765836090847570234445324485311773505775960915934136456454684723065101560864875759072426638458977878476314281969987155314153269630993616187041722772926774199317277275408014196669434574127395283760934088304504454441826341472487028029542307844361121860169948845000863967607247499379959564922815018909507873427673764317550105676071503852510957626027913732521804089379035997601445017705811769908093393745107753664844766235361183695170527428489809363428463651419304155765399729238548589316792609372558848237780044857470539820865022763311896953342264917235482949907211105305961474199254134498023181661330808198705378200836895070871333229848624381644393862053739146946714031748697068394959781227898824577572717091477283125470687771132502660646193012227555089150091316446335434009362342321577385694092293349561432035238800308129504247688449971272567391760416476691624159595214779684041072400751170742699454671514147869612822126793025761288002185791555487625331998621292869836022457378328419035361513580174231044804345605326811465916238059290186883564724761265694886919748527987916817620628526399573566506494861425004396642032056780484911383385189989513516563131778797299221345966468968956122130938820067631844304729073653295278994294270111849584185735076742525508006069816526335483941312168466769941517563643711961854946980989175852514399703705680462519538562629390325716019370164673384882170485495116424556766549082251149470708965255450905049612453587859276129878129571158069679466773167708728881129438071391603459651281058662550128959761153549617728975030404264330537814833057633963701181617935774238987394896893837492212211374342977762904418298881285931234958814978103651305047589748736431989381870422496158486260942264340691466697262368432164893697234466153250046703893250452429139844480273241829106099238215033421990835160228005567092855709150858705097715014615303931593755514322351810007680897794492648609028769501447879692294277237362011716820403857042445580674191735659531498184966721518718160689953505802281847373678940279750467265390416599246074195127826056496476091242971985446723655542587173824287311438381591741110560862978217691099053628393417793105301826047059921235216516021504425461929120276377753800102305173326425003579123379528380303069690154701626211729549743364833186844412203484432054917804678030588228660410069011019359882579002
125085295636436909683809909842556856885178429583466250503633118421625758576495571982549603221529371824249449947226736257956572986278847452327489918555893035992800158136526570747790366607976473974086490509833266140241624411002520378548860256844094890877496352409672412181476991240644660422957359119247812657697715895808101749155909929315560672524600833028834500581928675977242236292980202330265409027931557849262071183680232807134194663977226617526758164092581075236564819647024212853553521938166754805064971997583680157504280085693771587742124565102644454392184568192455131506363793673061697667809133470803909462294541130705110877585153688820760830173021946921156853394209265699621359388107424247279451921507178896866252151258182423463805654515203717737130171743215112991658603794371604988588191145881380551692440558754609581883970182436373351721827090765483767025558740593461170481647907645229692750706772617083777913648346892911751008260597754177442242884897528540552656654142051828032526143451856483844303282993772253401076047130518814970561671090962371290205074655269040331486455093397311641724716513914711853050343863410602433828186055109883845169168186241477852812819511630717226031782266261200943940615962914287809900772211847247623544281170759686802721987002900335098524747135307554944852406985163571494649355659613567838732869723194876669393386105031678437801228285473666870189915779831674530812838317813362749429334047728206554077502413410488307816529862238758762434688416460199490950423539362723027760398951127569670882323069657999986406666638536904433413611732504237085435613428187295322449920616488897190353761498046868750584302985283042516291072517661563543124917633435349040950215732545008269904452842072489224708167231629873428753864275250495686428820211229340636698055009463068010066247920722428973426571945857005028864658276369838400927087527667218274517604615390540969915685158805164446004960391637638952325069774576683392245223799253721839340049299692557960655127171880922366931873834678505507980929392029365039716768900191201134404082041954658457421412098953281935182415736165076549914653156936288250673567627314590360080813173455844097539997651557001995149793696142371449923446980427725864245921082517781640485031251339553931144656900391589822516702794312100705930445806007992360069962039035567107884172990813990752000736096406721872831171253639698564151167421533401665295128817139455342798715270038691942997621086685910211094868754454516817862989819051640051770874497216852913390188488061385723926005176343183394443750361968944989563225128221788985578992361222409045215774195773008647206524738774180554917621147514549299392328337681997169072439473578702176284273236998017086945818255227347039675511648057103771074013479256786923260298195015744892867688675269801389398308311777208591853723170164583690632297703927756753727378438541760265853399635262151837406060792526386670515259891008695811004879840637123479657107736250722757524021127684175490377871823327703940937023628221667804570593378320396524365465248186987504652311179460359354823215116827906074424119159403212171240501026466951623914101612248957295893464404775833237162234624918433172999
stack 12

$ python3 -m timeit -s 'import flake.sbtree as mod' 'mod.work_speclimit (mod.Specs.E (), 1000000)'
100 loops, best of 3: 4.5 msec per loop
54


VIP:

do not edit these