Skip to content

added complex sum to the function _linear_expansion - #1492

Open
Bumblebee00 wants to merge 2 commits into
JuliaSymbolics:masterfrom
Bumblebee00:linear_expansion_complex_aware
Open

added complex sum to the function _linear_expansion#1492
Bumblebee00 wants to merge 2 commits into
JuliaSymbolics:masterfrom
Bumblebee00:linear_expansion_complex_aware

Conversation

@Bumblebee00

Copy link
Copy Markdown
Contributor

for issue 1199

@ChrisRackauckas

Copy link
Copy Markdown
Member

This looks right to me. Needs tests.

@codecov-commenter

codecov-commenter commented Mar 21, 2025

Copy link
Copy Markdown

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

Codecov Report

❌ 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 1102 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 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.

@Bumblebee00

Copy link
Copy Markdown
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