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

[SR-12078] Improve documentation of SignedNumeric #54514

Open
stephentyrone opened this issue Jan 24, 2020 · 2 comments
Open

[SR-12078] Improve documentation of SignedNumeric #54514

stephentyrone opened this issue Jan 24, 2020 · 2 comments
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. standard library Area: Standard library umbrella

Comments

@stephentyrone
Copy link
Member

Previous ID SR-12078
Radar rdar://problem/58997153
Original Reporter @stephentyrone
Type Bug
Additional Detail from JIRA
Votes 0
Component/s Standard Library
Labels Bug
Assignee None
Priority Medium

md5: 64715bb3ad27e888e320630d3048b105

Issue Description:

The documentation for SignedNumeric says "A type that can represent both positive and negative values."

That's where the protocol started, but that's not actually what it does; a type should conform to SignedNumeric if it is closed under negation (i.e. if additive inverses exist). So, for example, Complex numbers or elements of a finite field don't really have a notion of "positive and negative", but should conform to SignedNumeric. We need to be careful not to get too technical with the documentation of this protocol (more casually "a type should conform if it is Numeric and you can negate things").

@stephentyrone
Copy link
Member Author

CC @natecook1000

@beccadax
Copy link
Contributor

@swift-ci create

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. standard library Area: Standard library umbrella
Projects
None yet
Development

No branches or pull requests

2 participants