Increase vectorized Tan test tolerance#130469
Draft
kotlarmilos with Copilot wants to merge 4 commits into
Draft
Conversation
Contributor
|
Tagging subscribers to this area: @dotnet/runtime-infrastructure |
Co-authored-by: kotlarmilos <11523312+kotlarmilos@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix test failure for Tan function on iOS simulator
Increase FMA trigonometric test tolerance
Jul 10, 2026
Member
|
/azp run runtime-extra-platforms |
|
Azure Pipelines successfully started running 1 pipeline(s). |
This was referenced Jul 10, 2026
Open
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: bc783bba-10b3-4fb5-9c55-c2daa687fe9c
Contributor
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
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: bc783bba-10b3-4fb5-9c55-c2daa687fe9c
Member
|
/azp run runtime-extra-platforms |
|
Azure Pipelines successfully started running 1 pipeline(s). |
tannergooding
approved these changes
Jul 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.