Skip to content

Support ball in at origin with autodiff#184

Merged
dlfivefifty merged 3 commits into
masterfrom
dl/forwarddiffin
Jun 30, 2026
Merged

Support ball in at origin with autodiff#184
dlfivefifty merged 3 commits into
masterfrom
dl/forwarddiffin

Conversation

@dlfivefifty

Copy link
Copy Markdown
Member

norms with ForwardDiff's Dual are flaky:

julia> norm([Dual(0.0, (1.0,0.0)), Dual(0.0,(0.0,1.0))])
Dual{Nothing}(NaN,NaN,NaN)

This works around this issue.

@dlfivefifty

Copy link
Copy Markdown
Member Author

Note approx_in will also have the same issue but it's less clear how to resolve it, if tolerance is meant literally....

@codecov

codecov Bot commented Jun 29, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.86%. Comparing base (f095869) to head (2bc720d).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #184   +/-   ##
=======================================
  Coverage   93.86%   93.86%           
=======================================
  Files          27       27           
  Lines        1843     1843           
=======================================
  Hits         1730     1730           
  Misses        113      113           

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@daanhb

daanhb commented Jun 30, 2026

Copy link
Copy Markdown
Member

If this works it is worth tagging a new release, there have been some other minor things.

@dlfivefifty

Copy link
Copy Markdown
Member Author

Yes it fixes my issue.

There's a small chance that there is a use-case where a type has norm overloaded which this won't pick up. But we can burn that bridge when we get to it.

The patch version is already incremented so I'll merge and tag.

@dlfivefifty dlfivefifty merged commit be38af1 into master Jun 30, 2026
7 checks passed
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.

2 participants