The float and double tests only generate finite random values:
rng => (float)(rng.NextDouble() * 2000 - 1000)
rng => rng.NextDouble() * 2000 - 1000
This means the test suite doesn't cover:
These are known edge cases for floating-point sorting. Tests should verify that NetworkSort.Sort produces the same ordering as Array.Sort for inputs containing these special values, particularly at sizes 27 and 28 where the unrolled path is used.
Found via Copilot code review on #8.
The float and double tests only generate finite random values:
This means the test suite doesn't cover:
NaN— which is mishandled by the unrolled sort (see Unrolled float/double sorting network mishandles NaN values #10)+∞/-∞-0vs+0These are known edge cases for floating-point sorting. Tests should verify that
NetworkSort.Sortproduces the same ordering asArray.Sortfor inputs containing these special values, particularly at sizes 27 and 28 where the unrolled path is used.Found via Copilot code review on #8.