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 10 of 10 · 500/page · 5000 rows
# nS_infS_flambda_nabs_Sf
4502 4501 13843.460999 -6.52108166468 13850.9820807 6.52108166468
4503 4502 13847.0367513 -6.28251470268 13854.319266 6.28251470268
4504 4503 13850.6126146 -6.03813226771 13857.6507469 6.03813226771
4505 4504 13854.188589 -5.78864694223 13860.9772359 5.78864694223
4506 4505 13857.7646744 -5.53478868744 13864.2994631 5.53478868744
4507 4506 13861.3408708 -5.27730159112 13867.6181723 5.27730159112
4508 4507 13864.9171781 -5.01694054093 13870.9341186 5.01694054093
4509 4508 13868.4935964 -4.75446783935 13874.2480642 4.75446783935
4510 4509 13872.0701256 -4.49064977732 13877.5607753 4.49064977732
4511 4510 13875.6467656 -4.22625318342 13880.8730188 4.22625318342
4512 4511 13879.2235166 -3.96204196597 13884.1855586 3.96204196597
4513 4512 13882.8003784 -3.6987736651 13887.499152 3.6987736651
4514 4513 13886.377351 -3.43719603214 13890.814547 3.43719603214
4515 4514 13889.9544344 -3.17804365346 13894.132478 3.17804365346
4516 4515 13893.5316285 -2.92203463556 13897.4536632 2.92203463556
4517 4516 13897.1089334 -2.66986736811 13900.7788008 2.66986736811
4518 4517 13900.686349 -2.42221738128 13904.1085664 2.42221738128
4519 4518 13904.2638754 -2.17973431296 13907.4436097 2.17973431296
4520 4519 13907.8415123 -1.94303900136 13910.7845513 1.94303900136
4521 4520 13911.41926 -1.71272071757 13914.1319807 1.71272071757
4522 4521 13914.9971182 -1.48933455204 13917.4864528 1.48933455204
4523 4522 13918.575087 -1.27339896827 13920.848486 1.27339896827
4524 4523 13922.1531665 -1.06539353613 13924.21856 1.06539353613
4525 4524 13925.7313564 -0.865756856204 13927.5971133 0.865756856204
4526 4525 13929.3096569 -0.674884685966 13930.9845416 0.674884685966
4527 4526 13932.8880679 -0.493128277166 13934.3811961 0.493128277166
4528 4527 13936.4665893 -0.320792933058 13937.7873822 0.320792933058
4529 4528 13940.0452212 -0.158136792904 13941.203358 0.158136792904
4530 4529 13943.6239635 -0.00536985003757 13944.6293334 0.00536985003757
4531 4530 13947.2028162 0.137346791334 13948.0654694 0.137346791334
4532 4531 13950.7817793 0.26990141666 13951.5118779 0.26990141666
4533 4532 13954.3608528 0.392231956146 13954.9686208 0.392231956146
4534 4533 13957.9400365 0.504325992931 13958.4357106 0.504325992931
4535 4534 13961.5193306 0.606220524038 13961.9131101 0.606220524038
4536 4535 13965.098735 0.698001475082 13965.4007335 0.698001475082
4537 4536 13968.6782496 0.779802970927 13968.8984466 0.779802970927
4538 4537 13972.2578744 0.851806365713 13972.406068 0.851806365713
4539 4538 13975.8376095 0.914239036899 13975.9233704 0.914239036899
4540 4539 13979.4174547 0.967372949144 13979.4500817 0.967372949144
4541 4540 13982.99741 1.01152299502 13982.9858871 1.01152299502
4542 4541 13986.5774756 1.04704512066 13986.5304304 1.04704512066
4543 4542 13990.1576512 1.07433424557 13990.0833169 1.07433424557
4544 4543 13993.7379369 1.09382198685 13993.6441149 1.09382198685
4545 4544 13997.3183326 1.10597419902 13997.2123584 1.10597419902
4546 4545 14000.8988384 1.11128834174 14000.7875501 1.11128834174
4547 4546 14004.4794542 1.11029068833 14004.3691635 1.11029068833
4548 4547 14008.06018 1.10353338917 14007.9566466 1.10353338917
4549 4548 14011.6410158 1.09159140441 14011.5494244 1.09159140441
4550 4549 14015.2219615 1.07505932137 14015.1469022 1.07505932137
4551 4550 14018.8030171 1.05454807257 14018.748469 1.05454807257
4552 4551 14022.3841826 1.0306815707 14022.353501 1.0306815707
4553 4552 14025.9654579 1.00409327752 14025.9613647 1.00409327752
4554 4553 14029.5468432 0.975422723703 14029.5714204 0.975422723703
4555 4554 14033.1283382 0.945311997349 14033.1830262 0.945311997349
4556 4555 14036.709943 0.914402218575 14036.7955408 0.914402218575
4557 4556 14040.2916576 0.883330018119 14040.4083276 0.883330018119
4558 4557 14043.8734819 0.852724037626 14044.0207579 0.852724037626
4559 4558 14047.455416 0.823201469314 14047.6322145 0.823201469314
4560 4559 14051.0374597 0.795364652522 14051.2420951 0.795364652522
4561 4560 14054.6196131 0.769797744379 14054.8498154 0.769797744379
4562 4561 14058.2018762 0.747063481501 14058.4548127 0.747063481501
4563 4562 14061.7842489 0.727700049179 14062.0565489 0.727700049179
4564 4563 14065.3667312 0.712218074009 14065.6545131 0.712218074009
4565 4564 14068.9493231 0.70109775534 14069.2482253 0.70109775534
4566 4565 14072.5320245 0.694786150211 14072.8372384 0.694786150211
4567 4566 14076.1148355 0.69369462575 14076.4211409 0.69369462575
4568 4567 14079.6977559 0.698196492149 14079.9995594 0.698196492149
4569 4568 14083.2807859 0.708624828477 14083.5721611 0.708624828477
4570 4569 14086.8639253 0.725270512633 14087.1386548 0.725270512633
4571 4570 14090.4471741 0.74838046576 14090.6987937 0.74838046576
4572 4571 14094.0305324 0.778156120362 14094.2523762 0.778156120362
4573 4572 14097.614 0.814752120286 14097.7992479 0.814752120286
4574 4573 14101.197577 0.85827525958 14101.3393017 0.85827525958
4575 4574 14104.7812633 0.908783666068 14104.8724796 0.908783666068
4576 4575 14108.365059 0.966286234255 14108.3987727 0.966286234255
4577 4576 14111.9489639 1.03074231096 14111.9182216 1.03074231096
4578 4577 14115.5329781 1.10206163584 14115.4309164 1.10206163584
4579 4578 14119.1171015 1.18010453761 14118.936997 1.18010453761
4580 4579 14122.7013342 1.26468238568 14122.4366518 1.26468238568
4581 4580 14126.285676 1.3555582954 14125.9301177 1.3555582954
4582 4581 14129.870127 1.45244808419 14129.417679 1.45244808419
4583 4582 14133.4546872 1.5550214741 14132.8996657 1.5550214741
4584 4583 14137.0393565 1.66290353569 14136.376453 1.66290353569
4585 4584 14140.6241349 1.7756763664 14139.8484585 1.7756763664
4586 4585 14144.2090224 1.89288099575 14143.3161414 1.89288099575
4587 4586 14147.7940189 2.01401950835 14146.7799994 2.01401950835
4588 4587 14151.3791244 2.13855737485 14150.240567 2.13855737485
4589 4588 14154.964339 2.26592597956 14153.698413 2.26592597956
4590 4589 14158.5496625 2.3955253329 14157.1541372 2.3955253329
4591 4590 14162.135095 2.52672695554 14160.608368 2.52672695554
4592 4591 14165.7206364 2.65887692047 14164.0617595 2.65887692047
4593 4592 14169.3062867 2.79129903823 14167.5149877 2.79129903823
4594 4593 14172.8920459 2.92329817008 14170.9687477 2.92329817008
4595 4594 14176.477914 3.05416365281 14174.4237503 3.05416365281
4596 4595 14180.0638909 3.18317281885 14177.8807181 3.18317281885
4597 4596 14183.6499766 3.30959459432 14181.340382 3.30959459432
4598 4597 14187.2361711 3.43269315759 14184.803478 3.43269315759
4599 4598 14190.8224744 3.55173164052 14188.2707428 3.55173164052
4600 4599 14194.4088864 3.66597585414 14191.7429106 3.66597585414
4601 4600 14197.9954072 3.77469802068 14195.2207092 3.77469802068
4602 4601 14201.5820366 3.87718049355 14198.7048561 3.87718049355
4603 4602 14205.1687747 3.97271944693 14202.1960553 3.97271944693
4604 4603 14208.7556215 4.06062851695 14205.694993 4.06062851695
4605 4604 14212.3425769 4.14024237636 14209.2023345 4.14024237636
4606 4605 14215.9296408 4.21092022516 14212.7187206 4.21092022516
4607 4606 14219.5168134 4.27204917979 14216.2447642 4.27204917979
4608 4607 14223.1040945 4.32304754412 14219.781047 4.32304754412
4609 4608 14226.6914842 4.36336794612 14223.3281162 4.36336794612
4610 4609 14230.2789823 4.39250032428 14226.886482 4.39250032428
4611 4610 14233.8665889 4.40997474925 14230.4566142 4.40997474925
4612 4611 14237.454304 4.41536406625 14234.03894 4.41536406625
4613 4612 14241.0421276 4.40828634516 14237.6338412 4.40828634516
4614 4613 14244.6300595 4.38840712589 14241.2416524 4.38840712589
4615 4614 14248.2180998 4.35544144765 14244.8626584 4.35544144765
4616 4615 14251.8062485 4.30915565174 14248.4970929 4.30915565174
4617 4616 14255.3945056 4.24936894871 14252.1451366 4.24936894871
4618 4617 14258.982871 4.17595474166 14255.8069162 4.17595474166
4619 4618 14262.5713446 4.08884169888 14259.4825029 4.08884169888
4620 4619 14266.1599265 3.98801456991 14263.171912 3.98801456991
4621 4620 14269.7486167 3.87351474068 14266.875102 3.87351474068
4622 4621 14273.3374151 3.74544052446 14270.5919746 3.74544052446
4623 4622 14276.9263217 3.60394718663 14274.3223745 3.60394718663
4624 4623 14280.5153365 3.44924670258 14278.0660898 3.44924670258
4625 4624 14284.1044594 3.28160724946 14281.8228522 3.28160724946
4626 4625 14287.6936905 3.10135243357 14285.5923381 3.10135243357
4627 4626 14291.2830297 2.90886025666 14289.3741694 2.90886025666
4628 4627 14294.8724769 2.70456182554 14293.1679151 2.70456182554
4629 4628 14298.4620323 2.48893981078 14296.9730925 2.48893981078
4630 4629 14302.0516956 2.26252666124 14300.789169 2.26252666124
4631 4630 14305.641467 2.02590258275 14304.6155644 2.02590258275
4632 4631 14309.2313464 1.77969328997 14308.4516531 1.77969328997
4633 4632 14312.8213337 1.5245675419 14312.2967662 1.5245675419
4634 4633 14316.411429 1.26123447236 14316.1501945 1.26123447236
4635 4634 14320.0016322 0.990440727815 14320.0111915 0.990440727815
4636 4635 14323.5919433 0.712967425867 14323.8789759 0.712967425867
4637 4636 14327.1823623 0.429626948601 14327.7527353 0.429626948601
4638 4637 14330.7728891 0.141259585716 14331.6316295 0.141259585716
4639 4638 14334.3635237 -0.151269956833 14335.5147937 0.151269956833
4640 4639 14337.9542662 -0.447076166335 14339.4013424 0.447076166335
4641 4640 14341.5451164 -0.745256434072 14343.2903729 0.745256434072
4642 4641 14345.1360744 -1.04489484989 14347.1809693 1.04489484989
4643 4642 14348.7271402 -1.3450660628 14351.0722062 1.3450660628
4644 4643 14352.3183136 -1.64483918952 14354.9631528 1.64483918952
4645 4644 14355.9095947 -1.94328175251 14358.8528765 1.94328175251
4646 4645 14359.5009836 -2.23946362919 14362.7404472 2.23946362919
4647 4646 14363.09248 -2.53246099363 14366.624941 2.53246099363
4648 4647 14366.6840841 -2.82136023236 14370.5054443 2.82136023236
4649 4648 14370.2757957 -3.10526181585 14374.3810575 3.10526181585
4650 4649 14373.867615 -3.3832841076 14378.2508991 3.3832841076
4651 4650 14377.4595417 -3.65456709299 14382.1141088 3.65456709299
4652 4651 14381.051576 -3.91827601043 14385.9698521 3.91827601043
4653 4652 14384.6437179 -4.17360486792 14389.8173227 4.17360486792
4654 4653 14388.2359672 -4.41977982865 14393.655747 4.41977982865
4655 4654 14391.8283239 -4.65606244979 14397.4843864 4.65606244979
4656 4655 14395.4207881 -4.88175275958 14401.3025409 4.88175275958
4657 4656 14399.0133597 -5.09619215845 14405.1095518 5.09619215845
4658 4657 14402.6060387 -5.29876613077 14408.9048048 5.29876613077
4659 4658 14406.198825 -5.48890675481 14412.6877318 5.48890675481
4660 4659 14409.7917187 -5.66609499942 14416.4578137 5.66609499942
4661 4660 14413.3847197 -5.82986279713 14420.2145825 5.82986279713
4662 4661 14416.977828 -5.97979488409 14423.9576229 5.97979488409
4663 4662 14420.5710436 -6.11553039898 14427.686574 6.11553039898
4664 4663 14424.1643665 -6.23676423351 14431.4011307 6.23676423351
4665 4664 14427.7577965 -6.34324812897 14435.1010446 6.34324812897
4666 4665 14431.3513338 -6.43479151408 14438.7861253 6.43479151408
4667 4666 14434.9449782 -6.51126208083 14442.4562403 6.51126208083
4668 4667 14438.5387298 -6.57258609625 14446.1113159 6.57258609625
4669 4668 14442.1325886 -6.61874844934 14449.751337 6.61874844934
4670 4669 14445.7265544 -6.64979243348 14453.3763468 6.64979243348
4671 4670 14449.3206274 -6.66581926632 14456.9864466 6.66581926632
4672 4671 14452.9148074 -6.6669873499 14460.5817947 6.6669873499
4673 4672 14456.5090944 -6.65351127549 14464.1626057 6.65351127549
4674 4673 14460.1034885 -6.62566057836 14467.7291491 6.62566057836
4675 4674 14463.6979895 -6.58375824949 14471.2817478 6.58375824949
4676 4675 14467.2925976 -6.52817901167 14474.8207766 6.52817901167
4677 4676 14470.8873126 -6.45934736931 14478.34666 6.45934736931
4678 4677 14474.4821345 -6.3777354416 14481.8598699 6.3777354416
4679 4678 14478.0770633 -6.28386059048 14485.3609239 6.28386059048
4680 4679 14481.672099 -6.17828285504 14488.8503819 6.17828285504
4681 4680 14485.2672416 -6.06160220548 14492.3288438 6.06160220548
4682 4681 14488.862491 -5.93445563041 14495.7969467 5.93445563041
4683 4682 14492.4578473 -5.79751407177 14499.2553613 5.79751407177
4684 4683 14496.0533103 -5.65147922295 14502.7047895 5.65147922295
4685 4684 14499.6488801 -5.49708020557 14506.1459603 5.49708020557
4686 4685 14503.2445566 -5.33507014163 14509.5796267 5.33507014163
4687 4686 14506.8403399 -5.16622263758 14513.0065625 5.16622263758
4688 4687 14510.4362298 -4.99132819785 14516.427558 4.99132819785
4689 4688 14514.0322264 -4.81119058496 14519.843417 4.81119058496
4690 4689 14517.6283297 -4.6266231443 14523.2549529 4.6266231443
4691 4690 14521.2245397 -4.43844511111 14526.6629848 4.43844511111
4692 4691 14524.8208562 -4.24747791769 14530.0683341 4.24747791769
4693 4692 14528.4172793 -4.05454151857 14533.4718208 4.05454151857
4694 4693 14532.013809 -3.86045075118 14536.8742597 3.86045075118
4695 4694 14535.6104452 -3.66601174965 14540.276457 3.66601174965
4696 4695 14539.207188 -3.47201842858 14543.6792064 3.47201842858
4697 4696 14542.8040372 -3.27924905357 14547.0832863 3.27924905357
4698 4697 14546.4009929 -3.0884629147 14550.4894558 3.0884629147
4699 4698 14549.9980551 -2.90039711853 14553.8984522 2.90039711853
4700 4699 14553.5952237 -2.71576351358 14557.3109872 2.71576351358
4701 4700 14557.1924987 -2.53524576362 14560.7277444 2.53524576362
4702 4701 14560.7898801 -2.35949658213 14564.1493766 2.35949658213
4703 4702 14564.3873678 -2.18913514063 14567.5765029 2.18913514063
4704 4703 14567.9849619 -2.02474466252 14571.0097066 2.02474466252
4705 4704 14571.5826623 -1.86687021322 14574.4495325 1.86687021322
4706 4705 14575.180469 -1.71601669625 14577.8964857 1.71601669625
4707 4706 14578.7783819 -1.57264706397 14581.351029 1.57264706397
4708 4707 14582.3764011 -1.43718075047 14584.8135819 1.43718075047
4709 4708 14585.9745266 -1.30999233298 14588.2845189 1.30999233298
4710 4709 14589.5727582 -1.19141042714 14591.7641686 1.19141042714
4711 4710 14593.171096 -1.08171682003 14595.2528128 1.08171682003
4712 4711 14596.76954 -0.981145843823 14598.7506858 0.981145843823
4713 4712 14600.3680901 -0.88988399169 14602.2579741 0.88988399169
4714 4713 14603.9667463 -0.808069776314 14605.7748161 0.808069776314
4715 4714 14607.5655086 -0.735793830101 14609.3013024 0.735793830101
4716 4715 14611.164377 -0.673099245077 14612.8374762 0.673099245077
4717 4716 14614.7633514 -0.619982149142 14616.3833335 0.619982149142
4718 4717 14618.3624318 -0.576392514239 14619.9388244 0.576392514239
4719 4718 14621.9616183 -0.542235190789 14623.5038535 0.542235190789
4720 4719 14625.5609107 -0.51737116163 14627.0782819 0.51737116163
4721 4720 14629.1603091 -0.501619007629 14630.6619281 0.501619007629
4722 4721 14632.7598134 -0.494756576037 14634.2545699 0.494756576037
4723 4722 14636.3594236 -0.496522841703 14637.8559464 0.496522841703
4724 4723 14639.9591397 -0.506619950275 14641.4657596 0.506619950275
4725 4724 14643.5589616 -0.524715431663 14645.0836771 0.524715431663
4726 4725 14647.1588894 -0.550444571168 14648.709334 0.550444571168
4727 4726 14650.7589231 -0.583412924948 14652.342336 0.583412924948
4728 4727 14654.3590625 -0.623198965784 14655.9822615 0.623198965784
4729 4728 14657.9593077 -0.669356844491 14659.6286645 0.669356844491
4730 4729 14661.5596587 -0.721419251773 14663.2810779 0.721419251773
4731 4730 14665.1601153 -0.778900364854 14666.9390157 0.778900364854
4732 4731 14668.7606777 -0.84129886284 14670.6019766 0.84129886284
4733 4732 14672.3613458 -0.908100994458 14674.2694468 0.908100994458
4734 4733 14675.9621196 -0.9787836816 14677.9409032 0.9787836816
4735 4734 14679.5629989 -1.05281764197 14681.6158166 1.05281764197
4736 4735 14683.1639839 -1.12967051411 14685.2936545 1.12967051411
4737 4736 14686.7650745 -1.20880996804 14688.9738845 1.20880996804
4738 4737 14690.3662707 -1.28970678504 14692.6559775 1.28970678504
4739 4738 14693.9675724 -1.37183789008 14696.3394103 1.37183789008
4740 4739 14697.5689797 -1.4546893209 14700.023669 1.4546893209
4741 4740 14701.1704924 -1.5377591181 14703.7082516 1.5377591181
4742 4741 14704.7721107 -1.62056012087 14707.3926708 1.62056012087
4743 4742 14708.3738344 -1.70262265374 14711.0764571 1.70262265374
4744 4743 14711.9756636 -1.7834970903 14714.7591606 1.7834970903
4745 4744 14715.5775981 -1.86275628046 14718.4403544 1.86275628046
4746 4745 14719.1796381 -1.93999782851 14722.1196359 1.93999782851
4747 4746 14722.7817834 -2.01484621027 14725.7966296 2.01484621027
4748 4747 14726.3840341 -2.08695471839 14729.4709888 2.08695471839
4749 4748 14729.9863901 -2.15600722559 14733.1423974 2.15600722559
4750 4749 14733.5888515 -2.22171975705 14736.8105712 2.22171975705
4751 4750 14737.1914181 -2.28384186371 14740.47526 2.28384186371
4752 4751 14740.79409 -2.34215778972 14744.1362478 2.34215778972
4753 4752 14744.3968671 -2.39648742811 14747.7933545 2.39648742811
4754 4753 14747.9997494 -2.44668705999 14751.4464365 2.44668705999
4755 4754 14751.602737 -2.49264987374 14755.0953868 2.49264987374
4756 4755 14755.2058297 -2.53430626186 14758.7401359 2.53430626186
4757 4756 14758.8090275 -2.57162389427 14762.3806514 2.57162389427
4758 4757 14762.4123305 -2.60460756807 14766.0169381 2.60460756807
4759 4758 14766.0157386 -2.63329883493 14769.6490375 2.63329883493
4760 4759 14769.6192518 -2.65777540866 14773.2770272 2.65777540866
4761 4760 14773.2228701 -2.6781503563 14776.9010204 2.6781503563
4762 4761 14776.8265933 -2.69457107762 14780.5211644 2.69457107762
4763 4762 14780.4304217 -2.70721807879 14784.1376397 2.70721807879
4764 4763 14784.034355 -2.71630354725 14787.7506585 2.71630354725
4765 4764 14787.6383933 -2.72206973566 14791.360463 2.72206973566
4766 4765 14791.2425365 -2.72478716409 14794.9673237 2.72478716409
4767 4766 14794.8467847 -2.72475265038 14798.5715373 2.72475265038
4768 4767 14798.4511377 -2.72228717963 14802.1734249 2.72228717963
4769 4768 14802.0555957 -2.7177336246 14805.7733293 2.7177336246
4770 4769 14805.6601585 -2.71145432956 14809.3716129 2.71145432956
4771 4770 14809.2648262 -2.70382857109 14812.9686548 2.70382857109
4772 4771 14812.8695987 -2.6952499096 14816.5648486 2.6952499096
4773 4772 14816.474476 -2.68612344637 14820.1605995 2.68612344637
4774 4773 14820.0794581 -2.6768630012 14823.7563211 2.6768630012
4775 4774 14823.6845449 -2.66788822605 14827.3524332 2.66788822605
4776 4775 14827.2897365 -2.65962167096 14830.9493582 2.65962167096
4777 4776 14830.8950328 -2.65248581804 14834.5475186 2.65248581804
4778 4777 14834.5004338 -2.64690010032 14838.1473339 2.64690010032
4779 4778 14838.1059394 -2.64327792171 14841.7492173 2.64327792171
4780 4779 14841.7115497 -2.64202369474 14845.3535734 2.64202369474
4781 4780 14845.3172646 -2.64352991258 14848.9607945 2.64352991258
4782 4781 14848.9230841 -2.64817427153 14852.5712584 2.64817427153
4783 4782 14852.5290082 -2.65631686031 14856.1853251 2.65631686031
4784 4783 14856.1350368 -2.66829743172 14859.8033343 2.66829743172
4785 4784 14859.74117 -2.68443277225 14863.4256028 2.68443277225
4786 4785 14863.3474077 -2.70501418441 14867.0524219 2.70501418441
4787 4786 14866.9537499 -2.73030509622 14870.684055 2.73030509622
4788 4787 14870.5601966 -2.76053881156 14874.3207354 2.76053881156
4789 4788 14874.1667477 -2.79591641442 14877.9626641 2.79591641442
4790 4789 14877.7734033 -2.83660483929 14881.6100081 2.83660483929
4791 4790 14881.3801632 -2.88273511911 14885.2628983 2.88273511911
4792 4791 14884.9870275 -2.93440082128 14888.9214284 2.93440082128
4793 4792 14888.5939962 -2.99165668129 14892.5856529 2.99165668129
4794 4793 14892.2010693 -3.05451744262 14896.2555867 3.05451744262
4795 4794 14895.8082466 -3.12295691025 14899.9312035 3.12295691025
4796 4795 14899.4155283 -3.19690722434 14903.6124355 3.19690722434
4797 4796 14903.0229142 -3.27625835927 14907.2991726 3.27625835927
4798 4797 14906.6304044 -3.36085785228 14910.9912623 3.36085785228
4799 4798 14910.2379988 -3.45051076449 14914.6885096 3.45051076449
4800 4799 14913.8456974 -3.54497987624 14918.3906773 3.54497987624
4801 4800 14917.4535003 -3.64398611709 14922.0974864 3.64398611709
4802 4801 14921.0614072 -3.74720923002 14925.8086165 3.74720923002
4803 4802 14924.6694184 -3.85428866768 14929.523707 3.85428866768
4804 4803 14928.2775336 -3.96482471783 14933.2423583 3.96482471783
4805 4804 14931.885753 -4.07837985346 14936.9641328 4.07837985346
4806 4805 14935.4940764 -4.19448030228 14940.6885567 4.19448030228
4807 4806 14939.1025039 -4.31261782877 14944.4151217 4.31261782877
4808 4807 14942.7110354 -4.43225172118 14948.1432871 4.43225172118
4809 4808 14946.3196709 -4.55281097456 14951.8724819 4.55281097456
4810 4809 14949.9284105 -4.67369665996 14955.6021071 4.67369665996
4811 4810 14953.537254 -4.79428446884 14959.3315384 4.79428446884
4812 4811 14957.1462014 -4.91392742097 14963.0601288 4.91392742097
4813 4812 14960.7552528 -5.03195872305 14966.7872115 5.03195872305
4814 4813 14964.3644081 -5.14769476443 14970.5121029 5.14769476443
4815 4814 14967.9736673 -5.2604382358 14974.2341055 5.2604382358
4816 4815 14971.5830303 -5.36948135566 14977.9525117 5.36948135566
4817 4816 14975.1924972 -5.47410918915 14981.6666064 5.47410918915
4818 4817 14978.8020679 -5.57360304292 14985.3756709 5.57360304292
4819 4818 14982.4117424 -5.66724391961 14989.0789863 5.66724391961
4820 4819 14986.0215207 -5.75431601479 14992.7758367 5.75431601479
4821 4820 14989.6314027 -5.83411023928 14996.4655129 5.83411023928
4822 4821 14993.2413885 -5.90592774912 15000.1473162 5.90592774912
4823 4822 14996.8514779 -5.96908346592 15003.8205614 5.96908346592
4824 4823 15000.4616711 -6.02290956967 15007.4845807 6.02290956967
4825 4824 15004.071968 -6.0667589466 15011.1387269 6.0667589466
4826 4825 15007.6823685 -6.10000857466 15014.782377 6.10000857466
4827 4826 15011.2928726 -6.12206282937 15018.4149354 6.12206282937
4828 4827 15014.9034803 -6.13235669322 15022.035837 6.13235669322
4829 4828 15018.5141916 -6.13035885218 15025.6445505 6.13035885218
4830 4829 15022.1250065 -6.1155746633 15029.2405811 6.1155746633
4831 4830 15025.7359249 -6.08754897793 15032.8234739 6.08754897793
4832 4831 15029.3469468 -6.04586880604 15036.3928156 6.04586880604
4833 4832 15032.9580722 -5.99016580732 15039.9482381 5.99016580732
4834 4833 15036.5693011 -5.92011859596 15043.4894197 5.92011859596
4835 4834 15040.1806335 -5.83545484681 15047.0160884 5.83545484681
4836 4835 15043.7920693 -5.73595319126 15050.5280225 5.73595319126
4837 4836 15047.4036085 -5.62144489257 15054.0250534 5.62144489257
4838 4837 15051.0152511 -5.49181529114 15057.5070664 5.49181529114
4839 4838 15054.6269971 -5.34700501132 15060.9740021 5.34700501132
4840 4839 15058.2388464 -5.18701092269 15064.4258573 5.18701092269
4841 4840 15061.850799 -5.01188684973 15067.8626859 5.01188684973
4842 4841 15065.462855 -4.82174402493 15071.284599 4.82174402493
4843 4842 15069.0750142 -4.61675128192 15074.6917655 4.61675128192
4844 4843 15072.6872767 -4.39713498621 15078.0844117 4.39713498621
4845 4844 15076.2996425 -4.1631787024 15081.4628212 4.1631787024
4846 4845 15079.9121114 -3.91522259815 15084.827334 3.91522259815
4847 4846 15083.5246836 -3.65366258629 15088.1783462 3.65366258629
4848 4847 15087.1373589 -3.37894920796 15091.5163081 3.37894920796
4849 4848 15090.7501374 -3.09158626063 15094.8417237 3.09158626063
4850 4849 15094.363019 -2.79212917633 15098.1551482 2.79212917633
4851 4850 15097.9760038 -2.48118315663 15101.4571869 2.48118315663
4852 4851 15101.5890916 -2.1594010719 15104.7484927 2.1594010719
4853 4852 15105.2022825 -1.82748113385 15108.0297637 1.82748113385
4854 4853 15108.8155765 -1.48616435116 15111.3017408 1.48616435116
4855 4854 15112.4289735 -1.13623177931 15114.5652053 1.13623177931
4856 4855 15116.0424735 -0.7785015766 15117.820975 0.7785015766
4857 4856 15119.6560764 -0.413825879479 15121.0699023 0.413825879479
4858 4857 15123.2697824 -0.0430875109106 15124.3128699 0.0430875109106
4859 4858 15126.8835913 0.332803463299 15127.5507878 0.332803463299
4860 4859 15130.4975031 0.712913314782 15130.7845898 0.712913314782
4861 4860 15134.1115178 1.09628835328 15134.0152295 1.09628835328
4862 4861 15137.7256354 1.48195873086 15137.2436767 1.48195873086
4863 4862 15141.3398559 1.86894233234 15140.4709135 1.86894233234
4864 4863 15144.9541792 2.25624873411 15143.6979304 2.25624873411
4865 4864 15148.5686053 2.64288321312 15146.9257221 2.64288321312
4866 4865 15152.1831342 3.02785078771 15150.1552834 3.02785078771
4867 4866 15155.7977659 3.41016027149 15153.3876056 3.41016027149
4868 4867 15159.4125003 3.7888283216 15156.623672 3.7888283216
4869 4868 15163.0273375 4.16288346264 15159.864454 4.16288346264
4870 4869 15166.6422773 4.53137006747 15163.1109073 4.53137006747
4871 4870 15170.2573199 4.89335227661 15166.3639676 4.89335227661
4872 4871 15173.8724652 5.24791783767 15169.6245473 5.24791783767
4873 4872 15177.487713 5.59418184733 15172.8935312 5.59418184733
4874 4873 15181.1030636 5.93129037806 15176.1717732 5.93129037806
4875 4874 15184.7185167 6.25842397287 15179.4600927 6.25842397287
4876 4875 15188.3340724 6.57480099175 15182.7592714 6.57480099175
4877 4876 15191.9497307 6.87968079403 15186.0700499 6.87968079403
4878 4877 15195.5654915 7.17236674198 15189.3931247 7.17236674198
4879 4878 15199.1813548 7.45220901144 15192.7291458 7.45220901144
4880 4879 15202.7973207 7.7186071964 15196.0787135 7.7186071964
4881 4880 15206.413389 7.9710126954 15199.4423763 7.9710126954
4882 4881 15210.0295597 8.20893086847 15202.8206289 8.20893086847
4883 4882 15213.645833 8.43192295463 15206.21391 8.43192295463
4884 4883 15217.2622086 8.63960774101 15209.6226009 8.63960774101
4885 4884 15220.8786866 8.8316629757 15213.0470236 8.8316629757
4886 4885 15224.495267 9.00782651783 15216.4874405 9.00782651783
4887 4886 15228.1119498 9.16789721962 15219.9440526 9.16789721962
4888 4887 15231.7287349 9.31173553613 15223.4169993 9.31173553613
4889 4888 15235.3456223 9.43926386016 15226.9063584 9.43926386016
4890 4889 15238.962612 9.55046658067 15230.4121454 9.55046658067
4891 4890 15242.5797039 9.64538986459 15233.9343141 9.64538986459
4892 4891 15246.1968981 9.72414116316 15237.472757 9.72414116316
4893 4892 15249.8141946 9.78688844529 15241.0273061 9.78688844529
4894 4893 15253.4315932 9.83385916151 15244.5977341 9.83385916151
4895 4894 15257.0490941 9.86533894375 15248.1837551 9.86533894375
4896 4895 15260.6666971 9.88167004698 15251.785027 9.88167004698
4897 4896 15264.2844022 9.88324954032 15255.4011527 9.88324954032
4898 4897 15267.9022095 9.8705272562 15259.0316822 9.8705272562
4899 4898 15271.5201189 9.84400350741 15262.6761154 9.84400350741
4900 4899 15275.1381303 9.8042265829 15266.3339037 9.8042265829
4901 4900 15278.7562438 9.75179003421 15270.0044538 9.75179003421
4902 4901 15282.3744594 9.68732976555 15273.6871296 9.68732976555
4903 4902 15285.992777 9.61152094122 15277.381256 9.61152094122
4904 4903 15289.6111966 9.52507472512 15281.0861218 9.52507472512
4905 4904 15293.2297181 9.42873486785 15284.8009833 9.42873486785
4906 4905 15296.8483416 9.32327415738 15288.5250675 9.32327415738
4907 4906 15300.4670671 9.20949075029 15292.2575763 9.20949075029
4908 4907 15304.0858945 9.0882044008 15295.9976901 9.0882044008
4909 4908 15307.7048237 8.96025260537 15299.7445711 8.96025260537
4910 4909 15311.3238549 8.82648668112 15303.4973682 8.82648668112
4911 4910 15314.9429878 8.68776779635 15307.2552201 8.68776779635
4912 4911 15318.5622227 8.5449629721 15311.0172597 8.5449629721
4913 4912 15322.1815593 8.39894107321 15314.7826182 8.39894107321
4914 4913 15325.8009977 8.25056880783 15318.5504289 8.25056880783
4915 4914 15329.4205379 8.10070675402 15322.3198312 8.10070675402
4916 4915 15333.0401799 7.950205432 15326.0899745 7.950205432
4917 4916 15336.6599236 7.79990144033 15329.8600221 7.79990144033
4918 4917 15340.279769 7.65061367393 15333.6291553 7.65061367393
4919 4918 15343.899716 7.50313964146 15337.3965764 7.50313964146
4920 4919 15347.5197648 7.35825189909 15341.1615129 7.35825189909
4921 4920 15351.1399152 7.21669461709 15344.9232205 7.21669461709
4922 4921 15354.7601672 7.07918029479 15348.6809869 7.07918029479
4923 4922 15358.3805208 6.94638663918 15352.4341342 6.94638663918
4924 4923 15362.000976 6.8189536211 15356.1820224 6.8189536211
4925 4924 15365.6215328 6.69748072233 15359.924052 6.69748072233
4926 4925 15369.2421911 6.58252438599 15363.6596667 6.58252438599
4927 4926 15372.8629509 6.47459568154 15367.3883552 6.47459568154
4928 4927 15376.4838123 6.37415819457 15371.1096541 6.37415819457
4929 4928 15380.1047751 6.28162615063 15374.8231489 6.28162615063
4930 4929 15383.7258394 6.19736278106 15378.5284766 6.19736278106
4931 4930 15387.3470051 6.12167893761 15382.2253261 6.12167893761
4932 4931 15390.9682722 6.0548319615 15385.9134403 6.0548319615
4933 4932 15394.5896408 5.99702481126 15389.5926159 5.99702481126
4934 4933 15398.2111107 5.94840545238 15393.2627052 5.94840545238
4935 4934 15401.832682 5.90906651069 15396.9236154 5.90906651069
4936 4935 15405.4543546 5.87904518991 15400.5753094 5.87904518991
4937 4936 15409.0761285 5.85832345272 15404.217805 5.85832345272
4938 4937 15412.6980037 5.84682846329 15407.8511753 5.84682846329
4939 4938 15416.3199802 5.84443328793 15411.4755469 5.84443328793
4940 4939 15419.942058 5.85095784953 15415.0911001 5.85095784953
4941 4940 15423.564237 5.86617012983 15418.6980669 5.86617012983
4942 4941 15427.1865172 5.88978761275 15422.2967296 5.88978761275
4943 4942 15430.8088986 5.92147896076 15425.8874196 5.92147896076
4944 4943 15434.4313812 5.96086591489 15429.4705153 5.96086591489
4945 4944 15438.0539649 6.00752540843 15433.0464395 6.00752540843
4946 4945 15441.6766498 6.06099188287 15436.6156579 6.06099188287
4947 4946 15445.2994358 6.12075979408 15440.178676 6.12075979408
4948 4947 15448.9223228 6.18628629546 15443.7360365 6.18628629546
4949 4948 15452.545311 6.25699408437 15447.2883169 6.25699408437
4950 4949 15456.1684001 6.3322743971 15450.8361258 6.3322743971
4951 4950 15459.7915904 6.41149013712 15454.3801002 6.41149013712
4952 4951 15463.4148816 6.49397912069 15457.9209025 6.49397912069
4953 4952 15467.0382738 6.57905742341 15461.4592164 6.57905742341
4954 4953 15470.661767 6.66602281091 15464.9957442 6.66602281091
4955 4954 15474.2853611 6.75415823646 15468.5312029 6.75415823646
4956 4955 15477.9090562 6.84273538798 15472.0663208 6.84273538798
4957 4956 15481.5328522 6.93101826695 15475.6018339 6.93101826695
4958 4957 15485.1567491 7.01826678143 15479.1384823 7.01826678143
4959 4958 15488.7807468 7.10374033543 15482.6770064 7.10374033543
4960 4959 15492.4048454 7.18670139714 15486.218144 7.18670139714
4961 4960 15496.0290448 7.26641902841 15489.7626257 7.26641902841
4962 4961 15499.653345 7.34217235845 15493.3111726 7.34217235845
4963 4962 15503.277746 7.41325398486 15496.864492 7.41325398486
4964 4963 15506.9022477 7.47897328553 15500.4232744 7.47897328553
4965 4964 15510.5268502 7.5386596256 15503.9881906 7.5386596256
4966 4965 15514.1515535 7.59166544422 15507.559888 7.59166544422
4967 4966 15517.7763574 7.63736920637 15511.1389882 7.63736920637
4968 4967 15521.401262 7.67517820592 15514.7260838 7.67517820592
4969 4968 15525.0262673 7.70453120685 15518.3217361 7.70453120685
4970 4969 15528.6513733 7.72490091039 15521.9264723 7.72490091039
4971 4970 15532.2765798 7.73579623678 15525.5407836 7.73579623678
4972 4971 15535.901887 7.73676441139 15529.1651226 7.73676441139
4973 4972 15539.5272947 7.72739284587 15532.7999019 7.72739284587
4974 4973 15543.152803 7.70731080616 15536.4454922 7.70731080616
4975 4974 15546.7784119 7.67619086026 15540.102221 7.67619086026
4976 4975 15550.4041212 7.63375009981 15543.7703711 7.63375009981
4977 4976 15554.0299311 7.57975113074 15547.45018 7.57975113074
4978 4977 15557.6558415 7.51400282933 15551.1418386 7.51400282933
4979 4978 15561.2818523 7.43636086146 15554.8454914 7.43636086146
4980 4979 15564.9079635 7.34672796371 15558.5612356 7.34672796371
4981 4980 15568.5341752 7.2450539865 15562.2891212 7.2450539865
4982 4981 15572.1604873 7.13133570058 15566.0291516 7.13133570058
4983 4982 15575.7868998 7.00561636918 15569.7812834 7.00561636918
4984 4983 15579.4134126 6.86798508972 15573.5454275 6.86798508972
4985 4984 15583.0400258 6.71857590975 15577.3214499 6.71857590975
4986 4985 15586.6667393 6.55756672317 15581.1091725 6.55756672317
4987 4986 15590.293553 6.38517795389 15584.9083751 6.38517795389
4988 4987 15593.9204671 6.2016710349 15588.7187961 6.2016710349
4989 4988 15597.5474814 6.00734669217 15592.5401348 6.00734669217
4990 4989 15601.174596 5.80254304329 15596.372053 5.80254304329
4991 4990 15604.8018108 5.58763352215 15600.2141773 5.58763352215
4992 4991 15608.4291258 5.36302464138 15604.0661012 5.36302464138
4993 4992 15612.056541 5.12915360547 15607.9273874 5.12915360547
4994 4993 15615.6840563 4.88648578787 15611.7975705 4.88648578787
4995 4994 15619.3116718 4.63551208629 15615.6761597 4.63551208629
4996 4995 15622.9393874 4.37674617081 15619.5626412 4.37674617081
4997 4996 15626.5672031 4.11072164011 15623.4564814 4.11072164011
4998 4997 15630.1951188 3.83798910136 15627.3571297 3.83798910136
4999 4998 15633.8231347 3.55911318977 15631.2640215 3.55911318977
5000 4999 15637.4512505 3.27466954407 15635.176581 3.27466954407
5001 5000 15641.0794664 2.98524175431 15639.0942247 2.98524175431

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())