Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement INumber<T> for System.Numerics.BigInteger and System.Numerics.Complex #70404

Closed
hjrb opened this issue Jun 6, 2022 · 7 comments
Closed

Comments

@hjrb
Copy link

hjrb commented Jun 6, 2022

This would enable generic implementations for Matrix, Vector etc. based on these numeric types.

@dotnet-issue-labeler dotnet-issue-labeler bot added the untriaged New issue has not been triaged by the area owner label Jun 6, 2022
@KalleOlaviNiemitalo
Copy link

BigInteger already implements INumber<BigInteger>, via IBinaryInteger<BigInteger> and IBinaryNumber<BigInteger>. That was implemented in #68964.

How would Complex implement INumber<Complex>.Max(Complex x, Complex y)?

@KalleOlaviNiemitalo
Copy link

Omission of IComparisonOperators for Complex was mentioned in dotnet/designs#257 (comment)

@hjrb
Copy link
Author

hjrb commented Jun 7, 2022 via email

@KalleOlaviNiemitalo
Copy link

I guess not everybody is welcome in this community… not for n00bs – right?

That was not my intention.

@baronfel
Copy link
Member

baronfel commented Jun 7, 2022

Thanks for your interest, @hjrb. This feature is being tracked/worked on in the dotnet/runtime repo, so I'm going to transfer it there for follow-up.

@baronfel baronfel removed the untriaged New issue has not been triaged by the area owner label Jun 7, 2022
@baronfel baronfel transferred this issue from dotnet/sdk Jun 7, 2022
@ghost ghost added the untriaged New issue has not been triaged by the area owner label Jun 7, 2022
@ghost
Copy link

ghost commented Jun 7, 2022

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

Issue Details

This would enable generic implementations for Matrix, Vector etc. based on these numeric types.

Author: hjrb
Assignees: -
Labels:

area-System.Numerics

Milestone: -

@tannergooding
Copy link
Member

As indicated above, BigInteger already implements INumber<BigInteger> in the latest source. Likewise, Complex already implements INumberBase<Complex> and does so because it is not comparable and therefore INumber<Complex> doesn't make sense. INumberBase includes MaxMagnitude and MinMagnitude functions and so those are also available on Complex.

These will be publicly available once .NET 7 Preview 5 is published.

@ghost ghost removed the untriaged New issue has not been triaged by the area owner label Jun 7, 2022
@ghost ghost locked as resolved and limited conversation to collaborators Jul 8, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants