-
-
Notifications
You must be signed in to change notification settings - Fork 14.1k
Stabilize const_mul_add
#148052
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
Stabilize const_mul_add
#148052
Conversation
Newly stable API:
impl {f32, f64} {
pub const fn mul_add(self, a: Self, b: Self) -> Self;
}
This includes making the intrinsics `fmaf{16,32,64,128}` const stable
for indirect use, matching similar intrinsics.
Closes: rust-lang#146724
|
cc @rust-lang/wg-const-eval Some changes occurred to the intrinsics. Make sure the CTFE / Miri interpreter |
|
rustbot has assigned @Mark-Simulacrum. Use |
|
Over on #146724, @RalfJung said:
@scottmcm noted that there are
@tgross35 noted that:
However, we can probably start the lang-side proposed FCP while this matter is investigated. @rfcbot fcp merge |
|
Team member @traviscross has proposed to merge this. The next step is review by the rest of the tagged team members: Concerns:
Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up! cc @rust-lang/lang-advisors: FCP proposed for lang, please feel free to register concerns. |
|
@rfcbot reviewed |
|
🔔 This is now entering its final comment period, as per the review above. 🔔 |
|
@rfcbot reviewed |
My assumption is that this is not a blocker for merging, because f16 remains unstable. If so, r=me. |
|
As I explained in the tracking issue:
|
|
As a lang team advisor, could I please get this registered as a concern, so we avoid completing FCP until this is figured out? AFAIK the bot still won't let me register concerns myself, but I guess I can try... |
|
Thanks for checking this, I never got the chance to circle back here. If that was an f16-specific problem then, I don't think there is anything to block on: @scottmcm (or somebody else) would you mind resolving the concern? |
|
🔔 This is now entering its final comment period, as per the review above. 🔔 |
How do you conclude it was f16-specific? I don't even know what the bug was, all we have is your vague " OTOH, worst-case we have a const-time mul_add that gives slightly wrong results, and we just fix that. 🤷 |
|
@RalfJung |
I was intentionally vague because this was a test of rustc_apfloat vs.
I'm deferring to @quaternic's analysis here but if (1) the values I mentioned match a known f16-specific bug and (2) apfloat actually has the correct answer, I have no reason to believe there is a bug in rustc_apfloat. |
|
Ah, I didn't properly understand your earlier message before, @quaternic. Now it all makes sense :) |
|
The final comment period, with a disposition to merge, as per the review above, is now complete. As the automated representative of the governance process, I would like to thank the author for their work and everyone else who contributed. |
|
LGTM, thanks! @bors r+ rollup |
Rollup of 7 pull requests Successful merges: - #148052 (Stabilize `const_mul_add`) - #149386 (Display funding link in the github overview) - #149489 (Experimentally add *heterogeneous* `try` blocks) - #149764 (Make `--print=backend-has-zstd` work by default on any backend) - #149838 (Build auxiliary in pretty tests) - #149839 (Use `PointeeSized` bound for `TrivialClone` impls) - #149846 (Statically require links to an issue or the edition guide for all FCWs) r? `@ghost` `@rustbot` modify labels: rollup
Rollup of 7 pull requests Successful merges: - #148052 (Stabilize `const_mul_add`) - #149386 (Display funding link in the github overview) - #149489 (Experimentally add *heterogeneous* `try` blocks) - #149764 (Make `--print=backend-has-zstd` work by default on any backend) - #149838 (Build auxiliary in pretty tests) - #149839 (Use `PointeeSized` bound for `TrivialClone` impls) - #149846 (Statically require links to an issue or the edition guide for all FCWs) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of #148052 - tgross35:stabilize-const_mul_add, r=RalfJung Stabilize `const_mul_add` Newly stable API: ```rust impl {f32, f64} { pub const fn mul_add(self, a: Self, b: Self) -> Self; } ``` This includes making the intrinsics `fmaf{16,32,64,128}` const stable for indirect use, matching similar intrinsics. Closes: #146724
Newly stable API:
This includes making the intrinsics
fmaf{16,32,64,128}const stable for indirect use, matching similar intrinsics.Closes: #146724