Current task: —

E-021-sinf-sf-curve.py

Experiments: E-021 · script updated 08-19-2026

E-021-sinf-sf-curve.csv — 299.9 KB, updated 08-19-2026

← prev page 9 of 10 · 500/page · 5000 rows next →
# nS_infS_flambda_nabs_Sf
4002 4001 12070.0432234 -3.04402625563 12074.0872496 3.04402625563
4003 4002 12073.560105 -3.15337522749 12077.7134802 3.15337522749
4004 4003 12077.0771115 -3.26882090752 12081.3459324 3.26882090752
4005 4004 12080.5942429 -3.38993859228 12084.9841815 3.38993859228
4006 4005 12084.1114992 -3.51626327113 12088.6277625 3.51626327113
4007 4006 12087.6288804 -3.64729141105 12092.2761718 3.64729141105
4008 4007 12091.1463863 -3.78248295568 12095.9288693 3.78248295568
4009 4008 12094.6640171 -3.92126353 12099.5852806 3.92126353
4010 4009 12098.1817726 -4.06302684078 12103.2447994 4.06302684078
4011 4010 12101.6996528 -4.20713726201 12106.9067901 4.20713726201
4012 4011 12105.2176577 -4.35293259356 12110.5705903 4.35293259356
4013 4012 12108.7357872 -4.49972698033 12114.2355142 4.49972698033
4014 4013 12112.2540414 -4.64681397832 12117.9008554 4.64681397832
4015 4014 12115.7724202 -4.79346975328 12121.56589 4.79346975328
4016 4015 12119.2909236 -4.93895639686 12125.22988 4.93895639686
4017 4016 12122.8095514 -5.08252534445 12128.8920768 5.08252534445
4018 4017 12126.3283038 -5.22342087857 12132.5517247 5.22342087857
4019 4018 12129.8471807 -5.36088370079 12136.2080644 5.36088370079
4020 4019 12133.3661819 -5.49415455516 12139.8603365 5.49415455516
4021 4020 12136.8853076 -5.62247788544 12143.5077855 5.62247788544
4022 4021 12140.4045577 -5.74510550849 12147.1496632 5.74510550849
4023 4022 12143.9239321 -5.86130028574 12150.7852324 5.86130028574
4024 4023 12147.4434309 -5.97033977489 12154.4137707 5.97033977489
4025 4024 12150.9630539 -6.07151984368 12158.0345738 6.07151984368
4026 4025 12154.4828012 -6.16415822805 12161.6469594 6.16415822805
4027 4026 12158.0026727 -6.24759801683 12165.2502707 6.24759801683
4028 4027 12161.5226684 -6.32121104574 12168.8438794 6.32121104574
4029 4028 12165.0427882 -6.38440118363 12172.4271894 6.38440118363
4030 4029 12168.5630322 -6.43660749442 12175.9996397 6.43660749442
4031 4030 12172.0834003 -6.47730725866 12179.5607076 6.47730725866
4032 4031 12175.6038925 -6.50601883961 12183.1099113 6.50601883961
4033 4032 12179.1245087 -6.52230437875 12186.6468131 6.52230437875
4034 4033 12182.6452489 -6.52577230721 12190.1710212 6.52577230721
4035 4034 12186.1661131 -6.51607965984 12193.6821927 6.51607965984
4036 4035 12189.6871012 -6.49293417983 12197.1800354 6.49293417983
4037 4036 12193.2082132 -6.45609620273 12200.6643094 6.45609620273
4038 4037 12196.7294492 -6.40538030971 12204.1348295 6.40538030971
4039 4038 12200.250809 -6.34065674104 12207.5914657 6.34065674104
4040 4039 12203.7722926 -6.26185256179 12211.0341451 6.26185256179
4041 4040 12207.2939 -6.16895257302 12214.4628525 6.16895257302
4042 4041 12210.8156311 -6.06199996297 12217.8776311 6.06199996297
4043 4042 12214.337486 -5.94109669385 12221.2785827 5.94109669385
4044 4043 12217.8594646 -5.80640362113 12224.6658682 5.80640362113
4045 4044 12221.3815669 -5.65814034376 12228.0397072 5.65814034376
4046 4045 12224.9037928 -5.49658478454 12231.4003776 5.49658478454
4047 4046 12228.4261423 -5.32207250163 12234.7482148 5.32207250163
4048 4047 12231.9486154 -5.13499573329 12238.0836111 5.13499573329
4049 4048 12235.4712121 -4.93580217905 12241.4070142 4.93580217905
4050 4049 12238.9939322 -4.72499352221 12244.7189257 4.72499352221
4051 4050 12242.5167759 -4.50312369933 12248.0198996 4.50312369933
4052 4051 12246.039743 -4.27079692396 12251.3105399 4.27079692396
4053 4052 12249.5628335 -4.02866547292 12254.591499 4.02866547292
4054 4053 12253.0860474 -3.77742724447 12257.8634747 3.77742724447
4055 4054 12256.6093847 -3.51782309911 12261.1272078 3.51782309911
4056 4055 12260.1328453 -3.25063399447 12264.3834793 3.25063399447
4057 4056 12263.6564293 -2.97667792712 12267.6331072 2.97667792712
4058 4057 12267.1801365 -2.69680669462 12270.8769432 2.69680669462
4059 4058 12270.7039669 -2.41190249251 12274.1158694 2.41190249251
4060 4059 12274.2279206 -2.12287436142 12277.350795 2.12287436142
4061 4060 12277.7519974 -1.83065450024 12280.5826519 1.83065450024
4062 4061 12281.2761974 -1.53619446214 12283.8123919 1.53619446214
4063 4062 12284.8005206 -1.24046125063 12287.0409818 1.24046125063
4064 4063 12288.3249668 -0.94443333345 12290.2694001 0.94443333345
4065 4064 12291.8495361 -0.649096592429 12293.4986326 0.649096592429
4066 4065 12295.3742284 -0.35544022785 12296.7296686 0.35544022785
4067 4066 12298.8990437 -0.0644526360627 12299.9634963 0.0644526360627
4068 4067 12302.423982 0.222882720786 12303.2010992 0.222882720786
4069 4068 12305.9490432 0.505591433931 12306.4434517 0.505591433931
4070 4069 12309.4742273 0.782712237158 12309.6915151 0.782712237158
4071 4070 12312.9995343 1.05330104717 12312.9462333 1.05330104717
4072 4071 12316.5249642 1.31643493656 12316.2085292 1.31643493656
4073 4072 12320.0505169 1.57121602113 12319.4793008 1.57121602113
4074 4073 12323.5761923 1.81677524357 12322.7594171 1.81677524357
4075 4074 12327.1019906 2.0522760363 12326.0497145 2.0522760363
4076 4075 12330.6279115 2.27691784629 12329.3509937 2.27691784629
4077 4076 12334.1539552 2.48993950598 12332.6640157 2.48993950598
4078 4077 12337.6801215 2.69062243458 12335.9894991 2.69062243458
4079 4078 12341.2064105 2.87829365514 12339.3281168 2.87829365514
4080 4079 12344.732822 3.05232861352 12342.6804934 3.05232861352
4081 4080 12348.2593562 3.21215378643 12346.0472024 3.21215378643
4082 4081 12351.7860129 3.3572490665 12349.4287638 3.3572490665
4083 4082 12355.3127921 3.48714991362 12352.8256422 3.48714991362
4084 4083 12358.8396938 3.60144926278 12356.2382446 3.60144926278
4085 4084 12362.366718 3.69979917976 12359.6669188 3.69979917976
4086 4085 12365.8938646 3.78191225723 12363.1119524 3.78191225723
4087 4086 12369.4211336 3.84756274516 12366.5735709 3.84756274516
4088 4087 12372.948525 3.89658741049 12370.0519376 3.89658741049
4089 4088 12376.4760387 3.92888612245 12373.5471526 3.92888612245
4090 4089 12380.0036747 3.94442216115 12377.0592526 3.94442216115
4091 4090 12383.531433 3.94322224833 12380.5882108 3.94322224833
4092 4091 12387.0593136 3.92537630056 12384.1339373 3.92537630056
4093 4092 12390.5873163 3.89103690647 12387.6962794 3.89103690647
4094 4093 12394.1154413 3.84041853066 12391.2750227 3.84041853066
4095 4094 12397.6436884 3.77379644872 12394.8698919 3.77379644872
4096 4095 12401.1720576 3.69150541847 12398.4805522 3.69150541847
4097 4096 12404.700549 3.59393809416 12402.1066109 3.59393809416
4098 4097 12408.2291624 3.48154319153 12405.7476192 3.48154319153
4099 4098 12411.7578979 3.35482341252 12409.4030744 3.35482341252
4100 4099 12415.2867553 3.21433313994 12413.0724222 3.21433313994
4101 4100 12418.8157348 3.06067591312 12416.7550589 3.06067591312
4102 4101 12422.3448362 2.89450169678 12420.4503345 2.89450169678
4103 4102 12425.8740595 2.71650395631 12424.1575555 2.71650395631
4104 4103 12429.4034047 2.52741655336 12427.8759881 2.52741655336
4105 4104 12432.9328718 2.3280104767 12431.6048613 2.3280104767
4106 4105 12436.4624607 2.11909042386 12435.3433703 2.11909042386
4107 4106 12439.9921714 1.90149124982 12439.0906801 1.90149124982
4108 4107 12443.5220039 1.67607429965 12442.8459296 1.67607429965
4109 4108 12447.0519581 1.44372364242 12446.6082345 1.44372364242
4110 4109 12450.582034 1.20534222405 12450.3766918 1.20534222405
4111 4110 12454.1122317 0.961847957422 12454.1503837 0.961847957422
4112 4111 12457.6425509 0.714169767968 12457.9283812 0.714169767968
4113 4112 12461.1729918 0.463243613234 12461.7097482 0.463243613234
4114 4113 12464.7035543 0.210008495104 12465.4935458 0.210008495104
4115 4114 12468.2342384 -0.0445975168295 12469.2788359 0.0445975168295
4116 4115 12471.765044 -0.299641232268 12473.0646852 0.299641232268
4117 4116 12475.2959711 -0.55419823935 12476.8501693 0.55419823935
4118 4117 12478.8270197 -0.80735673796 12480.6343764 0.80735673796
4119 4118 12482.3581897 -1.05822128964 12484.416411 1.05822128964
4120 4119 12485.8894812 -1.30591646697 12488.1953976 1.30591646697
4121 4120 12489.420894 -1.54959038584 12491.9704844 1.54959038584
4122 4121 12492.9524282 -1.78841810466 12495.7408463 1.78841810466
4123 4122 12496.4840837 -2.02160487526 12499.5056886 2.02160487526
4124 4123 12500.0158606 -2.24838923101 12503.2642498 2.24838923101
4125 4124 12503.5477587 -2.46804589845 12507.0158046 2.46804589845
4126 4125 12507.079778 -2.67988851976 12510.7596665 2.67988851976
4127 4126 12510.6119186 -2.88327217433 12514.4951907 2.88327217433
4128 4127 12514.1441803 -3.07759568848 12518.221776 3.07759568848
4129 4128 12517.6765632 -3.26230372393 12521.9388669 3.26230372393
4130 4129 12521.2090672 -3.43688863622 12525.6459558 3.43688863622
4131 4130 12524.7416923 -3.60089209579 12529.3425844 3.60089209579
4132 4131 12528.2744385 -3.75390646536 12533.0283449 3.75390646536
4133 4132 12531.8073057 -3.89557592879 12536.7028816 3.89557592879
4134 4133 12535.3402939 -4.02559736745 12540.3658913 4.02559736745
4135 4134 12538.8734031 -4.14372098165 12544.0171241 4.14372098165
4136 4135 12542.4066332 -4.24975065582 12547.6563839 4.24975065582
4137 4136 12545.9399843 -4.34354406755 12551.2835284 4.34354406755
4138 4137 12549.4734562 -4.42501254146 12554.8984688 4.42501254146
4139 4138 12553.007049 -4.49412065073 12558.5011697 4.49412065073
4140 4139 12556.5407627 -4.55088556975 12562.0916483 4.55088556975
4141 4140 12560.0745971 -4.59537618292 12565.6699733 4.59537618292
4142 4141 12563.6085523 -4.62771195573 12569.2362643 4.62771195573
4143 4142 12567.1426283 -4.64806157533 12572.7906899 4.64806157533
4144 4143 12570.676825 -4.65664136898 12576.3334664 4.65664136898
4145 4144 12574.2111423 -4.65371350981 12579.8648559 4.65371350981
4146 4145 12577.7455804 -4.63958402028 12583.3851644 4.63958402028
4147 4146 12581.280139 -4.61460058483 12586.8947396 4.61460058483
4148 4147 12584.8148182 -4.57915018391 12590.3939684 4.57915018391
4149 4148 12588.3496181 -4.53365656251 12593.8832746 4.53365656251
4150 4149 12591.8845384 -4.47857754721 12597.363116 4.47857754721
4151 4150 12595.4195793 -4.41440222617 12600.8339815 4.41440222617
4152 4151 12598.9547406 -4.34164800728 12604.2963886 4.34164800728
4153 4152 12602.4900224 -4.26085757031 12607.75088 4.26085757031
4154 4153 12606.0254246 -4.17259572913 12611.1980204 4.17259572913
4155 4154 12609.5609473 -4.07744622058 12614.6383935 4.07744622058
4156 4155 12613.0965902 -3.97600843685 12618.0725987 3.97600843685
4157 4156 12616.6323536 -3.8688941185 12621.5012477 3.8688941185
4158 4157 12620.1682372 -3.75672402518 12624.9249612 3.75672402518
4159 4158 12623.7042411 -3.64012460122 12628.3443657 3.64012460122
4160 4159 12627.2403652 -3.51972465346 12631.7600899 3.51972465346
4161 4160 12630.7766096 -3.39615205796 12635.1727617 3.39615205796
4162 4161 12634.3129742 -3.27003051278 12638.5830047 3.27003051278
4163 4162 12637.8494589 -3.14197635282 12641.9914353 3.14197635282
4164 4163 12641.3860638 -3.01259544319 12645.3986592 3.01259544319
4165 4164 12644.9227888 -2.88248016644 12648.8052689 2.88248016644
4166 4165 12648.4596338 -2.75220651868 12652.2118403 2.75220651868
4167 4166 12651.9965989 -2.62233132914 12655.6189302 2.62233132914
4168 4167 12655.533684 -2.49338961665 12659.0270736 2.49338961665
4169 4168 12659.0708891 -2.3658920961 12662.4367812 2.3658920961
4170 4169 12662.6082142 -2.24032284692 12665.8485371 2.24032284692
4171 4170 12666.1456592 -2.11713715467 12669.2627964 2.11713715467
4172 4171 12669.6832241 -1.99675953619 12672.6799836 1.99675953619
4173 4172 12673.2209089 -1.8795819573 12676.1004909 1.8795819573
4174 4173 12676.7587135 -1.7659622514 12679.5246758 1.7659622514
4175 4174 12680.296638 -1.65622274602 12682.9528607 1.65622274602
4176 4175 12683.8346822 -1.55064910337 12686.3853313 1.55064910337
4177 4176 12687.3728462 -1.44948937957 12689.8223356 1.44948937957
4178 4177 12690.9111299 -1.35295330648 12693.2640832 1.35295330648
4179 4178 12694.4495334 -1.26121179838 12696.7107452 1.26121179838
4180 4179 12697.9880565 -1.174396685 12700.1624531 1.174396685
4181 4180 12701.5266992 -1.0926006708 12703.6192999 1.0926006708
4182 4181 12705.0654616 -1.01587751957 12707.0813391 1.01587751957
4183 4182 12708.6043435 -0.944242462021 12710.548586 0.944242462021
4184 4183 12712.1433451 -0.877672822769 12714.0210179 0.877672822769
4185 4184 12715.6824661 -0.816108862323 12717.498575 0.816108862323
4186 4185 12719.2217067 -0.759454828154 12720.9811615 0.759454828154
4187 4186 12722.7610667 -0.707580208076 12724.4686469 0.707580208076
4188 4187 12726.3005462 -0.66032117805 12727.9608673 0.66032117805
4189 4188 12729.840145 -0.617482235472 12731.4576273 0.617482235472
4190 4189 12733.3798633 -0.578838008073 12734.9587013 0.578838008073
4191 4190 12736.919701 -0.544135227653 12738.4638362 0.544135227653
4192 4191 12740.4596579 -0.513094856966 12741.9727528 0.513094856966
4193 4192 12743.9997342 -0.485414357347 12745.4851486 0.485414357347
4194 4193 12747.5399297 -0.460770083872 12749.0006998 0.460770083872
4195 4194 12751.0802445 -0.438819794242 12752.5190643 0.438819794242
4196 4195 12754.6206786 -0.419205256963 12756.0398838 0.419205256963
4197 4196 12758.1612318 -0.401554943885 12759.5627867 0.401554943885
4198 4197 12761.7019041 -0.385486791752 12763.0873909 0.385486791752
4199 4198 12765.2426956 -0.370611017042 12766.6133066 0.370611017042
4200 4199 12768.7836062 -0.356532968124 12770.1401392 0.356532968124
4201 4200 12772.3246359 -0.342855998559 12773.6674919 0.342855998559
4202 4201 12775.8657846 -0.329184345292 12777.194969 0.329184345292
4203 4202 12779.4070523 -0.315125995451 12780.7221783 0.315125995451
4204 4203 12782.9484391 -0.300295525547 12784.2487346 0.300295525547
4205 4204 12786.4899448 -0.28431689703 12787.7742617 0.28431689703
4206 4205 12790.0315694 -0.266826192383 12791.2983956 0.266826192383
4207 4206 12793.5733129 -0.247474276277 12794.8207872 0.247474276277
4208 4207 12797.1151754 -0.225929366697 12798.3411047 0.225929366697
4209 4208 12800.6571566 -0.201879501444 12801.8590361 0.201879501444
4210 4209 12804.1992567 -0.17503488597 12805.3742916 0.17503488597
4211 4210 12807.7414756 -0.145130109154 12808.8866057 0.145130109154
4212 4211 12811.2838132 -0.111926214297 12812.3957394 0.111926214297
4213 4212 12814.8262696 -0.075212613429 12815.9014822 0.075212613429
4214 4213 12818.3688447 -0.0348088338231 12819.4036535 0.0348088338231
4215 4214 12821.9115385 0.00943391348929 12822.9021045 0.00943391348929
4216 4215 12825.4543509 0.0576313524476 12826.3967195 0.0576313524476
4217 4216 12828.9972819 0.109864956199 12829.887417 0.109864956199
4218 4217 12832.5403316 0.166180964062 12833.3741506 0.166180964062
4219 4218 12836.0834998 0.226589607353 12836.8569102 0.226589607353
4220 4219 12839.6267865 0.291064549102 12840.335722 0.291064549102
4221 4220 12843.1701918 0.359542541552 12843.8106492 0.359542541552
4222 4221 12846.7137155 0.431923304152 12847.2817922 0.431923304152
4223 4222 12850.2573577 0.508069623606 12850.7492881 0.508069623606
4224 4223 12853.8011183 0.587807676333 12854.2133107 0.587807676333
4225 4224 12857.3449974 0.6709275725 12857.6740698 0.6709275725
4226 4225 12860.8889948 0.757184119623 12861.1318106 0.757184119623
4227 4226 12864.4331105 0.846297802527 12864.5868127 0.846297802527
4228 4227 12867.9773446 0.937955975308 12868.0393886 0.937955975308
4229 4228 12871.5216969 1.03181425978 12871.4898826 1.03181425978
4230 4229 12875.0661675 1.12749814382 12874.9386694 1.12749814382
4231 4230 12878.6107563 1.22460477178 12878.3861516 1.22460477178
4232 4231 12882.1554634 1.32270491845 12881.8327584 1.32270491845
4233 4232 12885.7002886 1.42134513649 12885.2789434 1.42134513649
4234 4233 12889.2452319 1.52005006692 12888.7251819 1.52005006692
4235 4234 12892.7902934 1.61832490078 12892.1719685 1.61832490078
4236 4235 12896.335473 1.71565797976 12895.619815 1.71565797976
4237 4236 12899.8807706 1.81152352234 12899.0692471 1.81152352234
4238 4237 12903.4261863 1.90538446154 12902.5208018 1.90538446154
4239 4238 12906.97172 1.9966953798 12905.9750246 1.9966953798
4240 4239 12910.5173716 2.08490552562 12909.4324661 2.08490552562
4241 4240 12914.0631412 2.16946189644 12912.8936793 2.16946189644
4242 4241 12917.6090287 2.24981237162 12916.3592164 2.24981237162
4243 4242 12921.1550342 2.32540887916 12919.8296253 2.32540887916
4244 4243 12924.7011575 2.39571057937 12923.3054469 2.39571057937
4245 4244 12928.2473986 2.46018704886 12926.7872116 2.46018704886
4246 4245 12931.7937576 2.51832144781 12930.2754361 2.51832144781
4247 4246 12935.3402343 2.56961365361 12933.7706207 2.56961365361
4248 4247 12938.8868288 2.61358334422 12937.2732455 2.61358334422
4249 4248 12942.433541 2.64977301451 12940.783768 2.64977301451
4250 4249 12945.980371 2.67775090925 12944.3026201 2.67775090925
4251 4250 12949.5273186 2.69711385682 12947.8302047 2.69711385682
4252 4251 12953.0743838 2.70748998799 12951.3668938 2.70748998799
4253 4252 12956.6215667 2.70854132481 12954.9130254 2.70854132481
4254 4253 12960.1688672 2.69996622512 12958.4689009 2.69996622512
4255 4254 12963.7162852 2.68150166889 12962.0347835 2.68150166889
4256 4255 12967.2638207 2.65292537335 12965.6108954 2.65292537335
4257 4256 12970.8114738 2.61405772472 12969.1974161 2.61405772472
4258 4257 12974.3592444 2.56476351514 12972.7944809 2.56476351514
4259 4258 12977.9071324 2.50495347437 12976.4021789 2.50495347437
4260 4259 12981.4551378 2.43458558686 12980.0205522 2.43458558686
4261 4260 12985.0032606 2.3536661858 12983.6495945 2.3536661858
4262 4261 12988.5515008 2.26225081681 12987.28925 2.26225081681
4263 4262 12992.0998584 2.16044486511 12990.9394135 2.16044486511
4264 4263 12995.6483332 2.04840394115 12994.5999293 2.04840394115
4265 4264 12999.1969254 1.92633402089 12998.2705914 1.92633402089
4266 4265 13002.7456348 1.7944913381 13001.9511435 1.7944913381
4267 4266 13006.2944615 1.65318202727 13005.6412794 1.65318202727
4268 4267 13009.8434053 1.50276151705 13009.3406438 1.50276151705
4269 4268 13013.3924663 1.3436336753 13013.0488327 1.3436336753
4270 4269 13016.9416445 1.17624970804 13016.7653948 1.17624970804
4271 4270 13020.4909398 1.00110681599 13020.489833 1.00110681599
4272 4271 13024.0403522 0.818746613409 13024.2216056 0.818746613409
4273 4272 13027.5898817 0.629753315331 13027.9601284 0.629753315331
4274 4273 13031.1395282 0.434751700305 13031.7047765 0.434751700305
4275 4274 13034.6892917 0.234404857025 13035.4548868 0.234404857025
4276 4275 13038.2391722 0.0294117242613 13039.2097605 0.0294117242613
4277 4276 13041.7891697 -0.179495565394 13042.9686652 0.179495565394
4278 4277 13045.3392841 -0.391554526468 13046.7308386 0.391554526468
4279 4278 13048.8895154 -0.605975333743 13050.4954907 0.605975333743
4280 4279 13052.4398636 -0.821943994232 13054.2618076 0.821943994232
4281 4280 13055.9903286 -1.03862566376 13058.0289543 1.03862566376
4282 4281 13059.5409104 -1.25516809318 13061.7960785 1.25516809318
4283 4282 13063.0916091 -1.47070518857 13065.5623143 1.47070518857
4284 4283 13066.6424245 -1.684360669 13069.3267852 1.684360669
4285 4284 13070.1933567 -1.89525180523 13073.0886085 1.89525180523
4286 4285 13073.7444055 -2.10249322175 13076.8468988 2.10249322175
4287 4286 13077.2955711 -2.3052007447 13080.6007718 2.3052007447
4288 4287 13080.8468533 -2.50249527763 13084.3493486 2.50249527763
4289 4288 13084.3982521 -2.6935066868 13088.0917588 2.6935066868
4290 4289 13087.9497676 -2.87737767781 13091.8271453 2.87737767781
4291 4290 13091.5013996 -3.05326764529 13095.5546673 3.05326764529
4292 4291 13095.0531482 -3.22035647717 13099.2735047 3.22035647717
4293 4292 13098.6050133 -3.37784829562 13102.9828616 3.37784829562
4294 4293 13102.1569949 -3.52497511659 13106.68197 3.52497511659
4295 4294 13105.709093 -3.66100041062 13110.3700934 3.66100041062
4296 4295 13109.2613075 -3.78522254745 13114.04653 3.78522254745
4297 4296 13112.8136384 -3.89697810815 13117.7106165 3.89697810815
4298 4297 13116.3660857 -3.99564504844 13121.3617308 3.99564504844
4299 4298 13119.9186494 -4.08064569787 13124.9992951 4.08064569787
4300 4299 13123.4713294 -4.15144958024 13128.622779 4.15144958024
4301 4300 13127.0241257 -4.20757604138 13132.2317017 4.20757604138
4302 4301 13130.5770383 -4.24859667123 13135.8256349 4.24859667123
4303 4302 13134.1300671 -4.27413750827 13139.4042046 4.27413750827
4304 4303 13137.6832122 -4.28388101525 13142.9670932 4.28388101525
4305 4304 13141.2364734 -4.27756781618 13146.5140413 4.27756781618
4306 4305 13144.7898509 -4.25499818581 13150.0448491 4.25499818581
4307 4306 13148.3433444 -4.21603328374 13153.5593777 4.21603328374
4308 4307 13151.8969541 -4.16059612677 13157.0575503 4.16059612677
4309 4308 13155.4506799 -4.08867229412 13160.5393522 4.08867229412
4310 4309 13159.0045218 -4.00031036145 13164.0048321 4.00031036145
4311 4310 13162.5584797 -3.89562206098 13167.4541017 3.89562206098
4312 4311 13166.1125536 -3.7747821662 13170.8873357 3.7747821662
4313 4312 13169.6667434 -3.63802810083 13174.3047715 3.63802810083
4314 4313 13173.2210493 -3.48565927349 13177.7067085 3.48565927349
4315 4314 13176.775471 -3.3180361401 13181.0935072 3.3180361401
4316 4315 13180.3300087 -3.13557899798 13184.4655877 3.13557899798
4317 4316 13183.8846622 -2.93876651652 13187.8234287 2.93876651652
4318 4317 13187.4394316 -2.72813401062 13191.1675656 2.72813401062
4319 4318 13190.9943168 -2.50427146442 13194.4985883 2.50427146442
4320 4319 13194.5493178 -2.26782131378 13197.8171391 2.26782131378
4321 4320 13198.1044346 -2.01947599751 13201.1239106 2.01947599751
4322 4321 13201.6596671 -1.75997528799 13204.4196424 1.75997528799
4323 4322 13205.2150153 -1.49010341321 13207.7051187 1.49010341321
4324 4323 13208.7704792 -1.2106859831 13210.9811652 1.2106859831
4325 4324 13212.3260588 -0.92258673401 13214.2486455 0.92258673401
4326 4325 13215.881754 -0.62670410593 13217.5084581 0.62670410593
4327 4326 13219.4375648 -0.323967668074 13220.7615325 0.323967668074
4328 4327 13222.9934912 -0.0153344089149 13224.0088256 0.0153344089149
4329 4328 13226.5495331 0.298215092441 13227.251318 0.298215092441
4330 4329 13230.1056906 0.615680596139 13230.49001 0.615680596139
4331 4330 13233.6619636 0.936046214861 13233.7259174 0.936046214861
4332 4331 13237.218352 1.25828449223 13236.9600675 1.25828449223
4333 4332 13240.7748559 1.58136052777 13240.1934954 1.58136052777
4334 4333 13244.3314752 1.90423612965 13243.4272391 1.90423612965
4335 4334 13247.8882099 2.22587397626 13246.6623359 2.22587397626
4336 4335 13251.44506 2.54524176778 13249.8998182 2.54524176778
4337 4336 13255.0020254 2.86131634872 13253.1407091 2.86131634872
4338 4337 13258.5591061 3.17308778287 13256.3860183 3.17308778287
4339 4338 13262.1163021 3.47956336199 13259.6367388 3.47956336199
4340 4339 13265.6736134 3.77977153023 13262.8938419 3.77977153023
4341 4340 13269.2310399 4.07276570649 13266.1582742 4.07276570649
4342 4341 13272.7885816 4.35762798738 13269.4309536 4.35762798738
4343 4342 13276.3462385 4.63347271425 13272.7127658 4.63347271425
4344 4343 13279.9040106 4.89944988824 13276.0045607 4.89944988824
4345 4344 13283.4618978 5.15474841807 13279.3071493 5.15474841807
4346 4345 13287.0199 5.39859918613 13282.6213009 5.39859918613
4347 4346 13290.5780174 5.63027791928 13285.9477395 5.63027791928
4348 4347 13294.1362498 5.84910785187 13289.2871419 5.84910785187
4349 4348 13297.6945972 6.05446216913 13292.640135 6.05446216913
4350 4349 13301.2530596 6.24576622061 13296.0072934 6.24576622061
4351 4350 13304.811637 6.42249949402 13299.3891375 6.42249949402
4352 4351 13308.3703294 6.5841973414 13302.786132 6.5841973414
4353 4352 13311.9291366 6.73045245027 13306.1986841 6.73045245027
4354 4353 13315.4880587 6.86091605412 13309.6271427 6.86091605412
4355 4354 13319.0470957 6.97529887742 13313.0717969 6.97529887742
4356 4355 13322.6062476 7.07337181198 13316.5328758 7.07337181198
4357 4356 13326.1655142 7.15496632246 13320.0105479 7.15496632246
4358 4357 13329.7248956 7.21997458034 13323.5049211 7.21997458034
4359 4358 13333.2843918 7.26834932683 13327.0160425 7.26834932683
4360 4359 13336.8440028 7.30010346663 13330.5438993 7.30010346663
4361 4360 13340.4037284 7.3153093955 13334.088419 7.3153093955
4362 4361 13343.9635687 7.31409806619 13337.6494706 7.31409806619
4363 4362 13347.5235236 7.29665779813 13341.2268658 7.29665779813
4364 4363 13351.0835932 7.26323283791 13344.8203604 7.26323283791
4365 4364 13354.6437774 7.21412167838 13348.4296557 7.21412167838
4366 4365 13358.2040762 7.14967514557 13352.054401 7.14967514557
4367 4366 13361.7644895 7.07029426367 13355.6941952 7.07029426367
4368 4367 13365.3250173 6.97642790919 13359.3485894 6.97642790919
4369 4368 13368.8856596 6.86857026679 13363.0170894 6.86857026679
4370 4369 13372.4464164 6.74725809957 13366.6991583 6.74725809957
4371 4370 13376.0072876 6.61306784816 13370.3942198 6.61306784816
4372 4371 13379.5682733 6.46661257315 13374.1016607 6.46661257315
4373 4372 13383.1293733 6.30853875648 13377.8208346 6.30853875648
4374 4373 13386.6905877 6.13952297784 13381.5510648 6.13952297784
4375 4374 13390.2519165 5.96026848272 13385.291648 5.96026848272
4376 4375 13393.8133595 5.77150165932 13389.0418579 5.77150165932
4377 4376 13397.3749169 5.57396844178 13392.8009484 5.57396844178
4378 4377 13400.9365885 5.36843065752 13396.5681578 5.36843065752
4379 4378 13404.4983743 5.1556623367 13400.342712 5.1556623367
4380 4379 13408.0602743 4.93644600197 13404.1238283 4.93644600197
4381 4380 13411.6222886 4.71156895662 13407.9107196 4.71156895662
4382 4381 13415.1844169 4.4818195892 13411.7025974 4.4818195892
4383 4382 13418.7466594 4.24798371261 13415.4986757 4.24798371261
4384 4383 13422.3090161 4.01084095534 13419.2981751 4.01084095534
4385 4384 13425.8714867 3.77116122216 13423.1003255 3.77116122216
4386 4385 13429.4340715 3.5297012413 13426.9043702 3.5297012413
4387 4386 13432.9967702 3.28720121458 13430.709569 3.28720121458
4388 4387 13436.559583 3.04438158635 13434.5152014 3.04438158635
4389 4388 13440.1225097 2.80193994644 13438.3205698 2.80193994644
4390 4389 13443.6855504 2.56054808175 13442.1250023 2.56054808175
4391 4390 13447.248705 2.32084919006 13445.9278558 2.32084919006
4392 4391 13450.8119735 2.083455269 13449.7285182 2.083455269
4393 4392 13454.3753559 1.84894469209 13453.5264112 1.84894469209
4394 4393 13457.9388521 1.61785998272 13457.3209921 1.61785998272
4395 4394 13461.5024621 1.39070579614 13461.1117563 1.39070579614
4396 4395 13465.0661859 1.16794711809 13464.8982388 1.16794711809
4397 4396 13468.6300235 0.950007687989 13468.6800158 0.950007687989
4398 4397 13472.1939749 0.737268652995 13472.4567062 0.737268652995
4399 4398 13475.7580399 0.530067458557 13476.2279724 0.530067458557
4400 4399 13479.3222186 0.328696979401 13479.9935216 0.328696979401
4401 4400 13482.886511 0.133404893975 13483.7531061 0.133404893975
4402 4401 13486.450917 -0.0556066959945 13487.5065237 0.0556066959945
4403 4402 13490.0154367 -0.238181400393 13491.2536181 0.238181400393
4404 4403 13493.5800699 -0.414208430877 13494.9942783 0.414208430877
4405 4404 13497.1448167 -0.583622248353 13498.7284389 0.583622248353
4406 4405 13500.709677 -0.746401971033 13502.456079 0.746401971033
4407 4406 13504.2746508 -0.902570547581 13506.1772213 0.902570547581
4408 4407 13507.8397381 -1.05219370098 13509.8919318 1.05219370098
4409 4408 13511.4049389 -1.19537864998 13513.6003175 1.19537864998
4410 4409 13514.970253 -1.33227261595 13517.3025257 1.33227261595
4411 4410 13518.5356806 -1.46306112427 13520.9987418 1.46306112427
4412 4411 13522.1012216 -1.58796611018 13524.6891877 1.58796611018
4413 4412 13525.6668759 -1.70724384008 13528.3741198 1.70724384008
4414 4413 13529.2326436 -1.82118266021 13532.0538262 1.82118266021
4415 4414 13532.7985245 -1.93010058539 13535.7286251 1.93010058539
4416 4415 13536.3645188 -2.03434274149 13539.3988615 2.03434274149
4417 4416 13539.9306262 -2.13427867568 13543.0649049 2.13427867568
4418 4417 13543.4968469 -2.23029954945 13546.7271465 2.23029954945
4419 4418 13547.0631809 -2.32281522984 13550.3859961 2.32281522984
4420 4419 13550.6296279 -2.41225129474 13554.0418792 2.41225129474
4421 4420 13554.1961881 -2.49904596869 13557.6952341 2.49904596869
4422 4421 13557.7628615 -2.58364700561 13561.3465085 2.58364700561
4423 4422 13561.3296479 -2.6665085356 13564.9961565 2.6665085356
4424 4423 13564.8965475 -2.7480878926 13568.6446353 2.7480878926
4425 4424 13568.46356 -2.82884244005 13572.2924024 2.82884244005
4426 4425 13572.0306856 -2.90922641164 13575.939912 2.90922641164
4427 4426 13575.5979242 -2.98968778401 13579.5876119 2.98968778401
4428 4427 13579.1652757 -3.0706651981 13583.2359409 3.0706651981
4429 4428 13582.7327402 -3.15258494566 13586.8853251 3.15258494566
4430 4429 13586.3003176 -3.23585803689 13590.5361756 3.23585803689
4431 4430 13589.8680079 -3.3208773649 13594.1888853 3.3208773649
4432 4431 13593.435811 -3.40801498194 13597.843826 3.40801498194
4433 4432 13597.0037271 -3.49761950202 13601.5013466 3.49761950202
4434 4433 13600.5717559 -3.59001364353 13605.1617695 3.59001364353
4435 4434 13604.1398975 -3.68549192504 13608.8253894 3.68549192504
4436 4435 13607.7081519 -3.7843185264 13612.4924704 3.7843185264
4437 4436 13611.276519 -3.88672532644 13616.1632443 3.88672532644
4438 4437 13614.8449988 -3.99291012777 13619.8379089 3.99291012777
4439 4438 13618.4135913 -4.10303507799 13623.5166264 4.10303507799
4440 4439 13621.9822965 -4.21722529571 13627.1995218 4.21722529571
4441 4440 13625.5511143 -4.33556770867 13630.886682 4.33556770867
4442 4441 13629.1200447 -4.45811011014 13634.5781549 4.45811011014
4443 4442 13632.6890878 -4.58486043858 13638.2739482 4.58486043858
4444 4443 13636.2582433 -4.7157862845 13641.9740296 4.7157862845
4445 4444 13639.8275115 -4.85081462706 13645.6783261 4.85081462706
4446 4445 13643.3968921 -4.98983180206 13649.3867239 4.98983180206
4447 4446 13646.9663852 -5.13268370141 13653.0990689 5.13268370141
4448 4447 13650.5359908 -5.27917620314 13656.815167 5.27917620314
4449 4448 13654.1057088 -5.42907582996 13660.5347846 5.42907582996
4450 4449 13657.6755392 -5.58211063278 13664.2576498 5.58211063278
4451 4450 13661.245482 -5.73797129487 13667.9834533 5.73797129487
4452 4451 13664.8155372 -5.89631245085 13671.7118496 5.89631245085
4453 4452 13668.3857047 -6.05675421378 13675.4424589 6.05675421378
4454 4453 13671.9559845 -6.21888390245 13679.1748684 6.21888390245
4455 4454 13675.5263766 -6.38225795996 13682.9086345 6.38225795996
4456 4455 13679.0968809 -6.5464040536 13686.643285 6.5464040536
4457 4456 13682.6674975 -6.71082334529 13690.3783209 6.71082334529
4458 4457 13686.2382263 -6.87499292059 13694.1132192 6.87499292059
4459 4458 13689.8090673 -7.03836836396 13697.8474356 7.03836836396
4460 4459 13693.3800204 -7.20038646669 13701.5804069 7.20038646669
4461 4460 13696.9510857 -7.36046805347 13705.3115537 7.36046805347
4462 4461 13700.5222631 -7.51802091305 13709.040284 7.51802091305
4463 4462 13704.0935525 -7.67244281758 13712.7659953 7.67244281758
4464 4463 13707.664954 -7.82312461499 13716.4880786 7.82312461499
4465 4464 13711.2364676 -7.96945337836 13720.2059209 7.96945337836
4466 4465 13714.8080931 -8.11081559569 13723.9189087 8.11081559569
4467 4466 13718.3798307 -8.24660038374 13727.626431 8.24660038374
4468 4467 13721.9516801 -8.37620270874 13731.3278829 8.37620270874
4469 4468 13725.5236416 -8.4990265976 13735.0226682 8.4990265976
4470 4469 13729.0957149 -8.61448832239 13738.7102032 8.61448832239
4471 4470 13732.6679001 -8.72201954176 13742.3899197 8.72201954176
4472 4471 13736.2401972 -8.82107038254 13746.0612676 8.82107038254
4473 4472 13739.8126061 -8.91111244555 13749.7237185 8.91111244555
4474 4473 13743.3851268 -8.99164171963 13753.3767685 8.99164171963
4475 4474 13746.9577593 -9.06218138867 13757.0199407 9.06218138867
4476 4475 13750.5305035 -9.12228451666 13760.652788 9.12228451666
4477 4476 13754.1033595 -9.17153659665 13764.2748961 9.17153659665
4478 4477 13757.6763272 -9.20955795 13767.8858851 9.20955795
4479 4478 13761.2494066 -9.23600596318 13771.4854125 9.23600596318
4480 4479 13764.8225976 -9.25057715004 13775.0731747 9.25057715004
4481 4480 13768.3959002 -9.2530090286 13778.6489093 9.2530090286
4482 4481 13771.9693145 -9.24308180202 13782.2123963 9.24308180202
4483 4482 13775.5428403 -9.22061983471 13785.7634602 9.22061983471
4484 4483 13779.1164778 -9.18549291538 13789.3019707 9.18549291538
4485 4484 13782.6902267 -9.1376172999 13792.827844 9.1376172999
4486 4485 13786.2640871 -9.07695652818 13796.3410437 9.07695652818
4487 4486 13789.8380591 -9.00352201011 13799.8415811 9.00352201011
4488 4487 13793.4121424 -8.91737337695 13803.3295158 8.91737337695
4489 4488 13796.9863373 -8.81861859588 13806.8049559 8.81861859588
4490 4489 13800.5606435 -8.70741384619 13810.2680573 8.70741384619
4491 4490 13804.1350611 -8.58396315742 13813.7190242 8.58396315742
4492 4491 13807.7095901 -8.44851781035 13817.1581079 8.44851781035
4493 4492 13811.2842304 -8.30137550341 13820.5856059 8.30137550341
4494 4493 13814.858982 -8.14287928802 13824.0018613 8.14287928802
4495 4494 13818.4338449 -7.9734162777 13827.4072611 7.9734162777
4496 4495 13822.008819 -7.79341613685 13830.8022351 7.79341613685
4497 4496 13825.5839044 -7.60334935619 13834.1872538 7.60334935619
4498 4497 13829.159101 -7.40372532319 13837.5628263 7.40372532319
4499 4498 13832.7344088 -7.19509019653 13840.929499 7.19509019653
4500 4499 13836.3098277 -6.97802459491 13844.2878523 6.97802459491
4501 4500 13839.8853578 -6.75314111126 13847.6384989 6.75314111126

E-021-sinf-sf-curve.json — 1.2 KB, updated 08-19-2026

JSON sidecar (click to expand)
{
  "experiment": "E-021",
  "task": "3.7: exact S_inf(n) + |S_f(n)| curve + D-036 constants",
  "script": "research/numerics/scripts/E-021-sinf-sf-curve.py",
  "parameters": {
    "n_max": 5000,
    "t_zeros": 5000.0
  },
  "checks": {
    "V1_lambda_vs_E015": true,
    "V2_R_bound_holds": true,
    "V3_Sinf_residual_bounded": true
  },
  "key_values": {
    "A_use": 0.9,
    "B0_use": 1.0,
    "R_max_sample": 4.7507714994958565,
    "C0_samples": {
      "1e2": 6.234438640727731,
      "1e4": 8.840233256550178,
      "1e6": 11.194201354663145
    },
    "eta_0": "-0.5772156649015328606065120900824024310",
    "Sinf_residual_fits": [
      [
        1000,
        -0.2500416666625
      ],
      [
        2000,
        -0.2500208333328125
      ],
      [
        3000,
        -0.25001388888873455
      ],
      [
        4000,
        -0.25001041666660156
      ],
      [
        5000,
        -0.2500083333333
      ]
    ],
    "V1_worst_rel": 4.79820218420929e-25,
    "S_f_max_abs": "13.5229134371",
    "S_f_max_abs_n": 3298
  },
  "elapsed_seconds": 2139.3,
  "timestamp_utc": "2026-08-19T06:48:55.463113+00:00"
}

Source code

Python script (click to expand)
"""E-021 — task 3.7: exact S_inf(n) to n=1e4, |S_f(n)| curve, tightened
D-036 constants. Feeds D-037 (finite-height Li theorem).

Components:
  P1. D-036 constants: C0(t) from Trudgian; |R(s)| = |zeta'/zeta(s) -
      sum_{|gamma-t|<1} 1/(s-rho)| sampled at ~30 contour points (flint
      acb zeta + fd derivative, zeros via mp.zetazero) -> fit A, B0.
  P2. eta_j — ALL FLINT (session 006 cont.10 root-cause: mpmath zeta,
      Hurwitz included, silently loses accuracy beyond ~58 digits on
      this stack [mpmath 1.3 + Py 3.14] -> eta_j errors ~1e-58 ->
      S_f binomial cancellation explodes ~(4/3)^n; V1 failed 1.4e143.
      The zero-side sigma route also has eta_0 wrong by 2.4e-4 from
      sigma_1 truncation at T=5000 — both defects removed here).
      j <= 23: Stieltjes series division (E-011 machinery, validated):
        -zeta'/zeta(1+u) = (1/u) N(u)/D(u), eta_k = [u^{k+1}] N/D.
      j >= 24: Lagarias (4.10) with flint arb zeta:
        eta_j = (-1)^{j+1} [(1-2^{-(j+1)}) zeta(j+1) - 1 + sigma_{j+1}]
        with sigma_m = (-1)^{m-1}(tau_{m-1} - eta_{m-1}) + 1 EXACT
        (arithmetic side) for m <= 24, and sigma_m = 2 Re sum
        rho^{-m} over the first 100 zeros (mp.zetazero, dps 100)
        for 25 <= m <= M_SIG; omitted beyond (boundary error
        C(n,M_SIG)*14^{-M_SIG} < 1e-40 by construction).
      NOTES (hard-won, session 006 cont.10):
      * sigma_m may NOT be omitted at any m <= M_SIG — the truncation
        boundary error ~ C(n,M)*14^{-M} PEAKS at M = n/15 with size
        ~(15/14)^n: with M=200, S_f exploded as 1e133 at n=5000
        (measured). M_SIG ~ 0.22*n_max.
      * the m=24 omission alone moved S_f(200) by ~0.4 (measured).
      * float64 zeros for sigma_m are NOT enough either (S_f(300) off
        by 7.8e-8 — measured); need mp.zetazero precision. Zeros
        k > 100 contribute < (14.13/236.5)^25 ~ 1e-31 relative for
        m >= 25, so the first 100 at dps 100 are effectively exact.
      * GAMMA_E must be a string (bare float -> 53-bit, 4.94e-21).
  P3. S_inf(n) EXACT for n <= N_MAX (Lagarias (4.11)):
        S_inf(n) = sum_{j=1}^n (-1)^j C(n,j) (1-2^{-j}) zeta*(j),
        zeta*(1) = log(4pi)+gamma, zeta*(j) = zeta(j) (flint.arb).
      Cancellation ~2^n -> dps = ceil(0.31*n) + 60.
  P4. S_f(n) = sum_{j=1}^n C(n,j) eta_{j-1} (plain binomial — the
      E-011/Lagarias-(4.13) convention after the (-1) absorbed into
      the series-eta definition; VALIDATED: S_f(200) = -2.14037668
      matches S_inf(200)+1-lambda_200(E-015)); lambda_n =
      S_inf - S_f + 1.
  P5. VALIDATION: lambda_n (n <= 3000) vs E-015 certified CSV (rel dev);
      eta_0 vs E-011 value; S_inf fit: S_inf - [(1/2)n log n + C1 n]
      -> c0 (+ c1/n...), C1 = (gamma-1-log(2pi))/2.

Checks:
  V1. lambda_n matches E-015 for n <= 3000 (rel dev < 1e-50 at dps used).
  V2. |R(s)| <= A log(t+2) + B0 at all sample points with the FITTED
      A, B0 (and fitted values reported vs D-036's 2.0/2.0).
  V3. S_inf fit residual -> constant c0 (|residual - c0| -> 0 trend).

Outputs: research/numerics/data/E-021-sinf-sf-curve.csv (+ .json)
"""
import json
import sys
import time
from datetime import datetime, timezone
from pathlib import Path

import flint
import mpmath as mp
import numpy as np

REPO = Path(__file__).resolve().parents[3]
DATA = REPO / "research" / "numerics" / "data"
CSV = DATA / "E-021-sinf-sf-curve.csv"
JSON = DATA / "E-021-sinf-sf-curve.json"
E015 = DATA / "E-015-li-coefficients-n3000.csv"

N_MAX = 5000            # 10000 costs ~2h (row cost ~ n^2 * dps);
                        # cached zeta/zeros make a later 1e4 rerun cheap
T_ZEROS = 5000.0        # zeros up to this height for sigma sums
N_ZMAX = 8000           # mp.zetazero count cap (N(5e3) ~ 7.9e3)
DPS_BIG = 3300
# NOTE: must be a STRING — a bare float literal collapses to 53-bit
# (measured error 4.94e-21 -> sigma_1/zeta*(1) wrong at digit 21).
GAMMA_E = "0.57721566490153286060651209008240243104215933593992337"


# ---------------------------------------------------------------- N(T)
def N_count(T):
    F = (T / (2 * np.pi)) * np.log(T / (2 * np.pi)) - T / (2 * np.pi) + 7 / 8
    return F


def S_bound(T):
    return 0.137 * np.log(T) + 0.443 * np.log(np.log(T)) + 1.588


def C0(t):
    """Upper bound for zeros in [t, t+1] (t >= 10)."""
    return (N_count(t + 1) - N_count(t)) + S_bound(t + 1) + S_bound(t)


# ------------------------------------------------------------- zeros
def compute_zeros():
    cache = DATA / "E-021-zeros-cache.npy"
    n_est = int(N_count(T_ZEROS) + S_bound(T_ZEROS)) + 100
    n_est = min(n_est, N_ZMAX)
    if cache.exists():
        zs = np.load(cache)
        if len(zs) >= n_est:
            print(f"  loaded {n_est} zeros from cache", flush=True)
            return zs[:n_est]
    print(f"  computing {n_est} zeros via mp.zetazero ...", flush=True)
    mp.mp.dps = 30
    zs = []
    for k in range(1, n_est + 1):
        zs.append(mp.zetazero(k).imag)
        if k % 1000 == 0:
            print(f"    {k}/{n_est}", flush=True)
    out = np.array([float(z) for z in zs])
    np.save(cache, out)
    return out


# ------------------------------------------------------- zeta strings
def get_zeta_strings(n_max):
    """zeta(j) decimal strings at full precision (flint arb), cached.
    full_digits = 0.31*n_max + 100 covers the ~2^n cancellation in
    BOTH S_inf and the (1-2^{-s})zeta(s)-1 eta formula (absolute
    error ~1e-1650 uniformly)."""
    full_digits = int(0.31 * n_max) + 100
    zcache = DATA / "E-021-zeta-cache.json"
    if zcache.exists():
        zeta_str = {int(k): v for k, v in
                    json.loads(zcache.read_text()).items()}
        print("  zeta strings loaded from cache", flush=True)
        # patch legacy zeta*(1) (built with double-precision GAMMA_E)
        mp.mp.dps = full_digits + 50
        z1 = mp.nstr(mp.log(4 * mp.pi) + mp.mpf(GAMMA_E), full_digits)
        if zeta_str.get(1) != z1:
            zeta_str[1] = z1
            zcache.write_text(json.dumps(zeta_str))
            print("  patched zeta*(1) in cache (GAMMA_E float fix)",
                  flush=True)
        return zeta_str, full_digits
    flint.ctx.prec = int(full_digits * 3.33) + 200
    mp.mp.dps = full_digits + 50
    zeta_str = {1: mp.nstr(mp.log(4 * mp.pi) + mp.mpf(GAMMA_E),
                           full_digits)}
    for j in range(2, n_max + 1):
        zeta_str[j] = flint.arb(j).zeta().str(full_digits,
                                              radius=False)
        if j % 2000 == 0:
            print(f"    zeta({j}) done", flush=True)
    zcache.write_text(json.dumps(zeta_str))
    return zeta_str, full_digits


# ---------------------------------------------------------------- eta
# K_SPLIT: eta_j for j < K_SPLIT from Stieltjes (exact, arithmetic);
# sigma_m exact for m <= K_SPLIT. Must be ~80: with K_SPLIT=24 the
# zero-tail (k>100) of sigma_25 entered at term j=24 with C(n,24)
# amplification — S_f(3000) was off by 1.06e3 growing ~n^24 (measured).
# With K_SPLIT=80 the zero-tail exposure (m>=81, k>100) is < 3e-11.
K_SPLIT = 80


def compute_eta(zeta_str, full_digits):
    """eta_j for j = 0..N_MAX-1, ALL flint-based (see header P2).
    Returns dict j -> decimal string at full_digits."""
    print(f"  eta_0..{K_SPLIT - 1}: flint Stieltjes + series division "
          "(E-011) ...", flush=True)
    flint.ctx.prec = int((full_digits + 100) * 3.33) + 200
    mp.mp.dps = full_digits + 100   # BEFORE mp.mpf(string) parses below!
    gam_s = [mp.mpf(flint.acb.stieltjes(k).real.str(
        full_digits + 100, radius=False)) for k in range(K_SPLIT + 2)]
    N_ = [mp.mpf(0)] * (K_SPLIT + 2)
    D_ = [mp.mpf(0)] * (K_SPLIT + 2)
    N_[0] = D_[0] = 1
    for m in range(0, K_SPLIT + 1):
        D_[m + 1] = (-1) ** m * gam_s[m] / mp.factorial(m)
    for m in range(1, K_SPLIT + 1):
        N_[m + 1] = -(-1) ** m * gam_s[m] / mp.factorial(m - 1)
    Ev = [mp.mpf(0)] * (K_SPLIT + 2)
    for k in range(0, K_SPLIT + 2):
        s = N_[k]
        for i in range(1, k + 1):
            s -= D_[i] * Ev[k - i]
        Ev[k] = s
    eta_str = {j: mp.nstr(Ev[j + 1], full_digits)
               for j in range(K_SPLIT)}
    print(f"    eta_0 = {mp.nstr(Ev[1], 15)} (should be -gamma)",
          flush=True)
    print(f"    eta_1 = {mp.nstr(Ev[2], 15)}", flush=True)

    # ---- sigma_m: exact (arithmetic) for m <= 24; zeros for 25..200
    print("  sigma_m: m<=24 exact (tau-eta), 25..200 from zeros ...",
          flush=True)
    mp.mp.dps = full_digits + 50
    tau = {0: mp.mpf(-0.5) * (mp.log(4 * mp.pi) + mp.mpf(GAMMA_E))}
    for j in range(1, K_SPLIT):
        z = mp.mpf(zeta_str[j + 1])
        tau[j] = (-1) ** (j + 1) * (1 - mp.mpf(2) ** (-(j + 1))) * z
    sigma = {}
    for m in range(1, K_SPLIT + 1):
        sigma[m] = ((-1) ** (m - 1)
                    * (tau[m - 1] - mp.mpf(eta_str[m - 1])) + 1)
    mp.mp.dps = 60
    sig1_known = 1 + mp.euler / 2 - mp.log(4 * mp.pi) / 2
    print(f"    sigma_1 = {mp.nstr(sigma[1], 20)} "
          f"(closed form {mp.nstr(sig1_known, 20)})", flush=True)
    # sigma_m, m = 25..M_SIG: first 100 zeros via mp.zetazero, dps 100.
    # M_SIG must be adaptive: truncating sigma at M leaves a boundary
    # error ~ C(n,M)*14.13^{-M} which PEAKS at M = n/15 (~(15/14)^n);
    # with M=200 the run exploded as 1e133 at n=5000 (measured). Need
    # C(n,M)*14^{-M} < 1e-40 on the decreasing side (M > n/15).
    # float64 zeros are NOT enough (S_f(300) off 7.8e-8 — measured);
    # zeros k>100 are suppressed by (14.13/236.5)^25 ~ 1e-31 relative.
    n_zeta = max(zeta_str)
    M_SIG = n_zeta
    for M in range(K_SPLIT + 1, n_zeta + 1):
        if M > n_zeta / 15:
            logC = (mp.loggamma(n_zeta + 1) - mp.loggamma(M + 1)
                    - mp.loggamma(n_zeta - M + 1))
            if float(logC - (M - 1) * mp.log(14.13)
                     + mp.log(0.05)) / np.log(10) < -40:
                M_SIG = M
                break
    print(f"    M_SIG = {M_SIG} (C(n,M)*14^{{-M}} < 1e-40)", flush=True)
    # sigma_m precision matters: dps-100 sums left eps_m ~ 14^{-m}e-100,
    # whose C(n,j)-amplified impact (peak term C(n,n/15)*14^{-n/15} ~
    # 1e105 at n=3000) showed up as S_f error ~1e3 (measured). Zeros
    # at 400 digits + sums at full_digits+50 kill it.
    # dps BEFORE any mp.mpf(string) parse! (Third instance of this bug
    # class: g100 parsed at leftover dps 60 corrupted sigma_m at
    # ~m*1e-60*14^{-m} -> S_f(3000) off by 1.7e7, growth ~n^80.)
    mp.mp.dps = full_digits + 50
    z100cache = DATA / "E-021-zeros100-hi-cache.json"
    if z100cache.exists():
        g100 = [mp.mpf(v) for v in
                json.loads(z100cache.read_text())]
    else:
        mp.mp.dps = 450
        g100 = [mp.zetazero(k).imag for k in range(1, 101)]
        z100cache.write_text(json.dumps([mp.nstr(g, 400)
                                         for g in g100]))
        mp.mp.dps = full_digits + 50
    rho = [mp.mpc(mp.mpf("0.5"), g) for g in g100]
    for m in range(K_SPLIT + 1, M_SIG + 1):
        sigma[m] = 2 * mp.re(sum(r ** (-m) for r in rho))
    mp.mp.dps = 60
    print(f"    sigma_2 = {mp.nstr(sigma[2], 20)}", flush=True)
    print(f"    sigma_25 (zeros) = {mp.nstr(sigma[25], 6)}; "
          f"sigma_{M_SIG} = {mp.nstr(sigma[M_SIG], 6)}", flush=True)

    print("  eta_j (j>=24): (-1)^{j+1}[(1-2^{-(j+1)})zeta(j+1) - 1 "
          "+ sigma_{j+1}] ...", flush=True)
    mp.mp.dps = full_digits + 50
    for j in range(K_SPLIT, n_zeta):
        z = mp.mpf(zeta_str[j + 1])
        sig = sigma[j + 1] if j + 1 <= M_SIG else mp.mpf(0)
        eta = (-1) ** (j + 1) * ((1 - mp.mpf(2) ** (-(j + 1))) * z - 1
                                 + sig)
        eta_str[j] = mp.nstr(eta, full_digits)
    # stitch check: eta_{K_SPLIT-1} via Stieltjes vs via full formula
    mp.mp.dps = full_digits + 50
    eta23_formula = ((-1) ** K_SPLIT
                     * ((1 - mp.mpf(2) ** (-K_SPLIT))
                        * mp.mpf(zeta_str[K_SPLIT])
                        - 1 + sigma[K_SPLIT]))
    stitch = abs(eta23_formula - mp.mpf(eta_str[K_SPLIT - 1]))
    mp.mp.dps = 60
    print(f"    stitch |eta_{K_SPLIT - 1} stieltjes - formula| = "
          f"{mp.nstr(stitch, 3)}", flush=True)
    return eta_str


# ----------------------------------------------------------- S_inf, Sf
def compute_S_inf(n_max, zeta_str, full_digits):
    """Exact S_inf(n) via zeta*(j) (flint arb), dps scaled by n.
    Cancellation ~2^n: every zeta(j) stored at FULL string precision
    (the Sigma(-1)^j C(n,j)*1 = 0 piece must cancel exactly)."""
    print("  parsing zeta strings once at full precision ...", flush=True)
    mp.mp.dps = full_digits + 50
    zeta_mpf = {j: mp.mpf(v) for j, v in zeta_str.items()}
    results = {}
    for n in range(1, n_max + 1):
        mp.mp.dps = int(0.31 * n) + 80
        s = mp.mpf(0)
        c = mp.mpf(1)
        for j in range(1, n + 1):
            c = c * (n - j + 1) / j          # C(n,j) by recurrence
            s += ((-1) ** j) * c * (1 - mp.mpf(2) ** (-j)) * zeta_mpf[j]
        results[n] = +s
        if n % 500 == 0:
            print(f"    S_inf row {n}/{n_max}", flush=True)
    return results


def compute_Sf(n_max, eta_str):
    """S_f(n) = sum_j C(n,j) eta_{j-1} — plain binomial (E-011/Lagarias
    (4.13) convention with series-eta; validated at n=200 vs E-015:
    S_f(200) = -2.14037668 = S_inf(200)+1-lambda_200). Requires eta_j
    absolute accuracy ~1e-1650 at n=5000 (terms C(n,j)*eta up to
    ~1e312 cancel to O(1)) — flint-only computation, see P2."""
    full_digits = int(0.31 * n_max) + 100
    mp.mp.dps = full_digits + 50
    eta_mpf = {j: mp.mpf(v) for j, v in eta_str.items()}
    results = {}
    for n in range(1, n_max + 1):
        mp.mp.dps = int(0.31 * n) + 80
        s = mp.mpf(0)
        c = mp.mpf(1)
        for j in range(1, n + 1):
            c = c * (n - j + 1) / j
            s += c * eta_mpf[j - 1]
        results[n] = +s
        if n % 500 == 0:
            print(f"    S_f row {n}/{n_max}", flush=True)
    return results


def main() -> int:
    if CSV.exists() and "--force" not in sys.argv:
        print(f"cached: {CSV} (use --force to recompute)")
        return 0
    t0 = time.time()

    # ---- P1: constants
    print("P1: D-036 constants ...", flush=True)
    print(f"  C0(100) = {C0(100):.3f}, C0(1e4) = {C0(1e4):.3f}, "
          f"C0(1e6) = {C0(1e6):.3f}", flush=True)
    gam_sample = compute_zeros()

    def xi_mp(s):
        return 0.5 * s * (s - 1) * mp.pi ** (-s / 2) * mp.gamma(s / 2) \
            * mp.zeta(s)

    def zeta_logder(s):
        """zeta'/zeta via xi'/xi minus explicit terms (mpmath dps 30;
        complex-zeta OK to ~1e-10 per E-018 C2)."""
        sm = mp.mpc(s.real, s.imag)
        xi_log = mp.diff(xi_mp, sm) / xi_mp(sm)
        return complex(xi_log - 1 / sm - 1 / (sm - 1)
                       + mp.mpf(0.5) * mp.log(mp.pi)
                       - mp.mpf(0.5) * mp.digamma(sm / 2))

    R_samples = []
    mp.mp.dps = 30
    for sig in (-2.5, 0.5, 3.0):
        for t in (10.0, 50.0, 100.0, 500.0, 1000.0):
            s = complex(sig, t)
            near = [g for g in gam_sample if abs(g - t) < 1.0]
            psum = sum(1.0 / (s - complex(0.5, g)) for g in near)
            R_samples.append((sig, t, abs(zeta_logder(s) - psum)))
    # fit |R| <= A log(t+2) + B0
    A_fit = max(v / np.log(t + 2) for _, t, v in R_samples)
    A_use = max(0.5, float(np.ceil(A_fit * 1.2 * 10) / 10))
    B0_need = max(v - A_use * np.log(t + 2) for _, t, v in R_samples)
    B0_use = max(1.0, float(np.ceil(B0_need * 1.3 * 10) / 10))
    print(f"  |R| max sample = {max(v for *_ , v in R_samples):.2f}; "
          f"A_use={A_use}, B0_use={B0_use}", flush=True)

    # ---- P2: zeta strings + eta (all flint)
    print("P2: zeta strings + eta_j (flint) ...", flush=True)
    zeta_str, full_digits = get_zeta_strings(N_MAX)
    eta_str = compute_eta(zeta_str, full_digits)

    # ---- P3/P4: S_inf, S_f
    print("P3: S_inf exact ...", flush=True)
    S_inf = compute_S_inf(N_MAX, zeta_str, full_digits)
    print("P4: S_f ...", flush=True)
    S_f = compute_Sf(N_MAX, eta_str)

    # ---- P5: validation + fit
    print("P5: validation vs E-015 ...", flush=True)
    e015 = {}
    with E015.open() as f:
        header = f.readline()
        for line in f:
            parts = line.strip().split(",")
            if len(parts) >= 2 and parts[0].isdigit():
                e015[int(parts[0])] = mp.mpf(parts[1])
    worst = 0.0
    mp.mp.dps = 100
    for n in sorted(e015):
        lam = S_inf[n] - S_f[n] + 1
        dev = abs(lam - e015[n]) / abs(e015[n])
        worst = max(worst, float(dev))
    print(f"  V1 worst rel dev vs E-015 (n<=3000): {worst:.2e}", flush=True)

    C1 = (mp.mpf(GAMMA_E) - 1 - mp.log(2 * mp.pi)) / 2
    fits = []
    for n in (1000, 2000, 3000, 4000, 5000, 6000, 8000, 10000):
        if n > N_MAX:
            continue
        mp.mp.dps = 100
        resid = S_inf[n] - (mp.mpf(n) / 2) * mp.log(n) - C1 * n
        fits.append((n, float(resid)))
    print(f"  S_inf residual (should -> c0): {fits}", flush=True)

    # ---- write CSV
    with CSV.open("w", encoding="utf-8", newline="") as f:
        f.write("n,S_inf,S_f,lambda_n,abs_Sf\n")
        for n in range(1, N_MAX + 1):
            lam = S_inf[n] - S_f[n] + 1
            f.write(f"{n},{mp.nstr(S_inf[n],12)},{mp.nstr(S_f[n],12)},"
                    f"{mp.nstr(lam,12)},{mp.nstr(abs(S_f[n]),12)}\n")

    checks = {
        # V1 floor is ~1e-24 (E-015 CSV holds 26 digits); 1e-15 still
        # kills any macroscopic (convention/precision) bug — the bugs
        # found in cont.10 produced 1e-8..1e143 deviations.
        "V1_lambda_vs_E015": bool(worst < 1e-15),
        "V2_R_bound_holds": bool(all(
            v <= A_use * np.log(t + 2) + B0_use for _, t, v in R_samples)),
        "V3_Sinf_residual_bounded": bool(
            abs(fits[-1][1] - fits[-2][1]) < abs(fits[0][1] - fits[1][1])),
    }
    meta = {
        "experiment": "E-021",
        "task": "3.7: exact S_inf(n) + |S_f(n)| curve + D-036 constants",
        "script": "research/numerics/scripts/E-021-sinf-sf-curve.py",
        "parameters": {"n_max": N_MAX, "t_zeros": T_ZEROS},
        "checks": checks,
        "key_values": {
            "A_use": A_use, "B0_use": B0_use,
            "R_max_sample": max(v for *_, v in R_samples),
            "C0_samples": {"1e2": C0(100), "1e4": C0(1e4), "1e6": C0(1e6)},
            "eta_0": eta_str[0][:40],
            "Sinf_residual_fits": fits,
            "V1_worst_rel": worst,
            "S_f_max_abs": mp.nstr(max(abs(S_f[n]) for n in S_f), 12),
            "S_f_max_abs_n": int(max(S_f, key=lambda k: abs(S_f[k]))),
        },
        "elapsed_seconds": round(time.time() - t0, 1),
        "timestamp_utc": datetime.now(timezone.utc).isoformat(),
    }
    JSON.write_text(json.dumps(meta, indent=2), encoding="utf-8")
    ok = all(checks.values())
    print(f"wrote {CSV.name}, {JSON.name} — "
          f"{'ALL CHECKS PASS' if ok else 'CHECK FAILURE: ' + str(checks)}")
    return 0 if ok else 1


if __name__ == "__main__":
    raise SystemExit(main())