File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed
Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -195,8 +195,10 @@ impl f32 {
195195 }
196196
197197 /// Fused multiply-add. Computes `(self * a) + b` with only one rounding
198- /// error. This produces a more accurate result with better performance than
199- /// a separate multiplication operation followed by an add.
198+ /// error, yielding a more accurate result than an unfused multiply-add.
199+ ///
200+ /// Using `mul_add` can be more performant than an unfused multiply-add if
201+ /// the target architecture has a dedicated `fma` CPU instruction.
200202 ///
201203 /// ```
202204 /// use std::f32;
Original file line number Diff line number Diff line change @@ -173,8 +173,10 @@ impl f64 {
173173 }
174174
175175 /// Fused multiply-add. Computes `(self * a) + b` with only one rounding
176- /// error. This produces a more accurate result with better performance than
177- /// a separate multiplication operation followed by an add.
176+ /// error, yielding a more accurate result than an unfused multiply-add.
177+ ///
178+ /// Using `mul_add` can be more performant than an unfused multiply-add if
179+ /// the target architecture has a dedicated `fma` CPU instruction.
178180 ///
179181 /// ```
180182 /// let m = 10.0_f64;
You can’t perform that action at this time.
0 commit comments