diff --git a/diag_step_extrapolation.py b/diag_step_extrapolation.py index e30372f..5784100 100644 --- a/diag_step_extrapolation.py +++ b/diag_step_extrapolation.py @@ -21,9 +21,16 @@ XTOL, MAXFEV, ACC = 1e-12, 200, 1e-6 def halvings_of(f, lo, flo, hi, fhi, landing, r): + """Halvings of the bracket bought by one evaluation at `landing`. + + FIXED 2026-09-21 after the first run of PREREG B printed `inf`: an exact hit makes + the new width 0, and the old floor (ulp of the root, 5e-324 when the root is 0) + overflowed W/floor. An exact hit ends the run, so it is worth exactly the halvings + still needed to reach xtol: the floor is XTOL, the same for every candidate. A was + re-run with this metric; its first numbers used the old floor.""" W = hi - lo Wn = bracket_step(f, lo, flo, hi, fhi, landing) - return math.log2(W / max(Wn, math.ulp(r) if r != 0.0 else 5e-324)) + return math.log2(W / max(Wn, XTOL)) if W > XTOL else 0.0 def replay(f, a, b, r, cfg): diff --git a/results_diag_A_B_fixed_metric.txt b/results_diag_A_B_fixed_metric.txt new file mode 100644 index 0000000..3beecd4 --- /dev/null +++ b/results_diag_A_B_fixed_metric.txt @@ -0,0 +1,30 @@ +######## A (fixed metric) + +== proposed (projection) + group states S>0 A lands out paired n ours step A bisect (bracket halvings per eval) + APS 1408 48.9% 23.1% 530 6.32 8.49 1.07 + CHA fun1 51 64.7% 33.3% 22 6.48 8.14 1.00 + CHA flat fun3-6 1640 87.1% 6.4% 1337 0.26 2.82 1.00 + CHA other 177 62.1% 7.3% 102 3.74 5.20 1.00 + +== reading (3), as for m>=2 + group states S>0 A lands out paired n ours step A bisect (bracket halvings per eval) + APS 1103 51.3% 21.6% 444 9.00 10.44 1.09 + CHA fun1 37 51.4% 15.8% 16 6.71 10.89 1.00 + CHA flat fun3-6 620 68.2% 28.1% 304 0.35 0.77 0.99 + CHA other 129 52.7% 14.7% 58 6.31 8.30 1.00 +######## B (fixed metric) + +== proposed (projection) + group states B bisects ours B (bracket halvings per eval, all states with a decision) + APS 1258 65.6% 4.74 2.49 + CHA fun1 46 60.9% 4.74 2.12 + CHA flat fun3-6 1623 83.6% 0.31 0.97 + CHA other 165 73.3% 3.91 1.60 + +== reading (3), as for m>=2 + group states B bisects ours B (bracket halvings per eval, all states with a decision) + APS 958 52.6% 5.52 2.12 + CHA fun1 32 43.8% 4.52 1.31 + CHA flat fun3-6 603 48.3% 0.58 0.82 + CHA other 120 46.7% 5.22 2.03 diff --git a/results_diag_outcome_memory.txt b/results_diag_outcome_memory.txt new file mode 100644 index 0000000..7d8b584 --- /dev/null +++ b/results_diag_outcome_memory.txt @@ -0,0 +1,14 @@ + +== proposed (projection) + group states B bisects ours B (bracket halvings per eval, all states with a decision) + APS 1258 65.6% inf inf + CHA fun1 46 60.9% 5.44 2.17 + CHA flat fun3-6 1623 83.6% 0.32 0.98 + CHA other 165 73.3% 4.88 2.03 + +== reading (3), as for m>=2 + group states B bisects ours B (bracket halvings per eval, all states with a decision) + APS 958 52.6% 7.46 2.69 + CHA fun1 32 43.8% 5.01 1.52 + CHA flat fun3-6 603 48.3% 0.59 0.83 + CHA other 120 46.7% 6.59 2.72