This commit is contained in:
Miha Kralj
2026-01-18 22:39:58 -08:00
parent 4673f48a70
commit 8c484e872e
9 changed files with 26 additions and 34 deletions
@@ -315,11 +315,12 @@ public sealed class StdDevValidationTests : IDisposable
streamingResults.Add(streamingStdDev.Update(item).Value);
}
// Compare all modes (allow 1e-8 tolerance for accumulated floating-point errors)
// Compare all modes (allow 1e-7 tolerance for accumulated floating-point errors
// between SIMD batch paths and scalar streaming paths with different FMA/sum ordering)
for (int i = 0; i < _testData.Data.Count; i++)
{
Assert.Equal(batchResult[i].Value, spanOutput[i], 1e-8);
Assert.Equal(batchResult[i].Value, streamingResults[i], 1e-8);
Assert.Equal(batchResult[i].Value, spanOutput[i], 1e-7);
Assert.Equal(batchResult[i].Value, streamingResults[i], 1e-7);
}
}
}