Repository navigation
Pipe ceil, trunc and floor through round - #200
lgoettgens wants to merge 5 commits into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #200 +/- ##
==========================================
+ Coverage 97.35% 98.01% +0.66%
==========================================
Files 2 2
Lines 606 606
==========================================
+ Hits 590 594 +4
+ Misses 16 12 -4 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
The Julia 1.7 failures were because the generic |
c50d4ee to
50a890c
Compare
|
Do you have commit access here? |
Yes, you invited me a few weeks ago. I haven't merged it yet, as I want to let Claude check all my pre-AI PRs, and I haven't come to this one yet. |
50a890c to
e3e9c91
Compare
e3e9c91 to
dac8c8f
Compare
The generic Base fallbacks trunc/floor/ceil(::Type{T}, x) = round(T, x, mode)
were only added in Julia 1.11 (JuliaLang/julia#50812), so the previous commit
broke these calls on 1.7-1.10. Restrict to T<:Integer to avoid an ambiguity
with Base's ceil(::Type{T<:Integer}, ::AbstractFloat) on older versions.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014GD7jbSks8x6h6QThUrhk3
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014GD7jbSks8x6h6QThUrhk3
The generic `round` fallback for `Int128`, `BigInt` etc. reported `:round` for every mode, unlike master and the fast paths. Assisted-by: Claude Code (Opus 5.5)
The generic integer fallback builds `Bool(10)` and fails; JuliaMath#210 relied on the `round` → `trunc`/`floor`/`ceil` methods removed here. Assisted-by: Claude Code (Opus 5.5)
7838f5f to
d6e5aed
Compare
similar to how it is done in julia Base. Also make use of the generic methods from Base where possible, to avoid invalidations.
This PR reduces the number of invalidations of loading DecFP from 517 to 437 (on julia 1.12.5). In particular, the following invalidation trees get resolved:
Rebased on current master: 174 → 71 on julia 1.12.7, 12 → 9 on julia 1.13.3.