Initial program 0.0
\[\left(x \cdot x + \left(x \cdot 2\right) \cdot y\right) + y \cdot y
\]
Simplified0.0
\[\leadsto \color{blue}{\mathsf{fma}\left(x, x, y \cdot \mathsf{fma}\left(x, 2, y\right)\right)}
\]
Proof
(fma.f64 x x (*.f64 y (fma.f64 x 2 y))): 0 points increase in error, 0 points decrease in error
(fma.f64 x x (*.f64 y (Rewrite<= fma-def_binary64 (+.f64 (*.f64 x 2) y)))): 0 points increase in error, 0 points decrease in error
(fma.f64 x x (Rewrite<= distribute-rgt-out_binary64 (+.f64 (*.f64 (*.f64 x 2) y) (*.f64 y y)))): 2 points increase in error, 0 points decrease in error
(Rewrite<= fma-def_binary64 (+.f64 (*.f64 x x) (+.f64 (*.f64 (*.f64 x 2) y) (*.f64 y y)))): 6 points increase in error, 0 points decrease in error
(Rewrite<= associate-+l+_binary64 (+.f64 (+.f64 (*.f64 x x) (*.f64 (*.f64 x 2) y)) (*.f64 y y))): 1 points increase in error, 0 points decrease in error
Final simplification0.0
\[\leadsto \mathsf{fma}\left(x, x, y \cdot \mathsf{fma}\left(x, 2, y\right)\right)
\]