Uh oh!
There was an error while loading. Please reload this page.
Increase vectorized Tan test tolerance - #130469
Conversation
Tagging subscribers to this area: @dotnet/runtime-infrastructure |
Co-authored-by: kotlarmilos <11523312+kotlarmilos@users.noreply.github.com>
kotlarmilos
commented
Jul 10, 2026
/azp run runtime-extra-platforms |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: bc783bba-10b3-4fb5-9c55-c2daa687fe9c
There was a problem hiding this comment.
Pull request overview
This PR adjusts numerical tolerances in System.Numerics.Tensors generic tests to account for platform-specific differences in trigonometric results when vectorized/FMA code paths are used.
Changes:
- Increased the FMA-path double tolerance used for trigonometric comparisons in
SpanDestinationFunctionsToTestfrom1e-14to3e-14. - Introduced a separate
tanToleranceand switched theTantest case to use it (currently looser than the general trig tolerance).
Show a summary per file
| File | Description |
|---|---|
src/libraries/System.Numerics.Tensors/tests/TensorPrimitives.Generic.cs | Updates FMA trigonometric tolerance selection and applies a dedicated tolerance for Tan. |
Copilot's findings
- Files reviewed: 1/1 changed files
- Comments generated: 1
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: bc783bba-10b3-4fb5-9c55-c2daa687fe9c
kotlarmilos
commented
Jul 10, 2026
/azp run runtime-extra-platforms |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Uh oh!
There was an error while loading. Please reload this page.
kotlarmilos
commented
Jul 13, 2026
TensorPrimitives.Tan tests passed on Apple mobile in runtime-extra-platforms |
kotlarmilos
commented
Jul 13, 2026
/ba-g unrelated extra-platforms failures |
Uh oh!
There was an error while loading. Please reload this page.
## Description This gives vectorized `TensorPrimitives.Tan` a dedicated FMA tolerance of `3e-13` for `double` and `1e-4f` for `float`. ARM64 iOS results differ from scalar `T.Tan` by up to approximately `1.72e-13` and `8.09e-5`, so the shared trigonometric tolerances do not cover the observed range. The shared trigonometric and non-FMA tolerances remain unchanged. Fixes#129045 > [!NOTE] > This description was updated by GitHub Copilot. --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: kotlarmilos <11523312+kotlarmilos@users.noreply.github.com> Co-authored-by: Milos Kotlar <kotlarmilos@gmail.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Description
This gives vectorized
TensorPrimitives.Tana dedicated FMA tolerance of3e-13fordoubleand1e-4fforfloat. ARM64 iOS results differ from scalarT.Tanby up to approximately1.72e-13and8.09e-5, so the shared trigonometric tolerances do not cover the observed range. The shared trigonometric and non-FMA tolerances remain unchanged.Fixes#129045
Note
This description was updated by GitHub Copilot.