Skip to content

float to/from bits and classify: update for float semantics RFC#128598

Merged
bors merged 3 commits into
rust-lang:masterfrom
RalfJung:float-comments
Aug 17, 2024
Merged

float to/from bits and classify: update for float semantics RFC#128598
bors merged 3 commits into
rust-lang:masterfrom
RalfJung:float-comments

Conversation

@RalfJung

@RalfJung RalfJung commented Aug 3, 2024

Copy link
Copy Markdown
Member

With rust-lang/rfcs#3514 having been accepted, it is clear that hardware which e.g. flushes subnormal to zero is just non-conformant from a Rust perspective -- this is a hardware bug, or maybe an LLVM backend bug (where LLVM doesn't lower floating-point ops in a way that they have the standardized behavior). So update the comments here to make it clear that we don't have to do any of this, we're just being nice.

Also remove the subnormal/NaN checks from the (unstable) const-version of to/from-bits; they are not needed since we decided with the aforementioned RFC that it is okay to get a different result at const-time and at run-time.

r? @workingjubilee since I think you wrote many of the comments I am editing here.

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

Labels

A-floating-point Area: Floating point numbers and arithmetic merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-libs Relevant to the library team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants