Make `round`/`floor`/`ceil`/`trunc` with `digits` keyword more accurate. #63105
All Vouch review confidence checks passed
Residual risk 0.29 = Change Risk (0.52) × (1 − Review Confidence (0.45)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.52 · 451 lines diff across 5 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
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.366
Shallow Review Depth
shallow_review_depth
0.344
Real PR Conversation Timeline
1 comments
"Review active on #63105"
general
weight: 0.35
mikmoore
This fixes https://github.com/JuliaLang/julia/issues/63040, and also fixes a subtle case mentioned in the docstring of
round:The idea is to basically use the TwicePrecision machinery and some other stuff to always faithfully round in the right direction (provided
base^digitsis a number we can represent). Following @adienes's suggestion, I added_mul_roundand_div_roundfunctions which implement "multiply and round" and "divide and round" more accurately. If people think there's a case for making these public, I can do so.__________
Measured on my machine, this change has a small but real impact on performance. For example:
Before:
After:
and
Before:
After:
Assisted by Claude Code (Fable 5.1)