Notebooks · lib/hfref/boys
The Boys function from mpmath, for lib/hf/boys to be held against
Generated by tools/boys_reference.py from mpmath at 40 digits. Do not edit.
F_n(x) for n = 0..16 at 61 values of x from 0 to 200, each rounded
once to the nearest double. The x values include both sides of the
series/asymptotic switch x_n of every order in lib/hf/boys (x_n and
x_n +- 0.1) and of the old fixed switch at 50. Before writing, the
generator recomputes each x_n and checks the table against
mpmath quadrature, the downward recursion and F_n(0) = 1/(2n+1).
boys_ref_table() returns F[ix, n]; boys_ref_x() returns the x values;
boys_ref_switch() returns x_n for n = 0..16.
lib/hfref/boys.viv · 1 code cellOpen in the workbenchDownload .vivLook inside this program
- Atlas
The program’s map: every function and which calls which.
There’s no recorded run of this program yet.
Shift+Enter in a cell runs it and moves to the next. Running a cell runs every cell above it too, as one program.
BOYS_REF_NX = 61 BOYS_REF_NMAX = 16 #| The switch `x_n` of each order, recomputed from mpmath. def boys_ref_switch() { return [34.4, 34.4, 34.4, 34.4, 34.4, 34.4, 34.4, 34.4, 34.4, 34.4, 34.4, 34.4, 34.4, 34.4, 34.4, 34.4, 34.4] } #| The arguments, in increasing order. def boys_ref_x() { return [0.0, 1e-08, 0.0001, 0.001, 0.01, 0.01333521432163324, 0.01778279410038923, 0.023713737056616554, 0.03162277660168379, 0.042169650342858224, 0.05623413251903491, 0.07498942093324558, 0.1, 0.1333521432163324, 0.1778279410038923, 0.23713737056616552, 0.31622776601683794, 0.4216965034285822, 0.5, 0.5623413251903491, 0.7498942093324559, 1.0, 1.333521432163324, 1.7782794100389228, 2.371373705661655, 2.5, 3.1622776601683795, 4.216965034285822, 5.623413251903491, 7.05, 7.498942093324558, 10.0, 12.35, 13.33521432163324, 17.78279410038923, 20.0, 23.71373705661655, 25.0, 30.0, 31.622776601683793, 33.3, 34.3, 34.4, 34.5, 40.0, 42.169650342858226, 45.0, 49.9, 50.0, 50.1, 56.23413251903491, 60.0, 70.0, 74.98942093324558, 80.0, 100.0, 120.0, 133.3521432163324, 150.0, 177.82794100389228, 200.0] } #| Values 0 to 511 of the table, flattened by row. def boys_ref_chunk0() { return [1.0, 0.3333333333333333, 0.2, 0.14285714285714285, 0.1111111111111111, 0.09090909090909091, 0.07692307692307693, 0.06666666666666667, 0.058823529411764705, 0.05263157894736842, 0.047619047619047616, 0.043478260869565216, 0.04, 0.037037037037037035, 0.034482758620689655, 0.03225806451612903, 0.030303030303030304, 0.9999999966666667, 0.3333333313333333, 0.19999999857142858, 0.14285714174603176, 0.1111111102020202, 0.09090909013986015, 0.07692307625641026, 0.06666666607843137, 0.058823528885448916, 0.05263157847117795, 0.04761904718426501, 0.04347826046956522, 0.039999999629629635, 0.03703703669220945, 0.03448275829810901, 0.03225806421309873, 0.03030303001731602, 0.9999666676666429, 0.33331333404760055, 0.19998571484125469, 0.14284603220056438, 0.11110202058662448, 0.09090139893472213, 0.07691641055051913, 0.06666078457687545, 0.05881826649195796, 0.05262681725999115, 0.04761469999295449, 0.04347426105474465, 0.039996296468704715, 0.03703358892246024, 0.03447953296574843, 0.03225503435595137, 0.03030017329530402, 0.9996667666428618, 0.33313340474339004, 0.1998571983975501, 0.14274607718775947, 0.11102024047063182, 0.09083220115569944, 0.07685643965940502, 0.06660786944510969, 0.05877092163509644, 0.052583981632214685, 0.04757558935200665, 0.043438279382337956, 0.03996298019896719, 0.03700257040239929, 0.0344505157029279, 0.03222777576703685, 0.0302744723836999, 0.9966766429033636, 0.33134045770977244, 0.19857696900746477, 0.1417505644077932, 0.11020585526922126, 0.0901431836911621, 0.07625934268075611, 0.06608105503307111, 0.058299587344931014, 0.05215755573295817, 0.04718625885185344, 0.04308010698770628, 0.039631348403819065, 0.03669381731543317, 0.03416168837637868, 0.03195645829068627, 0.030018663105306348, 0.9955726550383601, 0.33067894866997827, 0.1981048128838962, 0.14138350515059658, 0.1099056321649715, 0.08988920961049504, 0.07603927212959437, 0.06588690321418501, 0.05812589289371823, 0.052000418805902414, 0.04704279765805277, 0.04294813182053143, 0.03950915646276223, 0.03658005831394234, 0.034055273522774064, 0.03185649686343633, 0.029924417157818656, 0.994103891313966, 0.32979925845119656, 0.19747708416832108, 0.14089557901721958, 0.10950659383395715, 0.08955166968322534, 0.07574680900261559, 0.06562889728849967, 0.05789508152943742, 0.05179161640934453, 0.046852172644255445, 0.04277277299078453, 0.03934680009158007, 0.03642890940588207, 0.03391388476518576, 0.031723684282933776, 0.029799199889381827, 0.9921513390668993, 0.3286305074041521, 0.1966433634230561, 0.1402476740639736, 0.10897679794848696, 0.08910357195331242, 0.07535858421920803, 0.06528643414873155, 0.057588730959655894, 0.05151448976909108, 0.046599180535815646, 0.04254004889953274, 0.039131337685235044, 0.03622832501270497, 0.03372625653740318, 0.031547440138805755, 0.029633037497479187, 0.9895583261486324, 0.32707962474515107, 0.19553754009569185, 0.13938855290010224, 0.10827442584968446, 0.08850959511864392, 0.07484402816095145, 0.06483256995331657, 0.05718275477872687, 0.05114726228861793, 0.046263950514537695, 0.042231687920060955, 0.03884585867130628, 0.03596256696921971, 0.033477671102797285, 0.03131394288982915, 0.029412901783730065, 0.9861195069040624, 0.3250250464230016, 0.19407343139582253, 0.1382515043509676, 0.1073450763731867, 0.0877238193241209, 0.0741634176602262, 0.06423230635648611, 0.056645875944486494, 0.05066166352017377, 0.04582069175909355, 0.041823979199273574, 0.03846842188054537, 0.0356112180894457, 0.03314903738707018, 0.03100526587688708, 0.029121896673630684, 0.9815673288013784, 0.32230912821645413, 0.19213957196820514, 0.13675039346324513, 0.10611859170882498, 0.08668707596034812, 0.07326560266666429, 0.06344060094889488, 0.05593785843813402, 0.05002133803195997, 0.04523624740344514, 0.04128644756665363, 0.03797083280912139, 0.03514804715584101, 0.03271583198621029, 0.030598384833201365, 0.02873832439050409, 0.9755559719119085, 0.3187294306067568, 0.18959334813934556, 0.13477527499499312, 0.10450556711301531, 0.08532405516098374, 0.07208553950366066, 0.062400218526681005, 0.05500760478480143, 0.049180139072212026, 0.044468548018423634, 0.04058043968344093, 0.037317341624645436, 0.034539802487649054, 0.03214697530519368, 0.030064126071126896, 0.0282346970512177, 0.9676433126355918, 0.3140294729981613, 0.18625500479262147, 0.13218802963573895, 0.10239394707106532, 0.08354052801814148, 0.07054195081798369, 0.06103971298914155, 0.05379138400581854, 0.048080550314777884, 0.043465189724101086, 0.039657830850815826, 0.036463457664022376, 0.03374511782299932, 0.031403815925109844, 0.029366218961129197, 0.02757684879522789, 0.9572725363876358, 0.3078903612534663, 0.1819026875018475, 0.1288190027942308, 0.09964655096119256, 0.08122142186180184, 0.0685357683383184, 0.05927212989167928, 0.05221172584592183, 0.046652726347455646, 0.04216258936828753, 0.03846027216586671, 0.03535527175443587, 0.03271389705641233, 0.030439567888789446, 0.028460777988941942, 0.026723456388710747, 0.9437569047508697, 0.29992605435757785, 0.17627073498014248, 0.12446647950710109, 0.09610108795487024, 0.07823110385676847, 0.06595055574739297, 0.0569955015237296, 0.050177951237546946, 0.04481503749385087, 0.04048653139283891, 0.03691973214186631, 0.03392998828977701, 0.03138783430262606, 0.029199817422014874, 0.027296795521600047, 0.02562651787716353, 0.926274208488129, 0.28968714816727326, 0.16905503554471651, 0.11890210789470619, 0.09157528372166207, 0.07441813605540207, 0.06265690063262078, 0.05409690779880508, 0.0475899383687529, 0.042477575210875314, 0.03835544284198563, 0.03496156755128461, 0.03211881442693868, 0.029703140753608318, 0.027625104036558126, 0.025818591454434537, 0.024233683156513607, 0.9038818248361681, 0.2766809710138262, 0.1599314004040813, 0.11188705660118098, 0.08588110838968856, 0.06962791716845572, 0.05852375838024533, 0.05046274910512658, 0.04434750120168249, 0.03955077480015756, 0.035688370090448035, 0.03251194233887925, 0.029853892847589013, 0.027597050220396102, 0.025657047837801372, 0.023971603406590106, 0.0224937418896846, 0.8755687006874363, 0.2604190647451406, 0.14859515147431737, 0.10320535507739473, 0.07885339618890701, 0.06372768405010514, 0.05344061612510878, 0.04599863489724529, 0.040368417277313044, 0.035961895389958906, 0.03242015235816206, 0.02951188436462481, 0.027081393338061324, 0.025020068521869263, 0.023249857779161633, 0.021713237859093706, 0.020366888109273167, 0.8556243918921488, 0.2490937321795154, 0.1407505368259127, 0.09722202441693015, 0.07402351120587763, 0.059680941140265335, 0.04995969283028526, 0.04294534708107496, 0.037649546503491, 0.03351163084671353, 0.030190326374923703, 0.027466194160764318, 0.025191805984945876, 0.023264489911013497, 0.021610567884730963, 0.020175808944564527, 0.01891941756886694, 0.8403651880498156, 0.24050512904488006, 0.1348310521175392, 0.09272128316990494, 0.07039829420064934, 0.0566483404885903, 0.04735424990418183, 0.04066214291952993, 0.03561796004759309, 0.03168189596554484, 0.028526074665617036, 0.02594005151818988, 0.023782658000321352, 0.02195571160825427, 0.020388837090743055, 0.019030286933683645, 0.01784116866382954, 0.7975307415524653, 0.21677338626507384, 0.11861915269105523, 0.08046417387685312, 0.060563669281762836, 0.04844449741998346, 0.04032098362002158, 0.0345090407812464, 0.03015030906934005, 0.026762926238075413, 0.024056107326270587, 0.021844232217444533, 0.020003363988234043, 0.01844765035133971, 0.017115769004064706, 0.015962767456129612, 0.014954951980928145, 0.746824132812427, 0.18947234582049235, 0.10026879814501737, 0.06673227477682225, 0.04962324113315674, 0.03936486451348416, 0.032567034238441726, 0.027746001964150044, 0.024155294145404172, 0.021380279650214294, 0.01917293609131463, 0.017376108373082462, 0.01588552570472715, 0.014629350723368203, 0.013556514179749592, 0.012629735020647938, 0.011821172234321881, 0.6888194867591263, 0.15945447745967958, 0.08054458921038757, 0.052183407866495654, 0.03814572909978392, 0.029907281393784377, 0.02453373949908169, 0.020768714955278048, 0.01799114836346345, 0.01586099806618786, 0.014177276000309836, 0.012813905617441708, 0.01168795190836795, 0.010742698449684973, 0.00993808462198548, 0.009245030854969237, 0.008641929361908449, 0.6251600286227531, 0.12827890597827948, 0.06070704147509251, 0.037847441881124225, 0.0269933786811381, 0.02080996202752422, 0.016864905432855178, 0.014147162759492746, 0.012168753406327002, 0.01066768629204396, 0.009491614541139455, 0.008546281044635362, 0.007770407095429924, 0.007122509293808639, 0.006573544254374223, 0.006102592516833682, 0.005694215929102592, 0.5585671128236777, 0.09808970898935679, 0.04236294074009355, 0.024977569748009375, 0.017182148179461964, 0.012922242924404161, 0.010287765402603002, 0.008515855324798127, 0.007250107891667983, 0.0063042435382542035, 0.005572345625403452, 0.004990115779731173, 0.004516425109574087, 0.0041238182441907046, 0.003793306199113062, 0.003511357214084338, 0.0032680792071405956, 0.546291971785148, 0.09284139463224984, 0.039287837054570146, 0.022870837329790384, 0.01560217253692678, 0.011666910841688445, 0.009250204126934823, 0.00763353100525078, 0.00648359329097258, 0.005627217464527014, 0.004966426640422896, 0.004441992164996403, 0.004016164234203697, 0.003663821446238728, 0.003367636084909372, 0.0031152895676945986, 0.0028977955949267536, 0.4924276611175131, 0.07116681232070274, 0.027064545832732, 0.014703564888021797, 0.00958102689023852, 0.006941203004072099, 0.005379668877617858, 0.004364967082675027, 0.0036595911403440808, 0.003143909532850073, 0.002751981857914975, 0.00244482000865575, 0.0021980423716393476, 0.001995688080582183, 0.0018269044964095156, 0.0016840726712315068, 0.0015616960694788899, 0.4299743545587503, 0.04923339760140873, 0.01576452135279056, 0.0075977965305229316, 0.004557928895642921, 0.0031157524068670113, 0.002315641007983665, 0.001821216304690425, 0.00149099201888449, 0.0012572480545295756, 0.0010842384050410415, 0.0009515948425376203, 0.0008469787121781198, 0.0007625324850785757, 0.0006930404804536538, 0.000634917735780647, 0.0005856258729627338, 0.37342072033547424, 0.03288113583191132, 0.008449593943474637, 0.0034352516524051263, 0.0018169099678084716, 0.0011327550327292228, 0.0007867121424136822, 0.0005881630221007024, 0.0004632555631484539, 0.00037904507429044294, 0.0003191625677204937, 0.00027475515295162625, 0.0002406970651778614, 0.00021385021301572804, 0.00019220225054920786, 0.00017441141102395158, 0.00015955286189207307, 0.33371451238447347, 0.02360617754802599, 0.004961072601898651, 0.0016977272377437058, 0.0007813249437516978, 0.00043719968343675726, 0.0002795594014537112, 0.00019623143699228673, 0.00014723848209768073, 0.00011600320839387021, 9.47980143387611e-05, 7.967016622744544e-05, 6.844006141306685e-05, 5.9829260852458793e-05, 5.304830395102021e-05, 4.7588074983871176e-05, 4.310789838248255e-05, 0.32359231148465734, 0.0215389476057443] } #| Values 512 to 1023 of the table, flattened by row. def boys_ref_chunk1() { return [0.004271480712116708, 0.0013871112425112389, 0.0006104933730804692, 0.00032943117207968555, 0.00020470041395628658, 0.00014051552631048515, 0.000103618822756323, 8.053470612419304e-05, 6.510849215837398e-05, 5.4248221535747856e-05, 4.627581432713029e-05, 4.022071108631553e-05, 3.549096667937552e-05, 3.170902217822237e-05, 2.86246973760496e-05, 0.2802473905066427, 0.014010099528844014, 0.0020992449328384776, 0.0005225412367214952, 0.00018061943636439907, 7.900874987585534e-05, 4.1184815943596194e-05, 2.4500133875213282e-05, 1.610510391828572e-05, 1.141934184241862e-05, 8.578378262173445e-06, 6.737300687157875e-06, 5.477899302107314e-06, 4.577377639509901e-06, 3.909463325214123e-06, 3.3987253334362356e-06, 2.9980277787019223e-06, 0.2521803080942566, 0.010209553778987471, 0.0012398514811213085, 0.00025080678754414774, 7.090355301793285e-05, 2.5660009064587153e-05, 1.1252240746735454e-05, 5.746938317468337e-06, 3.3147498581349023e-06, 2.1061131304534557e-06, 1.4447933689280438e-06, 1.0530731773844512e-06, 8.05300802176089e-07, 6.39788129081346e-07, 5.240698874130917e-07, 4.400110716148454e-07, 3.7694696169907814e-07, 0.24268606275055912, 0.009099383044922187, 0.0010234755858880842, 0.00019181399161797658, 5.028345835946507e-05, 1.6907661217360005e-05, 6.912814287461633e-06, 3.3089094181551623e-06, 1.8003868142325044e-06, 1.0869725048911114e-06, 7.137464730877349e-07, 5.013838697773216e-07, 3.717703950108863e-07, 2.878733883472471e-07, 2.308184976947616e-07, 1.9036751482313977e-07, 1.606588256892365e-07, 0.21015752230854381, 0.005909012447576283, 0.0004984317514413871, 7.007166079656386e-05, 1.3790934597659707e-05, 3.4893134877074115e-06, 1.0786697348148542e-06, 3.9374526021681444e-07, 1.655323145030913e-07, 7.859070287435451e-08, 4.145295094168982e-08, 2.3944133673665e-08, 1.4952383179455782e-08, 9.978319654645915e-09, 7.0430399617693624e-09, 5.210749956716056e-09, 4.009731995422256e-09, 0.19816636482997366, 0.0049541590692205005, 0.000371561878662697, 4.644518330399656e-05, 8.127855549358838e-06, 1.8287159697651776e-06, 5.028453628448628e-07, 1.6337321408401947e-07, 6.121342644094634e-08, 2.596417739684123e-08, 1.2281455422938619e-08, 6.396235256481812e-09, 3.6263064319160775e-09, 2.2149126793865845e-09, 1.4435372180249805e-09, 9.95035642507147e-10, 7.19623782382075e-10, 0.1819889170527023, 0.0038372044981341397, 0.0002427203569107369, 2.558858039524652e-05, 3.7767141483295257e-06, 7.166811580576233e-07, 1.6622100633203153e-07, 4.556057135599439e-08, 1.4408490423979173e-08, 5.163548724460527e-09, 2.0675181179744475e-09, 9.143986168870542e-10, 4.4237870210911615e-10, 2.3212713754409407e-10, 1.3108792074759382e-10, 7.90952085461592e-11, 5.0639165672631513e-11, 0.1772453850902791, 0.003544907701527823, 0.0002126944618139105, 2.1269445903632173e-05, 2.977722148749627e-06, 5.359897090160556e-07, 1.1791745822465493e-07, 3.065826137953298e-08, 9.197200654982595e-09, 3.126770463816783e-09, 1.1878950173730782e-09, 4.986381484193936e-10, 2.2909578939562178e-10, 1.142701358205116e-10, 6.142811446577699e-11, 3.535054751285137e-11, 2.163958058066857e-11, 0.16180215937964007, 0.002696702656325775, 0.00013483513281472914, 1.1236261066334492e-05, 1.3108971228460868e-06, 1.966345668673092e-07, 3.604966903273619e-08, 7.81076006415568e-09, 1.952688456435092e-09, 5.532601697194479e-10, 1.7519749414066368e-10, 6.131756334540415e-11, 2.3503506345243452e-11, 9.791568040023298e-12, 4.404646014182344e-12, 2.127352636359993e-12, 1.0975725916245229e-12, 0.1575959094154736, 0.0024918101183920667, 0.00011819693206129936, 9.344287943655174e-06, 1.0342231552120587e-06, 1.471725347790245e-07, 2.5597022748720346e-08, 5.261417766338387e-09, 1.2478544977547437e-09, 3.354150121250656e-10, 1.0076387098105564e-10, 3.3457258513202065e-11, 1.2166839241055933e-11, 4.809073497732948e-12, 2.052737474755027e-12, 9.40950256374751e-13, 4.609176330114069e-13, 0.15357581330520698, 0.002305943142720774, 0.00010387131273511819, 7.798146601683777e-06, 8.196250181431691e-07, 1.1076013753509211e-07, 1.829371635787726e-08, 3.5708454834987486e-09, 8.042444264428452e-10, 2.0528756453664602e-10, 5.856546959171968e-11, 1.8466537688263797e-11, 6.377281012647493e-12, 2.3938224313580024e-12, 9.704167306144399e-13, 4.2250200901012587e-13, 1.9660827164518813e-13, 0.1513205393805136, 0.002205838766479772, 9.646525217839717e-05, 7.03099505671598e-06, 7.174484751565914e-07, 9.412589322360974e-08, 1.5093073238921467e-08, 2.8602033649604154e-09, 6.254088805351551e-10, 1.5498468949567118e-10, 4.292577012715974e-11, 1.3140523366993585e-11, 4.405696322831747e-12, 1.6055559530058164e-12, 6.319058460140289e-13, 2.671137002888072e-13, 1.2068884860580695e-13, 0.15110043666127554, 0.002196227277053407, 9.57657242901028e-05, 6.959718335019842e-06, 7.081108770928783e-07, 9.263078332393952e-08, 1.4810154293814935e-08, 2.798430300446613e-09, 6.101228685731398e-10, 1.507570874545959e-10, 4.1633481290263715e-11, 1.2707877299830804e-11, 4.248256235885607e-12, 1.5436810614819979e-12, 6.057883690819072e-13, 2.553301429679735e-13, 1.1503031344227392e-13, 0.15088129160518138, 0.0021866853855823237, 9.5073277633999e-05, 6.889367944477616e-06, 6.989213856565764e-07, 9.116365898361811e-08, 1.4533336924351612e-08, 2.738164912710622e-09, 5.952532268278453e-10, 1.4665657705123706e-10, 4.03836800642825e-11, 1.2290670171187258e-11, 4.096874991294135e-12, 1.4843599310774158e-12, 5.808214290011385e-13, 2.440982884495847e-13, 1.0965228121631097e-13, 0.14012478040994822, 0.0017515597551243526, 6.568349081716317e-05, 4.105218176072645e-06, 3.5920659040630335e-07, 4.041074142065602e-08, 5.556476945287099e-09, 9.029275035560491e-10, 1.6929890686365478e-10, 3.597601765542221e-11, 8.544304140058347e-12, 2.242879783660888e-12, 6.448278846980771e-13, 2.015086608637209e-13, 6.800911993707761e-14, 2.4653252872762443e-14, 9.553082383767256e-15, 0.136472435061285, 0.001618135720259745, 5.755806748823764e-05, 3.4122921947576377e-06, 2.832136995338909e-07, 3.022224840709657e-08, 3.941753485915247e-09, 6.075790870897198e-10, 1.0805978033683219e-10, 2.178126034132536e-11, 4.9068932589576606e-12, 1.221788147578579e-12, 3.3319136725815735e-13, 9.876515015529467e-14, 3.161822006200219e-14, 1.0871893519467505e-14, 3.996099222150293e-15, 0.13211090992020036, 0.0014678989991133375, 4.892996663711125e-05, 2.7183314798395132e-06, 2.1142578176529517e-07, 2.1142578176529197e-08, 2.5840928882421396e-09, 3.7325786163465767e-10, 6.220964360545821e-11, 1.1750710458490718e-11, 2.4807055409188717e-12, 5.788312925630124e-13, 1.4792355222582332e-13, 4.1089875300226635e-14, 1.2326962272010372e-14, 3.972020858479055e-15, 1.3681401998629434e-15, 0.12545693345628003, 0.0012570835015659322, 3.7788081209396756e-05, 1.893190441352543e-06, 1.327889087121022e-07, 1.1974951687464127e-08, 1.319884454530112e-09, 1.719288367624373e-10, 2.5841007529422312e-11, 4.401774829658979e-12, 8.380132441213171e-13, 1.7633545216768037e-13, 4.063843085815119e-14, 1.0179967647701602e-14, 2.754099461671177e-15, 8.002894205942315e-16, 2.4858689203668693e-16, 0.12533141373155002, 0.0012533141373155003, 3.759942411946501e-05, 1.8799712059732504e-06, 1.3159798441812752e-07, 1.1843818597631476e-08, 1.3028200457394603e-09, 1.6936660594612792e-10, 2.540499089191726e-11, 4.318848451624005e-12, 8.205812058066322e-13, 1.7232205321746403e-13, 3.9634072238087974e-14, 9.908518057593244e-15, 2.675299873621426e-15, 7.758369614214637e-16, 2.405094561119039e-16, 0.12520627000215787, 0.001249563572875827, 3.7412083020234344e-05, 1.8668704101913345e-06, 1.3042008853632075e-07, 1.1714379209849168e-08, 1.2860096936960147e-09, 1.668475650503794e-10, 2.497718039676164e-11, 4.2376453766943446e-12, 8.03545530509162e-13, 1.684077459133521e-13, 3.865646862108361e-14, 9.64482749852864e-15, 2.5989056116342593e-15, 7.52178269090549e-16, 2.3270984198888737e-16, 0.11818025988514613, 0.001050787614134021, 2.8028909678076817e-05, 1.2460808241591174e-06, 7.755579554962714e-08, 6.206214345979063e-09, 6.07001075215851e-10, 7.01621384053093e-11, 9.357591456784696e-12, 1.4144350382882867e-12, 2.389497670154358e-13, 4.46165423252971e-14, 9.124178034880321e-15, 2.0281672416162708e-15, 4.868974861906595e-16, 1.2554676729805773e-16, 3.460487084551448e-17, 0.11441140410797113, 0.0009534283675664261, 2.3835709189160652e-05, 9.931545495483605e-07, 5.7934015390321023e-08, 4.345051154274077e-09, 3.982963558084571e-10, 4.3148771879249515e-11, 5.393596484906189e-12, 7.640928353617101e-13, 1.2098136559893736e-13, 2.1171738979813963e-14, 4.057916637797604e-15, 8.453992995410944e-16, 1.9021484239667328e-16, 4.5968586912456404e-17, 1.1875218285644933e-17, 0.10592437756635953, 0.0007566026969025681, 1.6212914933626457e-05, 5.790326762009449e-07, 2.895163381004725e-08, 1.861176459217323e-09, 1.4623529322421823e-10, 1.3578991513677408e-11, 1.454891947894008e-12, 1.7666545081570097e-13, 2.3976025467845132e-14, 3.5964038201767695e-15, 5.908377704576122e-16, 1.055067447245736e-16, 2.0347729339739193e-17, 4.214886791803116e-18, 9.332963610421156e-19, 0.10233988878595723, 0.000682362175306425, 1.3649168779030576e-05, 4.5503647745129456e-07, 2.1238031328409154e-08, 1.2744616479025374e-09, 9.347370570715218e-11, 8.102197343773952e-12, 8.103340354154491e-13, 9.185081329222111e-14, 1.1636077668246833e-14, 1.6292806904770398e-15, 2.49858282772514e-16, 4.1648921885083965e-17, 7.497863544634503e-18, 1.449791451169896e-18, 2.9966583570684465e-19, 0.09908318244015027, 0.0006192698902509392, 1.1611310442205111e-05, 3.628534513189097e-07, 1.58748384952023e-08, 8.929596653551294e-10, 6.139097699316514e-11, 4.988016880694668e-12, 4.676265825651251e-13, 4.9685324397544544e-14, 5.900132272208415e-15, 7.743923607273544e-16, 1.113189018545572e-16, 1.739357841477456e-17, 2.935166357493207e-18, 5.319989022956438e-19, 1.0307478731978099e-19, 0.0886226925452758, 0.000443113462726379, 6.646701940895685e-06, 1.6616754852239212e-07, 5.815864198283725e-09, 2.617138889227676e-10, 1.4394263890752218e-11, 9.356271528988941e-13, 7.017203646741707e-14, 5.964623099730451e-15, 5.666391944743927e-16, 5.949711541981125e-17, 6.842168273278293e-18, 8.552710341597867e-19, 1.154615896115712e-19, 1.6741930493677823e-20, 2.5949992265200624e-21, 0.0809010796898208, 0.00033708783204092, 4.2135979005115005e-06, 8.778328959398959e-08, 2.560345946491363e-09, 9.601297299342611e-11, 4.40059459553203e-12, 2.383655405913183e-13, 1.4897846286957395e-14, 1.0552641119928155e-15, 8.354174219943122e-17, 7.309902442450231e-18, 7.005323174014805e-19, 7.297211639598755e-20, 8.2093630945486e-21, 9.919647072579559e-22, 1.2812877468748597e-22, 0.07674408998431687, 0.0002877497433986407, 3.2367279946731112e-06, 6.068008950974046e-08, 1.5926276710795314e-09, 5.374360206743291e-11, 2.216610878846966e-12, 1.0804453805539327e-13, 6.076648007830468e-15, 3.873316680240121e-16, 2.7593488619517346e-17, 2.1726807197609934e-18, 1.8736727940485976e-19, 1.756320473051008e-20, 1.7780236458385373e-21, 1.9333279723022257e-22, 2.2471767493133414e-23, 0.07236012545582676, 0.00024120041818608923, 2.4120041818608923e-06, 4.020006969768154e-08, 9.380016262792358e-10, 2.8140048788377077e-11, 1.0318017889071594e-12, 4.4711410852643577e-14, 2.235570542632179e-15, 1.266823307491568e-16, 8.02321428077993e-18, 5.616249996545951e-19, 4.305791664018563e-20, 3.588159720015469e-21, 3.229343748013922e-22, 3.121698956413458e-23, 3.2257555882939067e-24, 0.06645764395515293, 0.00018685939785384543, 1.5761814212010317e-06, 2.21587987284649e-08, 4.361282884556911e-10, 1.1036383185742747e-11, 3.4134178902884844e-13, 1.2476788609046269e-14, 5.262160380398198e-16, 2.515260705425683e-17, 1.3437132863738763e-18, 7.934067856421329e-20, 5.130902367409641e-21, 3.606648045889296e-22, 2.738025776187769e-23, 2.2325723129108082e-24, 1.9459748931895972e-25, 0.06266570686577501, 0.00015666426716443754, 1.1749820037332815e-06, 1.4687275046666019e-08] } #| Values 1024 to 1036 of the table, flattened by row. def boys_ref_chunk2() { return [2.570273133166553e-10, 5.783114549624745e-12, 1.590356501146805e-13, 5.1686586287271154e-15, 1.9382469857726683e-16, 8.23754968953384e-18, 3.9128361025285743e-19, 2.0542389538275014e-20, 1.1811873984508134e-21, 7.382421240317584e-23, 4.9831343372143685e-24, 3.6127723944804173e-25, 2.7998986057223236e-26] } #| The table as `F[ix, n]`, `ix` indexing `boys_ref_x()` and `n = 0..16`. #| Built when called, so a program that only uses the module pays nothing. def boys_ref_table() { ncol = BOYS_REF_NMAX + 1 out = zeros(BOYS_REF_NX, ncol) # base: where the current chunk starts in the flattened table base = 0 part0 = boys_ref_chunk0() for k to len(part0) { flat = base + k out[floor(flat / ncol), mod(flat, ncol)] = part0[k] } base = base + len(part0) part1 = boys_ref_chunk1() for k to len(part1) { flat = base + k out[floor(flat / ncol), mod(flat, ncol)] = part1[k] } base = base + len(part1) part2 = boys_ref_chunk2() for k to len(part2) { flat = base + k out[floor(flat / ncol), mod(flat, ncol)] = part2[k] } return out } test "the table falls with the order and with the argument" { boys_rt = boys_ref_table() boys_rx = boys_ref_x() for boys_ri to BOYS_REF_NX { for boys_rn to BOYS_REF_NMAX { if boys_rx[boys_ri] > 0.0 { assert_lt(boys_rt[boys_ri, boys_rn + 1], boys_rt[boys_ri, boys_rn]) } if boys_ri > 0 { assert_lt(boys_rt[boys_ri, boys_rn], boys_rt[boys_ri - 1, boys_rn]) } } } }