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

Fixed output of coeff(expression, x^0) or equivalent to coeff(expression, 1) #1098

Merged
merged 4 commits into from
Mar 24, 2024

Conversation

n0rbed
Copy link
Member

@n0rbed n0rbed commented Mar 22, 2024

Since the bool sym == nothing is used repeatedly throughout the function, and coeff(expression, nothing) returns the coefficient of a constant (such as 1 in x^2 +2x + 1). A user may want to use coeff(expression, x^0) for readability's sake to get that constant.

Copy link
Member

@ChrisRackauckas ChrisRackauckas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems reasonable to me.

@codecov-commenter
Copy link

codecov-commenter commented Mar 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 76.37%. Comparing base (79c4e92) to head (cf3b3ae).
Report is 126 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    #1098      +/-   ##
==========================================
- Coverage   77.07%   76.37%   -0.70%     
==========================================
  Files          32       35       +3     
  Lines        3533     3624      +91     
==========================================
+ Hits         2723     2768      +45     
- Misses        810      856      +46     

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

@ChrisRackauckas ChrisRackauckas merged commit c6cf755 into JuliaSymbolics:master Mar 24, 2024
8 of 11 checks passed
@n0rbed n0rbed deleted the fix branch August 30, 2024 12:02
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