Skip to content

Fix decimal modulus for some divisors with more than 64 significant bits - #137736

Open
lilinus wants to merge 4 commits into
dotnet:mainfrom
lilinus:fix-decimal-modulus
Open

lilinus wants to merge 4 commits into
dotnet:mainfrom
lilinus:fix-decimal-modulus

Conversation

@lilinus

@lilinus lilinus commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #137248

Minor test refactor: merge unit tests Remainder and RemainderV2

Figured a goto statement was acceptable since it aligns with current code style; the method already had one.

@dotnet-policy-service dotnet-policy-service Bot added the community-contribution Indicates that the PR has been added by a community member label Nov 17, 2026
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 3 pipeline(s).
12 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

@dotnet-policy-service

Copy link
Copy Markdown
Contributor

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

This branch has not been deployed

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

Labels

area-System.Numerics community-contribution Indicates that the PR has been added by a community member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

decimal % returns a wrong remainder for some divisors with more than 64 significant bits (and throws OverflowException on x64 since .NET 10)

1 participant