Skip to content

Conversation

@github-actions
Copy link
Contributor

@github-actions github-actions bot commented Sep 8, 2025

Backport of #119438 to release/10.0

/cc @tannergooding @pedrobsaila

Customer Impact

  • Customer reported
  • Found internally

Developers using Vector3.Cross(x, x) (that is the cross-product of parallel vectors) to be zero and would get a non-zero result.

Regression

  • Yes
  • No

This was regressed sometime in .NET 9 and wasn't caught due to it being non-LTS. The fix was introduced as part of an optimization to use MultiplyAddEstimate which allows the use of FusedMultiplyAdd on hardware that supports it, similarly to other vector math libraries (such as DirectX Math). This instruction is more accurate but can also cause a non-zero result in some edge cases due to the additional precision and inherent rounding error.

Testing

An explicit regression test was added.

Risk

Low risk. This simply changes out MultiplyAddEstimate(a, b, c) for an explicit (a * b) + c instead so that fusing can no longer occur.

@tannergooding
Copy link
Member

CC. @jeffhandley for initial bar check

@jeffhandley jeffhandley requested a review from artl93 September 8, 2025 04:20
Copy link
Member

@jeffhandley jeffhandley left a comment

Choose a reason for hiding this comment

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

This has my support for .NET 10 RC2. Functional fix for a regression introduced in .NET 9. If a customer reports being blocked by this in .NET 9 I would also support a reactive backport to .NET 9 servicing.

/cc @artl93

@jeffhandley jeffhandley added the Servicing-consider Issue for next servicing release review label Sep 8, 2025
@jeffhandley jeffhandley added this to the 10.0.0 milestone Sep 8, 2025
@dotnet-policy-service
Copy link
Contributor

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

Copy link
Member

@artl93 artl93 left a comment

Choose a reason for hiding this comment

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

RC2. Regression.

@artl93 artl93 added Servicing-approved Approved for servicing release and removed Servicing-consider Issue for next servicing release review labels Sep 8, 2025
@artl93 artl93 merged commit 9b91562 into release/10.0 Sep 8, 2025
150 of 153 checks passed
@tannergooding tannergooding deleted the backport/pr-119438-to-release/10.0 branch September 8, 2025 20:17
@github-actions github-actions bot locked and limited conversation to collaborators Oct 9, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-System.Numerics Servicing-approved Approved for servicing release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants