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

Improve printing of complex numbers #3332

Merged
merged 6 commits into from
May 4, 2023
Merged

Improve printing of complex numbers #3332

merged 6 commits into from
May 4, 2023

Conversation

blegat
Copy link
Member

@blegat blegat commented Apr 27, 2023

I tried to make it consistent with both how Base prints complex numbers (im is just on the right of the imaginary part without any * in between) and how JuMP prints real coefficients.

@blegat blegat mentioned this pull request Apr 27, 2023
4 tasks
@blegat blegat force-pushed the bl/complex_print branch from 0921e97 to f700351 Compare April 27, 2023 14:40
@codecov
Copy link

codecov bot commented May 2, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.01 🎉

Comparison is base (adad825) 98.05% compared to head (39325ef) 98.06%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3332      +/-   ##
==========================================
+ Coverage   98.05%   98.06%   +0.01%     
==========================================
  Files          34       34              
  Lines        4876     4911      +35     
==========================================
+ Hits         4781     4816      +35     
  Misses         95       95              
Impacted Files Coverage Δ
src/print.jl 99.76% <100.00%> (+0.02%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@odow
Copy link
Member

odow commented May 3, 2023

If we only have Float64 and Complex, then this makes more sense than what we had before. But I wonder if we should instead unify our coefficient printing and simplify: #3341.

@blegat
Copy link
Member Author

blegat commented May 3, 2023

I think it's nice to have at least optional rounding. Now we can discuss whether we want it by default and I think would be in favor

@odow
Copy link
Member

odow commented May 4, 2023

I'll fix the conflict, since it's my fault for #3341.

@odow odow force-pushed the bl/complex_print branch from cd84444 to 39325ef Compare May 4, 2023 00:51
@blegat blegat merged commit b5e96b3 into master May 4, 2023
@blegat blegat deleted the bl/complex_print branch May 4, 2023 07:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants