Skip to content

added complex sum to the function _linear_expansion #1492

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Bumblebee00
Copy link
Contributor

for issue 1199

@ChrisRackauckas
Copy link
Member

This looks right to me. Needs tests.

@codecov-commenter
Copy link

codecov-commenter commented Mar 21, 2025

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

Codecov Report

Attention: Patch coverage is 20.00000% with 4 lines in your changes missing coverage. Please review.

Project coverage is 12.99%. Comparing base (9df148a) to head (1da6587).
Report is 87 commits behind head on master.

Files with missing lines Patch % Lines
src/linear_algebra.jl 20.00% 4 Missing ⚠️

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

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1492      +/-   ##
==========================================
+ Coverage    8.79%   12.99%   +4.19%     
==========================================
  Files          51       51              
  Lines        4924     4957      +33     
==========================================
+ Hits          433      644     +211     
+ Misses       4491     4313     -178     

☔ View full report in Codecov by Sentry.
📢 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.

@Bumblebee00
Copy link
Contributor Author

okay so I am adding some tests, but I encounter strange problems. For example I wanted to add:

@testset "linear_expansion with imaginary numbers" begin
    @variables x y
    a, b, islin = Symbolics.linear_expansion(1im*x + 1im*y, x)
    @test islin && isequal(a, 1im) && isequal(b, 1im*y)
end  

but srangely this test fails for b. even tough printing b gives (0 + 1im)*y, this is considered different from 1im*y. also valuating isequal(b, (0 + 1im)*y returns false.

Does anybody can tell me why this happens and how to check if b is equal to 1im*y ?

@Bumblebee00 Bumblebee00 marked this pull request as ready for review March 26, 2025 16:56
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