Skip to content
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

Remove IsNaN checks from min() and max() #243

Open
MrUnbelievable92 opened this issue Oct 12, 2023 · 0 comments
Open

Remove IsNaN checks from min() and max() #243

MrUnbelievable92 opened this issue Oct 12, 2023 · 0 comments

Comments

@MrUnbelievable92
Copy link

MrUnbelievable92 commented Oct 12, 2023

  • horrendous code gen

  • hides NaNs which would otherwise be easily caught while debugging

  • propagates throughout the entire Unity.Mathematics.math library

  • ... while breaking the rule of NaN propagation

  • checking for NaN does neither comply to IEEE754, nor any native SIMD instruction sets, nor any C/C++ library - not even UnityEngine.Mathf

  • if we want to copy HLSL 1:1, at least flush denormals to zero and make it even more expensive ;)

@MrUnbelievable92 MrUnbelievable92 changed the title Remove IsNaN checks from min() and max Remove IsNaN checks from min() and max() Oct 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant