-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
conv.i4 with NaN returns 0 on macOS M1 #86980
Comments
Tagging subscribers to this area: @dotnet/area-system-numerics Issue DetailsDescriptionconv.i4 with NaN as input returns 0 on macOS M1 Reproduction StepsRun the following code on macOS M1
Expected behaviorOn an X86 machine it prints -2147483648 Actual behaviorPrints 0 Regression?No response Known WorkaroundsNo response ConfigurationNo response Other informationI understand casting NaN to integer is unspecified behaviour. However, I'm wondering if the runtime should produce the same output on different architectures.
|
This is a complex issue because it can't be done without harming performance on one of the two target platforms. There is an approved, but NYI, issue covering us fixing this and making it deterministic; but it hasn't bubbled up yet due to the complexity and all the areas that need to be fixed/tested first. Not to mention that it will likely cause some regressions and behavioral breaks for some users who are depending (even unknowingly) on the current behavior. |
#61885, for reference |
Thanks for pointing that out! The explanation sounds reasonable, so please feel free to close this issue if you have been tracking it. |
Thanks! I'll close this as a dupe then and will hopefully be able to get this addressed nearer rather than later term. |
Description
conv.i4 with NaN as input returns 0 on macOS M1
Reproduction Steps
Run the following code on macOS M1
Expected behavior
On an X86 machine it prints -2147483648
Actual behavior
Prints 0
Regression?
No response
Known Workarounds
No response
Configuration
No response
Other information
I understand casting NaN to integer is unspecified behaviour. However, I'm wondering if the runtime should produce the same output on different architectures.
The text was updated successfully, but these errors were encountered: