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