Unity-Technologies / Unity-Technologies/Unity.Mathematics
Remove `IsNaN` checks from `min()` and `max()`
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 1.4k
- Forks
- 159
- PR merge metrics
- No merged PRs in 30d
Description
-
horrendous code gen
-
hides NaNs which would otherwise be easily caught while debugging
-
propagates throughout the entire
Unity.Mathematics.mathlibrary -
... while breaking the rule of NaN propagation
-
checking for
NaNdoes neither comply to IEEE754, nor any native SIMD instruction sets, nor any C/C++ library - not evenUnityEngine.Mathf -
if we want to copy HLSL 1:1, at least flush denormals to zero and make it even more expensive ;)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the min() and max() implementations and their IsNaN checks in the Unity.Mathematics.math library. Remove the checks so NaN propagation follows the issue's stated IEEE754 and native SIMD expectations, then verify the affected math behavior and generated code.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, unity
- Domain
- performance
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100