Skip to content

Commit a8bf12e

Browse files
calderRalfJung
andauthored
Update library/core/src/primitive_docs.rs
Co-authored-by: Ralf Jung <[email protected]>
1 parent 08fb81b commit a8bf12e

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

library/core/src/primitive_docs.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1320,8 +1320,11 @@ mod prim_f16 {}
13201320
///
13211321
/// # Algebraic operators
13221322
///
1323-
/// Algebraic operators of the form `a.algebraic_*(b)` allow the compiler to reassociate individual
1324-
/// floating point operations for better vectorization. The exact set of optimizations is
1323+
/// Algebraic operators of the form `a.algebraic_*(b)` allow the compiler to optimize
1324+
/// floating point operations using all the usual algebraic properties of real numbers --
1325+
/// despite the fact that those properties do *not* hold on floating point numbers.
1326+
/// This can give a great performance boost since it may unlock vectorization.
1327+
/// The exact set of optimizations is
13251328
/// unspecified but typically allows combining operations, rearranging series of operations based
13261329
/// on mathematical properties, converting between division and reciprocal multiplication, and
13271330
/// disregarding the sign of zero. This means that the results of elementary operations may have

0 commit comments

Comments
 (0)