ForwardDiff with Interval partials - #769
Conversation
This change supports differentiation of functions with interval-valued
partials, like
x, w = 2.0, interval(-0.5, 0.5)
ForwardDiff.derivative(t -> (x + t*w)^4, 0.0)
Previously, those failed due to a short-circuit in ForwardDiff,
triggering
ERROR: InconclusiveBooleanOperation: The operation
`[0.0, 0.0]_com == [-0.5, 0.5]_com_NG` cannot be determined
unambiguously.
This short-circuits the short-circuit, by specializing `Base.iszero` on
Interval-containing `ForwardDiff.Dual` and `ForwardDiff.Partials`. No
behavior change in IntervalArithmetic itself is needed.
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #769 +/- ##
==========================================
- Coverage 75.48% 75.35% -0.14%
==========================================
Files 32 32
Lines 3100 3112 +12
==========================================
+ Hits 2340 2345 +5
- Misses 760 767 +7 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
I am not sure in what context |
This change supports differentiation of functions with interval-valued partials, like
Previously, those failed due to a short-circuit in ForwardDiff, triggering
This short-circuits the short-circuit, by specializing
Base.iszeroon Interval-containingForwardDiff.DualandForwardDiff.Partials. No behavior change in IntervalArithmetic itself is needed.