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(y, y, x \cdot \left(x + 2 \cdot y\right)\right)}
\]
Proof
(fma.f64 y y (*.f64 x (+.f64 x (*.f64 2 y)))): 0 points increase in error, 0 points decrease in error
(fma.f64 y y (Rewrite<= distribute-lft-out_binary64 (+.f64 (*.f64 x x) (*.f64 x (*.f64 2 y))))): 1 points increase in error, 1 points decrease in error
(fma.f64 y y (+.f64 (*.f64 x x) (Rewrite<= associate-*l*_binary64 (*.f64 (*.f64 x 2) y)))): 0 points increase in error, 0 points decrease in error
(Rewrite<= fma-def_binary64 (+.f64 (*.f64 y y) (+.f64 (*.f64 x x) (*.f64 (*.f64 x 2) y)))): 2 points increase in error, 0 points decrease in error
(Rewrite<= +-commutative_binary64 (+.f64 (+.f64 (*.f64 x x) (*.f64 (*.f64 x 2) y)) (*.f64 y y))): 0 points increase in error, 0 points decrease in error
Final simplification0.0
\[\leadsto \mathsf{fma}\left(y, y, x \cdot \left(x + y \cdot 2\right)\right)
\]