Skip to content

Change f32::midpoint to upcast to f64#121062

Merged
bors merged 1 commit into
rust-lang:masterfrom
RustyYato:f32-midpoint
Jun 3, 2024
Merged

Change f32::midpoint to upcast to f64#121062
bors merged 1 commit into
rust-lang:masterfrom
RustyYato:f32-midpoint

Conversation

@RustyYato

@RustyYato RustyYato commented Feb 14, 2024

Copy link
Copy Markdown
Contributor

This has been verified by kani as a correct optimization

see: #110840 (comment)

The new implementation is branchless and only differs in which NaN values are produced (if any are produced at all), which is fine to change. Aside from NaN handling, this implementation produces bitwise identical results to the original implementation.

Question: do we need a codegen test for this? I didn't add one, since the original PR #92048 didn't have any codegen tests.

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

Labels

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.