File tree 2 files changed +8
-4
lines changed 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -195,8 +195,10 @@ impl f32 {
195
195
}
196
196
197
197
/// 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.
200
202
///
201
203
/// ```
202
204
/// use std::f32;
Original file line number Diff line number Diff line change @@ -173,8 +173,10 @@ impl f64 {
173
173
}
174
174
175
175
/// 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.
178
180
///
179
181
/// ```
180
182
/// let m = 10.0_f64;
You can’t perform that action at this time.
0 commit comments