rust-lang / rust-lang/rust

Tracking Issue for `float_mul_add_relaxed`

Open
#151,770 6 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

C-tracking-issue S-tracking-unimplemented T-libs
Dominant language
Rust
Stars
119k
Forks
16.2k
PR merge metrics
PR metrics pending

Description

Feature gate: #![feature(float_mul_add_relaxed)]

This is a tracking issue for the mul_add_relaxed method on floating-point types which is either mul_add (1 rounding) or *+ (2 roundings), nondeterministically.

Public API
// in std
impl f32/f64/... {
    pub fn mul_add_relaxed(self, multiplicand: Self, addend: Self) -> Self;
}
Steps / History

(Remember to update the S-tracking-* label when checking boxes.)

Unresolved Questions
  • We would like to see some documentation added to the effect of "If you want some target-specific performance optimization possibilities but need a guarantee of either the fused or unfused behavior, use this. If you want even more performance and aren't concerned about error bounds, use the algebraic_* functions such as algebraic_mul and algebraic_add.".

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the implementation links in the Steps / History section, especially rust-lang/rust#124874 and issue #151793, then review the public API and unresolved documentation requirement. Done means the implementation, final comment period, stabilization PR, and requested guidance on fused versus unfused behavior are complete.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
compilers
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.