-
-
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
Promotion of Irrational{s} with Complex{Irrational{s}} gives StackOverflowError #51001
Comments
A bit orthogonal, but please note that Julia is not a CAS - not everything is expected to preserve irrationals, or combinations thereof. This looks like it should be fixed though, as simply swapping the order of arguments already works. |
I think you are supposed to use |
You're right, I missed that. The original issue still stands though, that breaks with either |
Is this the same as #13193? |
No, this one should be easier to fix. |
The
promote_rule
with anIrrational{s}
type and aComplex{Irrational{s}}
type (wheres
is the sameSymbol
) gives aStackOverflowError
. The intended type is probablyComplex{Irrational{s}}
, as demonstrated by swapping the arguments:If the parameters are different (e.g.
Irrational{:ℯ}
withComplex{Irrational{:π}}
), then there is no issue as it promotes toComplexF64
.Julia version 1.9.2 installed on Windows 11 with the Julia installer https://julialang.org/downloads/
The text was updated successfully, but these errors were encountered: