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

Fix false positive result of passing a Function to derivative #1256

Merged
merged 4 commits into from
Sep 4, 2024

Conversation

kapple19
Copy link
Contributor

@kapple19 kapple19 commented Sep 3, 2024

As reported in #1085, e.g.

@variables x
Symbolics.derivative(sqrt, x)

returns 0, when it should return the derivative of sqrt (which is not zero of course).

Also added a catching method to throw for non-Num second input when first input isa Function.

@ChrisRackauckas mentions in #1085 to add a catching method to report "derivative not supported for typeof(f)" which I couldn't understand, I'll need further explanation? I thought it made more sense to report lack of support for x isa Any catch.

He also mentions a check on if x is symbolic in any form, I'm also not sure what that means, i.e. what other forms than Num are supported? Complex{Num} and Integer{Num}? (Which errors on input to f anyway.)

Happy to make changes as desired.

@codecov-commenter
Copy link

codecov-commenter commented Sep 4, 2024

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 80.42%. Comparing base (47cfd60) to head (6fcede0).
Report is 58 commits behind head on master.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@             Coverage Diff             @@
##           master    #1256       +/-   ##
===========================================
+ Coverage    8.30%   80.42%   +72.11%     
===========================================
  Files          46       46               
  Lines        4549     4658      +109     
===========================================
+ Hits          378     3746     +3368     
+ Misses       4171      912     -3259     

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

@ChrisRackauckas ChrisRackauckas merged commit 69cf971 into JuliaSymbolics:master Sep 4, 2024
9 of 11 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.

3 participants