Skip to content

Commit

Permalink
Rollup merge of rust-lang#50572 - frewsxcv:frewsxcv-fma, r=sfackler
Browse files Browse the repository at this point in the history
  • Loading branch information
alexcrichton committed May 10, 2018
2 parents dd40277 + 0ba1c10 commit be6fab8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 4 additions & 2 deletions src/libstd/f32.rs
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,10 @@ impl f32 {
}

/// Fused multiply-add. Computes `(self * a) + b` with only one rounding
/// error. This produces a more accurate result with better performance than
/// a separate multiplication operation followed by an add.
/// error, yielding a more accurate result than an unfused multiply-add.
///
/// Using `mul_add` can be more performant than an unfused multiply-add if
/// the target architecture has a dedicated `fma` CPU instruction.
///
/// ```
/// use std::f32;
Expand Down
6 changes: 4 additions & 2 deletions src/libstd/f64.rs
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,10 @@ impl f64 {
}

/// Fused multiply-add. Computes `(self * a) + b` with only one rounding
/// error. This produces a more accurate result with better performance than
/// a separate multiplication operation followed by an add.
/// error, yielding a more accurate result than an unfused multiply-add.
///
/// Using `mul_add` can be more performant than an unfused multiply-add if
/// the target architecture has a dedicated `fma` CPU instruction.
///
/// ```
/// let m = 10.0_f64;
Expand Down

0 comments on commit be6fab8

Please sign in to comment.