Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add flexibility in dispatch for iszero_tuple #667

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

timholy
Copy link
Contributor

@timholy timholy commented Sep 28, 2023

IntervalArithmetic.jl may abandon support for == among intervals (JuliaIntervals/IntervalArithmetic.jl#571). To support specialization for specific Number subtypes, this makes iszero_tuple into a "trait"-dispatched function, first unwrapping all the way down to the elementary numeric type and then jointly dispatching on that type and the actual tuple. This makes it possible to create an extension in IntervalArithmetic that specializes the implementation to use the new comparison operator . The use of recursive unwrapping enables support for higher-order derivatives.

This doesn't pass tests locally, but neither does master, and the failures look identical.

IntervalArithmetic.jl may abandon support for `==` among intervals
(JuliaIntervals/IntervalArithmetic.jl#571).
To support specialization for specific Number subtypes, this makes
`iszero_tuple` into a "trait"-dispatched function, first unwrapping
all the way down to the elementary numeric type and then jointly
dispatching on that type and the actual tuple. This makes it possible
to create an extension in IntervalArithmetic that specializes the
implementation to use the new comparison operator `≛`.
The use of recursive unwrapping enables support for higher-order
derivatives.
@codecov
Copy link

codecov bot commented Sep 28, 2023

Codecov Report

All modified lines are covered by tests ✅

Comparison is base (d300209) 89.65% compared to head (a0d23e7) 86.54%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #667      +/-   ##
==========================================
- Coverage   89.65%   86.54%   -3.12%     
==========================================
  Files          11       10       -1     
  Lines         967      899      -68     
==========================================
- Hits          867      778      -89     
- Misses        100      121      +21     
Files Coverage Δ
src/dual.jl 78.28% <100.00%> (-3.87%) ⬇️
src/partials.jl 84.21% <100.00%> (ø)

... and 8 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant