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-12159] Support Float4 #54584

Closed
lattner mannequin opened this issue Feb 8, 2020 · 2 comments
Closed

[SR-12159] Support Float4 #54584

lattner mannequin opened this issue Feb 8, 2020 · 2 comments
Labels
feature A feature request or implementation standard library Area: Standard library umbrella will not do Resolution: Will not be worked on

Comments

@lattner
Copy link
Mannequin

lattner mannequin commented Feb 8, 2020

Previous ID SR-12159
Radar rdar://problem/59302421
Original Reporter @lattner
Type New Feature
Status Resolved
Resolution Invalid
Additional Detail from JIRA
Votes 0
Component/s Standard Library
Labels New Feature
Assignee None
Priority Medium

md5: ed92250ff1b032bf0d0ba52d59bb877f

Issue Description:

The review for Float16 is going well and seems likely to be accepted. Given that, it seems imperative that we add Float4 support as well, enabling the algorithms from this paper to get beautiful Swift implementations:
http://tom7.org/nand/nand.pdf

@beccadax
Copy link
Contributor

@swift-ci create

@stephentyrone
Copy link
Member

No four-bit IEEE 754 format is possible. The following constraints impose a lower-bound on the size of such a format:

  • you must have a sign bit.

  • the exponent must satisfy emin = 1 - emax with emin <= emax. This forces emax >= 1, which means the exponent field must have at least two bits (because you also have the exponent for infinity).

  • the significand field must have at least two explicit bits to differentiate quiet and signaling nan and infinity.

So the smallest possible IEEE 754 format would be Float5.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@AnthonyLatsis AnthonyLatsis added will not do Resolution: Will not be worked on feature A feature request or implementation and removed new feature labels Feb 4, 2023
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature A feature request or implementation standard library Area: Standard library umbrella will not do Resolution: Will not be worked on
Projects
None yet
Development

No branches or pull requests

3 participants