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

Printing option for Complex{Num} to avoid printing real and imaginary part #800

Open
davidschlegel opened this issue Dec 9, 2022 · 3 comments

Comments

@davidschlegel
Copy link
Contributor

This is a feature request.
I was wondering if one could somehow switch the behavior for printing expressions of type Complex{Num} to behave just like the ordinary Num. This would in many situations make expressions much cleaner to view.

@philip-stuckey
Copy link
Contributor

philip-stuckey commented May 3, 2023

It would be nice to have different "views" on an expression ("Form" seems to already be taken) for doing things like splitting a vector equation into components (expand would fit nicely in that paradigm). The idea being that these transformations would change how expressions are represented but not their meaning

I have a workaround where I make a variable i and a "primed" variable for the conjugates of complex variables, and substituting what I need by hand

@erny123
Copy link

erny123 commented Sep 5, 2023

Definitely agree with this. The fact that Symbolics automatically splits into real and imaginary, and the automatic assumption that variables and functions are real is problematic for complex mathematics. Rather than dealing with one equation, Symbolics splits it up into real and imaginary and you have to work with two equation which is unnecessary.

Is it worth having symbolics own complex types?
@philip-stuckey I have also done the same thing and defined my own functions such as conjugate() and others to work around this.

@ChrisRackauckas
Copy link
Member

It has its own complex type? @variables x::Complex IIRC.

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

No branches or pull requests

4 participants