← Back to Pull requests

add dedicated `min` and `max` methods for `BitInteger` #63287

Closed
unknown closed this pull request without merging on Sep 24, 2026 11:36 UTC
View on GitHub
unknown unknown commented on Sep 19, 2026 23:52 UTC
Author

fixes #63286

The new methods are type-stable. For max the return type follows the usual promotion rules. The same applies to min if both arguments are BitSigned or BitUnsigned. For mixed arguments the return type of min is the type of the signed argument.

Comment 1: For the min of two BitUnsigned arguments, one could alternatively shrink the return type to the smaller of the argument types instead of widen it.

Comment 2: I wonder if it would make sense to define the new methods for Integer / Signed / Unsigned types instead of BitInteger / BitSigned / BitUnsigned, and the same for the comparison operators. The reason is that the same promotion problem appears for other integer types, for example those defined in BitIntegers.jl and EmulatedBitIntegers.jl (CC @PatrickHaecker). Fixing this for all integer types in Base would solve the problem in a cleaner way and would also avoid method ambiguities that otherwise might arise if one integer is from some package X and the other one from some package Y. (If @fingolfin's current work on arbitrary size bit integers makes it into Base, then this will probably become moot.)

Diff: 158 lines (+118 / -40) across 1 files Reviewer: PatrickHaecker Review duration: 6464m
All Vouch review confidence checks passed
Residual risk 0.14 = Change Risk (0.33) × (1 − Review Confidence (0.57)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.33 · 158 lines diff across 1 files
0.33
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%
56%
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.303
Shallow Review Depth shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #63287"
general weight: 0.35
Assignees
Unassigned
Labels
risk: low confidence: 56.8% 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: 33.3% (LOW) · Higher = larger blast radius
33.3%
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: 56.8% · Lower = rushed or shallow review
56.8%
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: 14.4% · Safe to merge
14.4%