Skip to content

Increase vectorized Tan test tolerance#130469

Draft
kotlarmilos with Copilot wants to merge 4 commits into
mainfrom
copilot/fix-ios-simulator-tan-test-failure
Draft

Increase vectorized Tan test tolerance#130469
kotlarmilos with Copilot wants to merge 4 commits into
mainfrom
copilot/fix-ios-simulator-tan-test-failure

Conversation

Copilot AI commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

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.

@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @dotnet/runtime-infrastructure
See info in area-owners.md if you want to be subscribed.

Co-authored-by: kotlarmilos <11523312+kotlarmilos@users.noreply.github.com>
Copilot AI requested review from Copilot and removed request for Copilot July 10, 2026 10:58
Copilot AI changed the title [WIP] Fix test failure for Tan function on iOS simulator Increase FMA trigonometric test tolerance Jul 10, 2026
Copilot AI requested a review from kotlarmilos July 10, 2026 10:59
Copilot AI had a problem deploying to copilot-pat-pool July 10, 2026 11:05 Failure
@kotlarmilos

Copy link
Copy Markdown
Member

/azp run runtime-extra-platforms

@azure-pipelines

Copy link
Copy Markdown
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
Copilot AI review requested due to automatic review settings July 10, 2026 16:11

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 SpanDestinationFunctionsToTest from 1e-14 to 3e-14.
  • Introduced a separate tanTolerance and switched the Tan test 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
Copilot AI review requested due to automatic review settings July 10, 2026 16:16
@kotlarmilos kotlarmilos changed the title Increase FMA trigonometric test tolerance Increase vectorized Tan test tolerance Jul 10, 2026
@kotlarmilos

Copy link
Copy Markdown
Member

/azp run runtime-extra-platforms

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot's findings

  • Files reviewed: 1/1 changed files
  • Comments generated: 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

[ci-scan] Test failure: TensorPrimitives.SpanDestinationFunctions_ValueRange (Tan) on iossimulator

4 participants