Fix symbolic rounding with ForwardDiff 1.4.5 - #1948
Merged
ChrisRackauckas merged 1 commit intoAug 9, 2026
Merged
Conversation
Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Member
Author
|
CI dependency note:
Merge/rebase order: #1946, #1947, then rebase this PR onto the resulting master. |
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1948 +/- ##
===========================================
+ Coverage 23.43% 80.29% +56.86%
===========================================
Files 61 61
Lines 5995 6086 +91
===========================================
+ Hits 1405 4887 +3482
+ Misses 4590 1199 -3391 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
ChrisRackauckas
marked this pull request as ready for review
August 9, 2026 03:12
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ignore this PR until it has been reviewed by @ChrisRackauckas.
Summary
Restore symbolic
floorandceildifferentiation after ForwardDiff 1.4.5 switchedDualrounding to Base'sround(x, ::RoundingMode)interface.The compatibility methods are confined to
SymbolicsForwardDiffExtand only apply when the dual primal isNum. The regression test directly checks both symbolic discontinuities.Regression boundary
Clean Symbolics
masterat30e97f6b5:test/forwarddiff_symbolic_dual_ops.jlpassesceil(Dual{...,Num})because ForwardDiff callsround(::Num, RoundUp)The behavior changed in ForwardDiff PR #829 / commit
569af35:JuliaDiff/ForwardDiff.jl#829
ForwardDiff's new method is correct for its rounding interface. Symbolics owns the cross-package compatibility because
Numsupports symbolicfloorandceilwithout implementing every Base rounding mode.Local verification
Julia 1.12.6, ForwardDiff 1.4.5:
GROUP=Core Pkg.test():17,105passed,355pre-existing broken, exit 0Julia 1.10.11, ForwardDiff 1.4.5:
Additional:
git diff --check: passesThe clean-default failure was reproduced before this branch was created; no changes from the public
fixpoint_subPR are included here.