-
-
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
Type changes in scalar computation #3759
Comments
This is actually intentional. The idea is that arithmetic always promotes to the system int size since that preserves values and you might as well. For arrays, on the other hand, you don't want to blow your result up if you're working with, e.g. Int16s, then you want the result to still be an Int16 array. Intermediate computations are done with Ints though. |
Thanks for the explanation. This makes sense. |
Anyone who really wants to break a bunch of packages should tackle this! I wonder if we can generalize our promotion system at the same time, see #8027. |
…> T (#3759) the sysimg builds, but still need to: - check same-size signed<->unsigned conversion - make tests pass
closed by #8420 |
On latest commit, I find:
Actually, any arithmetic operation on
Int32
scalars yieldsInt64
scalar, and operations onInt32
arrays yieldsInt32
array.Is this supposed the case? or a bug?
The text was updated successfully, but these errors were encountered: