# Thumb exp grid and residual tradeoff Former 50 remains the best eligible entry. No tested change lowered Thumb S on all three shared seeds. The delivered `entry.c` is the verified baseline, and `patch.diff` is empty. The final ratio is 1.00000000 on every seed, 0.015 above the item cutoff of 0.985 and 0.061 above the takeover target of 0.939. ## Baseline and final measurements The source SHA-256 is `88617bb49e36a06cabd7d84ce6fe504ee337f8f41ad7c55bc72f696db94060c3`. The pinned kit commit is `5a32428ad4aa23bce737d50a738ace24ddeeed2e`. All six `measure` reports used `--targets thumbv6m,rv32im --no-sample` and matched the requested measurement fingerprint `2c8fd1f3a6711f0639685319fb25262b02bfecf4c6589c52cb58928270a46322`. The base and final reports are identical for each seed, including the RV32IM image digest. The reports include every function and class. Exp means below are typical / wide / hard / uniform, in retired instructions. [Pinned baseline](https://raw.githubusercontent.com/identity-md-launches/goal-3465-objective-build-entry-c-conjectures-io/c5e3f91274b1f0c409127e8cfc14aa5ac8f392da/eik-work/baselines/former-50/entry.c) | Target | Seed | Base S | Final S | Final/base | Bytes | Base exp means | Final exp means | |---|---:|---:|---:|---:|---:|---|---| | thumbv6m | 1001 | 40.35740944 | 40.35740944 | 1.00000000 | 20,500 | 42.8235 / 34.6770 / 57.3667 / 20.3690 | 42.8235 / 34.6770 / 57.3667 / 20.3690 | | thumbv6m | 2002 | 40.36980096 | 40.36980096 | 1.00000000 | 20,500 | 42.9285 / 34.4830 / 60.1467 / 19.8980 | 42.9285 / 34.4830 / 60.1467 / 19.8980 | | thumbv6m | 3003 | 40.06372945 | 40.06372945 | 1.00000000 | 20,500 | 43.0120 / 34.0880 / 56.5867 / 19.9320 | 43.0120 / 34.0880 / 56.5867 / 19.9320 | | rv32im | 1001 | 28.48629371 | 28.48629371 | 1.00000000 | 18,960 | 30.3245 / 24.9480 / 41.5767 / 13.7730 | 30.3245 / 24.9480 / 41.5767 / 13.7730 | | rv32im | 2002 | 28.51798843 | 28.51798843 | 1.00000000 | 18,960 | 30.5165 / 25.0740 / 43.9767 / 13.1010 | 30.5165 / 25.0740 / 43.9767 / 13.1010 | | rv32im | 3003 | 28.22021703 | 28.22021703 | 1.00000000 | 18,960 | 30.4930 / 24.6640 / 41.5133 / 13.1150 | 30.4930 / 24.6640 / 41.5133 / 13.1150 | ## Degree and size tradeoffs The dominant normal-exp path retires 41 instructions. The table load and residual evaluation account for 15 of them. Only 40, 45, and 50 of 2,000 typical calls reach `t_exp_res` on seeds 1001, 2002, and 3003. On these inputs the guarded quadratic saved at most one instruction per residual call when it skipped the cubic block. A fallback that evaluated the cubic paid six extra instructions. The variant added 12 bytes and raised the hard mean by 1.84–2.12 instructions. Its 0.127–0.147% regression outweighed the small changes in the typical mean. At 20,500 bytes the exact size-factor penalty for 12 more bytes is 0.00697%. [Pinned score formula](https://raw.githubusercontent.com/conjectures-io/exact-integer-kernels-miner/5a32428ad4aa23bce737d50a738ace24ddeeed2e/eik/score.py) The small-argument variants deferred all or part of the higher-order correction in the exp-only `t_exp_small_fix`. Their extra branch and code bytes raised S on all seeds. Reordering the existing cubic arithmetic tied the base. The closest distinct three-seed trial was `den-unify0`. Its 4-byte saving bought about 0.00233% in the size term and lowered S on seed 1001. The score regressed on seeds 2002 and 3003. Branch hints on the normal residual and additional denormal arithmetic variants also failed the three-seed rule. The 256- and 1024-step grids are **UNVERIFIED**. The degree experiments kept the 512-step grid. Existing sigmoid and tanh paths consume low words or fields of the same grid, so replacing it in place would require changes outside this patch's integration scope. A separate 1024-step grid with 512 additional 32-bit high words and 512 additional 16-bit low words would cost 3 KiB before code or padding, raising the size factor by about 1.77%. At the measured typical exp mean that requires roughly four typical instructions per call back merely to break even if only that mean moves. The next experiment is to design an exp-only refinement for odd grid points that avoids a second full table, then measure whether it removes operations from the dominant 41-instruction path. [Pinned baseline](https://raw.githubusercontent.com/identity-md-launches/goal-3465-objective-build-entry-c-conjectures-io/c5e3f91274b1f0c409127e8cfc14aa5ac8f392da/eik-work/baselines/former-50/entry.c) ## Integer bounds for the experimental guards - **Guarded quadratic.** After the arithmetic shift by 16, `t_c` is in [−32768, 32767]. Its square fits in signed 32 bits. The product `(t_c*t_c >> 14)*t_c` lies in [−2³¹, 2³¹−1]. Its arithmetic shift by 14 is in [−131072, 131071]. Multiplication by 10923 fits in signed 32 bits, and the final shift by 5 bounds the cubic contribution in magnitude by 44,740,608, below 2²⁶. The guard checks whether the pre-cubic accumulator lies in [−2²⁶, 2²⁶) modulo 2³¹. Outside that interval, subtracting the cubic cannot cross either sign-bit transition in the 32-bit ring. - **Small-argument guards.** The signed shift by 15 gives `|t_xt| ≤ 65536`. The first correction is bounded by `4095 × 65536 < 2²⁸`. In the second correction the extracted square slice is at most 8191 and the shifted first correction has magnitude at most 16384. The product with `t_xt` fits in signed 32 bits. After shifting by 13 its magnitude is at most 2¹⁸. The full correction is therefore bounded by 2²⁹, and the partial correction by 2¹⁸. The guards use those respective radii around both sign transitions. - **Denormal midpoint.** For the existing defined shift range `0 ≤ t_sh ≤ 31`, write `t_P = t_x·2^t_sh + r` with `0 ≤ r < 2^t_sh`. The unified midpoint is `(t_x | 1) << t_sh`. If `t_x` is odd, unsigned subtraction from `t_P` yields `r`. If it is even, the difference is `r − 2^t_sh`, which wraps to at least 2³¹. Thus a difference at most 1 selects precisely the original odd-quotient correction with remainder at most 1. The normal return is unchanged because for even `t_x`, `(t_x + 1) >> 1` equals `t_x >> 1`. ## Verification - `check.log` passed the pinned static checks. The Thumb static stack bound was 312 bytes. - `fullcheck-exp.log` passed all 4,294,967,296 inputs with ASan and UBSan. It exercises the harness's host-selected branch. - `targetcheck-exp.log` passed all 4,294,967,296 inputs on Thumbv6-M under QEMU, with zero mismatches. - `fullcheck-sigmoid-quick.log` and `fullcheck-tanh-quick.log` each passed 134,217,728 inputs. Full-domain local verification of those two functions is **UNVERIFIED**. - Rejected variants were development trials. Their scored inputs passed, but trial-wide full host and target correctness is **UNVERIFIED**. Held-out seeds were reserved for integration. - Setup used the pinned requirements in an isolated Python environment and the prior toolkit's pinned QEMU binary. The harness reported development sandbox mode `none`. No toolchain dependency is required by the delivered C file. [Pinned requirements](https://raw.githubusercontent.com/conjectures-io/exact-integer-kernels-miner/5a32428ad4aa23bce737d50a738ace24ddeeed2e/requirements.txt) · [Prior toolkit dependencies](https://raw.githubusercontent.com/identity-md-launches/goal-3465-objective-build-entry-c-conjectures-io/c5e3f91274b1f0c409127e8cfc14aa5ac8f392da/eik-work/toolkit/dependencies.json) ## Experimental measurements The labels below identify the local trials. `quadratic` defers the cubic in the shared high-precision residual. `cubic` keeps the degree and reorders its modular arithmetic. `small-guard` and `small-cold` defer the full higher-order correction, while `small-split` and `small-likely` defer its second term. The `den-*` trials vary the denormal residual, indexing, or midpoint checks, and `hint-*` trials adjust branch layout around the normal-exp rounding tests. Three denormal forms were screened out on seed 1001. Every measured trial matched its seed's RV32IM S and scored size. | Trial | Seed | Thumb ratio | Thumb bytes | Exp typical / wide / hard / uniform | |---|---:|---:|---:|---| | `cubic` | 1001 | 1.00000000 | 20,500 | 42.8235 / 34.6770 / 57.3667 / 20.3690 | | `cubic` | 2002 | 1.00000000 | 20,500 | 42.9285 / 34.4830 / 60.1467 / 19.8980 | | `cubic` | 3003 | 1.00000000 | 20,500 | 43.0120 / 34.0880 / 56.5867 / 19.9320 | | `den-acc` | 1001 | 0.99997681 | 20,500 | 42.8235 / 34.6730 / 57.3667 / 20.3690 | | `den-acc` | 2002 | 0.99998045 | 20,500 | 42.9285 / 34.4870 / 60.1400 / 19.8980 | | `den-acc` | 3003 | 1.00005053 | 20,500 | 43.0120 / 34.0930 / 56.5933 / 19.9320 | | `den-fixedshift` | 1001 | 1.00000471 | 20,504 | 42.8235 / 34.6730 / 57.3667 / 20.3690 | | `den-fixedshift` | 2002 | 1.00000369 | 20,504 | 42.9285 / 34.4870 / 60.1400 / 19.8980 | | `den-fixedshift` | 3003 | 1.00009140 | 20,504 | 43.0120 / 34.0930 / 56.6067 / 19.9320 | | `den-hoist` | 1001 | 1.00001508 | 20,500 | 42.8235 / 34.6790 / 57.3667 / 20.3690 | | `den-hoist` | 2002 | 1.00002427 | 20,500 | 42.9285 / 34.4860 / 60.1500 / 19.8980 | | `den-hoist` | 3003 | 1.00004377 | 20,500 | 43.0120 / 34.0930 / 56.5933 / 19.9320 | | `den-index0` | 1001 | 1.00001508 | 20,500 | 42.8235 / 34.6790 / 57.3667 / 20.3690 | | `den-index0` | 2002 | 1.00002427 | 20,500 | 42.9285 / 34.4860 / 60.1500 / 19.8980 | | `den-index0` | 3003 | 1.00004377 | 20,500 | 43.0120 / 34.0930 / 56.5933 / 19.9320 | | `den-index1` | 1001 | 1.00001508 | 20,500 | 42.8235 / 34.6790 / 57.3667 / 20.3690 | | `den-index1` | 2002 | 1.00002427 | 20,500 | 42.9285 / 34.4860 / 60.1500 / 19.8980 | | `den-index1` | 3003 | 1.00004377 | 20,500 | 43.0120 / 34.0930 / 56.5933 / 19.9320 | | `den-index2` | 1001 | 1.00000226 | 20,496 | 42.8235 / 34.6810 / 57.3667 / 20.3690 | | `den-index2` | 2002 | 1.00002530 | 20,496 | 42.9285 / 34.4890 / 60.1533 / 19.8980 | | `den-index2` | 3003 | 1.00004665 | 20,496 | 43.0120 / 34.0980 / 56.5867 / 19.9320 | | `den-index3` | 1001 | 1.00000226 | 20,496 | 42.8235 / 34.6810 / 57.3667 / 20.3690 | | `den-index3` | 2002 | 1.00002530 | 20,496 | 42.9285 / 34.4890 / 60.1533 / 19.8980 | | `den-index3` | 3003 | 1.00004665 | 20,496 | 43.0120 / 34.0980 / 56.5867 / 19.9320 | | `den-index4` | 1001 | 1.00001508 | 20,500 | 42.8235 / 34.6790 / 57.3667 / 20.3690 | | `den-index4` | 2002 | 1.00002427 | 20,500 | 42.9285 / 34.4860 / 60.1500 / 19.8980 | | `den-index4` | 3003 | 1.00004377 | 20,500 | 43.0120 / 34.0930 / 56.5933 / 19.9320 | | `den-mask` | 1001 | 1.00004531 | 20,504 | 42.8235 / 34.6790 / 57.3667 / 20.3690 | | `den-maskor` | 1001 | 1.00014741 | 20,508 | 42.8235 / 34.6910 / 57.3667 / 20.3690 | | `den-maskor` | 2002 | 1.00021637 | 20,508 | 42.9285 / 34.5040 / 60.1700 / 19.8980 | | `den-maskor` | 3003 | 1.00033513 | 20,508 | 43.0120 / 34.1230 / 56.6200 / 19.9320 | | `den-negative` | 1001 | 0.99997681 | 20,500 | 42.8235 / 34.6730 / 57.3667 / 20.3690 | | `den-negative` | 2002 | 0.99998045 | 20,500 | 42.9285 / 34.4870 / 60.1400 / 19.8980 | | `den-negative` | 3003 | 1.00005053 | 20,500 | 43.0120 / 34.0930 / 56.5933 / 19.9320 | | `den-odd` | 1001 | 0.99997681 | 20,500 | 42.8235 / 34.6730 / 57.3667 / 20.3690 | | `den-odd` | 2002 | 0.99998045 | 20,500 | 42.9285 / 34.4870 / 60.1400 / 19.8980 | | `den-odd` | 3003 | 1.00005053 | 20,500 | 43.0120 / 34.0930 / 56.5933 / 19.9320 | | `den-or` | 1001 | 1.00010908 | 20,504 | 42.8235 / 34.6890 / 57.3667 / 20.3690 | | `den-or` | 2002 | 1.00016886 | 20,504 | 42.9285 / 34.5010 / 60.1667 / 19.8980 | | `den-or` | 3003 | 1.00026814 | 20,504 | 43.0120 / 34.1180 / 56.6133 / 19.9320 | | `den-predicate` | 1001 | 1.00000233 | 20,500 | 42.8235 / 34.6770 / 57.3667 / 20.3690 | | `den-tail` | 1001 | 1.00000233 | 20,500 | 42.8235 / 34.6770 / 57.3667 / 20.3690 | | `den-unify0` | 1001 | 0.99998718 | 20,496 | 42.8235 / 34.6790 / 57.3667 / 20.3690 | | `den-unify0` | 2002 | 1.00000103 | 20,496 | 42.9285 / 34.4860 / 60.1500 / 19.8980 | | `den-unify0` | 3003 | 1.00000289 | 20,496 | 43.0120 / 34.0930 / 56.5800 / 19.9320 | | `den-unify1` | 1001 | 1.00000226 | 20,496 | 42.8235 / 34.6810 / 57.3667 / 20.3690 | | `den-unify1` | 2002 | 1.00002530 | 20,496 | 42.9285 / 34.4890 / 60.1533 / 19.8980 | | `den-unify1` | 3003 | 1.00004665 | 20,496 | 43.0120 / 34.0980 / 56.5867 / 19.9320 | | `den-unify2` | 1001 | 1.00010210 | 20,504 | 42.8235 / 34.6890 / 57.3667 / 20.3690 | | `den-unify2` | 2002 | 1.00016886 | 20,504 | 42.9285 / 34.5010 / 60.1667 / 19.8980 | | `den-unify2` | 3003 | 1.00024170 | 20,504 | 43.0120 / 34.1180 / 56.5933 / 19.9320 | | `den-unify3` | 1001 | 1.00014042 | 20,508 | 42.8235 / 34.6910 / 57.3667 / 20.3690 | | `den-unify3` | 2002 | 1.00021637 | 20,508 | 42.9285 / 34.5040 / 60.1700 / 19.8980 | | `den-unify3` | 3003 | 1.00030869 | 20,508 | 43.0120 / 34.1230 / 56.6000 / 19.9320 | | `hint-all` | 1001 | 1.00031613 | 20,504 | 42.8435 / 34.6860 / 57.6767 / 20.3710 | | `hint-all` | 2002 | 1.00034048 | 20,504 | 42.9510 / 34.4910 / 60.5033 / 19.8990 | | `hint-all` | 3003 | 1.00033624 | 20,504 | 43.0370 / 34.0940 / 56.9067 / 19.9330 | | `hint-both-round` | 1001 | 1.00029288 | 20,500 | 42.8435 / 34.6860 / 57.6767 / 20.3710 | | `hint-both-round` | 2002 | 1.00031723 | 20,500 | 42.9510 / 34.4910 / 60.5033 / 19.8990 | | `hint-both-round` | 3003 | 1.00031298 | 20,500 | 43.0370 / 34.0940 / 56.9067 / 19.9330 | | `hint-neg-round` | 1001 | 1.00015130 | 20,496 | 42.8415 / 34.6790 / 57.5233 / 20.3700 | | `hint-neg-round` | 2002 | 1.00015801 | 20,496 | 42.9460 / 34.4870 / 60.3167 / 19.8990 | | `hint-neg-round` | 3003 | 1.00014781 | 20,496 | 43.0335 / 34.0890 / 56.7167 / 19.9320 | | `hint-neg-sign` | 1001 | 1.00000000 | 20,500 | 42.8235 / 34.6770 / 57.3667 / 20.3690 | | `hint-neg-sign` | 2002 | 1.00000000 | 20,500 | 42.9285 / 34.4830 / 60.1467 / 19.8980 | | `hint-neg-sign` | 3003 | 1.00000000 | 20,500 | 43.0120 / 34.0880 / 56.5867 / 19.9320 | | `hint-pos-round` | 1001 | 1.00014180 | 20,504 | 42.8255 / 34.6840 / 57.5200 / 20.3700 | | `hint-pos-round` | 2002 | 1.00015950 | 20,504 | 42.9335 / 34.4870 / 60.3333 / 19.8980 | | `hint-pos-round` | 3003 | 1.00016542 | 20,504 | 43.0155 / 34.0930 / 56.7767 / 19.9330 | | `hint-pos-sign` | 1001 | 1.00537865 | 20,504 | 43.8055 / 35.0490 / 57.4900 / 20.4250 | | `hint-pos-sign` | 2002 | 1.00527757 | 20,504 | 43.9100 / 34.8230 / 60.2967 / 19.9360 | | `hint-pos-sign` | 3003 | 1.00529517 | 20,504 | 43.9905 / 34.4330 / 56.7400 / 19.9760 | | `quadratic` | 1001 | 1.00127179 | 20,512 | 42.8315 / 34.6820 / 59.2267 / 20.3670 | | `quadratic` | 2002 | 1.00146786 | 20,512 | 42.9550 / 34.4960 / 62.2867 / 19.8970 | | `quadratic` | 3003 | 1.00142432 | 20,512 | 43.0465 / 34.0960 / 58.5467 / 19.9380 | | `small-cold` | 1001 | 1.00072591 | 20,512 | 42.8235 / 34.6770 / 58.5067 / 20.3690 | | `small-cold` | 2002 | 1.00072917 | 20,512 | 42.9285 / 34.4890 / 61.3067 / 19.9040 | | `small-cold` | 3003 | 1.00066545 | 20,512 | 43.0120 / 34.0880 / 57.6067 / 19.9320 | | `small-guard` | 1001 | 1.00072591 | 20,512 | 42.8235 / 34.6770 / 58.5067 / 20.3690 | | `small-guard` | 2002 | 1.00072917 | 20,512 | 42.9285 / 34.4890 / 61.3067 / 19.9040 | | `small-guard` | 3003 | 1.00066545 | 20,512 | 43.0120 / 34.0880 / 57.6067 / 19.9320 | | `small-likely` | 1001 | 1.00074917 | 20,516 | 42.8235 / 34.6770 / 58.5067 / 20.3690 | | `small-likely` | 2002 | 1.00072625 | 20,516 | 42.9285 / 34.4820 / 61.3067 / 19.8970 | | `small-likely` | 3003 | 1.00068871 | 20,516 | 43.0120 / 34.0880 / 57.6067 / 19.9320 | | `small-split` | 1001 | 1.00072591 | 20,512 | 42.8235 / 34.6770 / 58.5067 / 20.3690 | | `small-split` | 2002 | 1.00070299 | 20,512 | 42.9285 / 34.4820 / 61.3067 / 19.8970 | | `small-split` | 3003 | 1.00066545 | 20,512 | 43.0120 / 34.0880 / 57.6067 / 19.9320 | ## Delivery status The requested source, empty diff, measurements, instruction notes, and check logs are present in this item directory. Git staging of these supporting files was blocked because the Git index is on a read-only filesystem. This report and `sources.json` are available through the named-output upload. The pinned baseline link above identifies the delivered source byte for byte.