File tree Expand file tree Collapse file tree 1 file changed +12
-8
lines changed
Expand file tree Collapse file tree 1 file changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -1335,16 +1335,20 @@ mod prim_f16 {}
13351335/// For example:
13361336///
13371337/// ```
1338- /// let x = 12.0;
1339- /// let a = 34.0;
1340- /// let b = 56.0;
1338+ /// # let mut x: f32 = 12.0;
1339+ /// # let a: f32 = 34.0;
1340+ /// # let b: f32 = 56.0;
1341+ /// x = x.algebraic_add(x, a.algebraic_mul(b));
1342+ /// ```
13411343///
1342- /// // This:
1343- /// let x = x.algebraic_add(x, a.algebraic_mul(b));
1344+ /// May be rewritten as either:
13441345///
1345- /// // May be rewritten as either:
1346- /// let x = x + (a * b); // As written
1347- /// let x = (a * b) + x; // Reordered to allow using a single `fma`
1346+ /// ```
1347+ /// # let mut x: f32 = 12.0;
1348+ /// # let a: f32 = 34.0;
1349+ /// # let b: f32 = 56.0;
1350+ /// x = x + (a * b); // As written
1351+ /// x = (a * b) + x; // Reordered to allow using a single `fma`
13481352/// ```
13491353
13501354#[ stable( feature = "rust1" , since = "1.0.0" ) ]
You can’t perform that action at this time.
0 commit comments