File tree 1 file changed +3
-15
lines changed
1 file changed +3
-15
lines changed Original file line number Diff line number Diff line change @@ -5,21 +5,9 @@ macro_rules! impl_math_float_fmae {
5
5
impl $id {
6
6
/// Fused multiply add estimate: ~= `self * y + z`
7
7
///
8
- /// On some architectures, it is possible to combine a multiply
9
- /// followed by an addition in a single instruction.
10
- /// Besides performance, this may also offer better precision
11
- /// than performing the operations individually.
12
- ///
13
- /// Note that using this function does **not** guarantee that a FMA
14
- /// instruction will be emitted;
15
- /// the architecture may not support it, or the compiler may decide
16
- /// it's more efficient in a specific case not to use it.
17
- ///
18
- /// Most architectures which have support for FMA
19
- /// also have an equivalent version of this function,
20
- /// fused multiply subtract (`self * y - z`).
21
- /// Simply negating the second parameter of this function
22
- /// will make the compiler generate it.
8
+ /// While fused-multiply add ([fma]) has infinite precision,
9
+ /// [fmae] has at worst the same precision of a multiply followed by an add.
10
+ /// This might be more efficient on architectures that do not have an `fma` instruction.
23
11
#[ inline]
24
12
pub fn fmae( self , y: Self , z: Self ) -> Self {
25
13
use crate :: codegen:: math:: float:: fmae:: Fmae ;
You can’t perform that action at this time.
0 commit comments