Skip to content

Commit b6d5cd4

Browse files
committed
Update fmae documentation
1 parent b719209 commit b6d5cd4

File tree

1 file changed

+3
-15
lines changed

1 file changed

+3
-15
lines changed

src/api/math/float/fmae.rs

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,9 @@ macro_rules! impl_math_float_fmae {
55
impl $id {
66
/// Fused multiply add estimate: ~= `self * y + z`
77
///
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.
2311
#[inline]
2412
pub fn fmae(self, y: Self, z: Self) -> Self {
2513
use crate::codegen::math::float::fmae::Fmae;

0 commit comments

Comments
 (0)