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 @@ -1237,8 +1237,10 @@ pub trait Float
1237
1237
fn is_sign_negative ( self ) -> bool ;
1238
1238
1239
1239
/// Fused multiply-add. Computes `(self * a) + b` with only one rounding
1240
- /// error. This produces a more accurate result with better performance than
1241
- /// a separate multiplication operation followed by an add.
1240
+ /// error, yielding a more accurate result than an unfused multiply-add.
1241
+ ///
1242
+ /// Using `mul_add` can be more performant than an unfused multiply-add if
1243
+ /// the target architecture has a dedicated `fma` CPU instruction.
1242
1244
///
1243
1245
/// ```
1244
1246
/// use num_traits::Float;
Original file line number Diff line number Diff line change @@ -215,8 +215,10 @@ pub trait Real
215
215
fn is_sign_negative ( self ) -> bool ;
216
216
217
217
/// Fused multiply-add. Computes `(self * a) + b` with only one rounding
218
- /// error. This produces a more accurate result with better performance than
219
- /// a separate multiplication operation followed by an add.
218
+ /// error, yielding a more accurate result than an unfused multiply-add.
219
+ ///
220
+ /// Using `mul_add` can be more performant than an unfused multiply-add if
221
+ /// the target architecture has a dedicated `fma` CPU instruction.
220
222
///
221
223
/// ```
222
224
/// use num_traits::real::Real;
You can’t perform that action at this time.
0 commit comments