-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Define functions for ImaginaryUnit #4922
Conversation
I believe we had historically agreed not to do this, because every function we implement in this way leads to the erroneous impression that we're committed to making all functions work on |
I agree, and we still have the problem that |
Thanks anyway for the pull request, @magistere – it seems like this is a deeper problem than missing functions :-( |
One way to think about the problem is that |
I understand that defining these functions is oversimplified solution to the problem. My initial motivation was to make it work like in MATLAB.
And these operations are not defined when both arguments are of
Maybe it will be better to forbid all operations with |
It is getting those operations via the type promotion mechanism. Given the intended use, it might be reasonable to allow only multiplication, but we used |
Fixed by #5468, since |
Stefan, thank you for finally getting rid of ImaginaryUnit. |
Now many common functions are not defined for imaginary unit
im
that has separate type (not Complex).This pull request defines missing methods with
ImaginaryUnit
argument.