-
-
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
InteractiveUtils
methods show incorrect method for negative powers
#43337
Comments
I think the difference to |
Ahh interesting. Okay. Why are they handled specially? |
So is the issue just that Oh, I see, it's because Answering my own question - 1) because it's more efficient, and 2) Needs special handling to be mathematically correct? |
Although, I guess that leaves the question of why InteractiveUtils doesn't show the correct method lowering. |
power_by_squaring
for Bool with negative int literal produces Float64 valueInteractiveUtils
methods show incorrect method for negative powers
I guess this is a duplicate of #21014. |
It's handled specially because we can, at parse time, figure out that the exponent is negative (it's a literal after all, the type can't magically change) and thus the result will be a |
…w` case. (#53713) The macros `@which`, `@edit`, `@functionloc`, `@less` from `InteractiveUtils`, if applied to the case of literal powers, like `a^12` or `2^-1` used to direct the user to function `^`, while the compiler generates code for `Base.literal_pow`. Now the user is shown the code the compiler generates. Fixes #53691 Fixes #43337 Fixes #21014 Co-authored-by: Matt Bauman <[email protected]>
The text was updated successfully, but these errors were encountered: