← Back to Pull requests

simplify 2F0 Borel fallback and drop Miller recurrence #1817

Closed
unknown closed this pull request without merging on Nov 23, 2026 09:52 UTC
View on GitHub
unknown unknown commented on Nov 21, 2026 21:14 UTC
Author

Trims the 2F0 Borel fallback chain from 12 steps to 5 (borel1, series, borel2, weniger_dd, pfq_borel_dd) plus a cached margin = 0 RawBorel fallback, deletes Miller's algorithm (hyp2f0_miller) and xsf_hypu_min_digits / chgu's id_min parameter, and drops f64 Weniger from pfq_borel.

| Function | Domain | Peak before -> after | Gmean before -> after | Infs |
| --- | --- | ---: | ---: | ---: |
| hyp2f0 | a1, a2 in [-10, 10], z in -[1e-3, 1e6] (log) | 5.1e-14 -> 2.1e-14 | 3.1e-16 -> 2.8e-16 | 0 -> 0 |
| hyp2f0 | a1, a2 in +- [1e-3, 100] (log), z in -[1e-3, 1e6] (log) | 4.9e-14 -> 4.9e-14 | 5.2e-16 -> 4.0e-16 | 0 -> 0 |
| hyppfq (3F0) | a1..a3 in [-10, 10] and log | inf (1) -> inf (1) | 1.6e-16 -> 1.5e-16 | 1 -> 1 |
| hyppfq (4F0) | a1..a4 in +- [1e-3, 100] (log), z in -[1e-3, 1e6] (log) | 2.0e-14 -> 7.7e-15 | 1.7e-16 -> 1.6e-16 | 0 -> 0 |

  • RawBorel caches each orientation's nominal/perturbed U evaluation (reused at margin = 0), deduplicates a1 == a2, and skips the perturbed chgu call when both b and x are exact.

  • Deleting hyp2f0_miller, MILLER_DECAY, HYP2F0_WENIGER_F64_MARGIN, xsf_hypu_min_digits, chgu's id_min, inline 2F0 terms, and pfq_borel's weniger_f64 removes ~135 production lines with zero added Nones in docs/accuracy.md.

  • just pfq-map updated docs/img/hyppfq-error.svg, docs/img/hyppfq-error-int.svg, and docs/img/hyppfq-none-int.svg.
  • <details>
    <summary>Coverage deltas on removed-method regression tests</summary>

    | Test group | Count | hyppfq after cut | hyp2f0 after cut |
    | --- | ---: | --- | --- |
    | Former test_hyppfq_2f0_miller (5 cases) | 5 | 2 remain Some (<= 2.5e-16), 3 become None | All 5 finite (<= 1.1e-14) |
    | Former test_hyppfq_2f0_miller_shifted (9 cases, incl. [600, 4600] subnormal) | 9 | 1 remains Some (0), 8 become None (incl. [600, 4600]) | 7 finite (<= 2.1e-12), 2 NaN ([-238.57, -244.72] and [600, 4600]) |
    | Former test_hyppfq_2f0_hypu_tol (5 cases) | 5 | 3 remain Some (<= 2.1e-16), 2 become None | All 5 finite (<= 7.5e-13) |
    | test_hyppfq_2f0_chgu (incl. 13-digit cached fallback) | all | Unchanged | Unchanged |

    </details>

    Diff: 281 lines (+210 / -71) across 3 files Reviewer: jorenham Review duration: 2198m
    All Vouch review confidence checks passed
    Residual risk 0.16 = Change Risk (0.40) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.40 · 281 lines diff across 3 files
    0.40
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.338
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #1817"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 39.7% (MEDIUM) · Higher = larger blast radius
    39.7%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 15.7% · Safe to merge
    15.7%