Initial program 0.0
\[\left(x + y\right) \cdot \left(x + y\right)
\]
Taylor expanded in x around 0 0.0
\[\leadsto \color{blue}{2 \cdot \left(y \cdot x\right) + \left({y}^{2} + {x}^{2}\right)}
\]
Simplified0.0
\[\leadsto \color{blue}{\mathsf{fma}\left(y, y, x \cdot \mathsf{fma}\left(y, 2, x\right)\right)}
\]
Proof
(fma.f64 y y (*.f64 x (fma.f64 y 2 x))): 0 points increase in error, 0 points decrease in error
(fma.f64 y y (*.f64 x (Rewrite<= fma-def_binary64 (+.f64 (*.f64 y 2) x)))): 0 points increase in error, 0 points decrease in error
(fma.f64 y y (*.f64 x (+.f64 (Rewrite<= *-commutative_binary64 (*.f64 2 y)) x))): 0 points increase in error, 0 points decrease in error
(fma.f64 y y (Rewrite<= distribute-rgt-out_binary64 (+.f64 (*.f64 (*.f64 2 y) x) (*.f64 x x)))): 0 points increase in error, 1 points decrease in error
(fma.f64 y y (+.f64 (Rewrite<= associate-*r*_binary64 (*.f64 2 (*.f64 y x))) (*.f64 x x))): 0 points increase in error, 0 points decrease in error
(fma.f64 y y (+.f64 (*.f64 2 (*.f64 y x)) (Rewrite<= unpow2_binary64 (pow.f64 x 2)))): 0 points increase in error, 0 points decrease in error
(Rewrite<= fma-def_binary64 (+.f64 (*.f64 y y) (+.f64 (*.f64 2 (*.f64 y x)) (pow.f64 x 2)))): 2 points increase in error, 0 points decrease in error
(+.f64 (Rewrite<= unpow2_binary64 (pow.f64 y 2)) (+.f64 (*.f64 2 (*.f64 y x)) (pow.f64 x 2))): 0 points increase in error, 0 points decrease in error
(Rewrite=> +-commutative_binary64 (+.f64 (+.f64 (*.f64 2 (*.f64 y x)) (pow.f64 x 2)) (pow.f64 y 2))): 0 points increase in error, 0 points decrease in error
(Rewrite<= associate-+r+_binary64 (+.f64 (*.f64 2 (*.f64 y x)) (+.f64 (pow.f64 x 2) (pow.f64 y 2)))): 0 points increase in error, 1 points decrease in error
(+.f64 (*.f64 2 (*.f64 y x)) (Rewrite<= +-commutative_binary64 (+.f64 (pow.f64 y 2) (pow.f64 x 2)))): 0 points increase in error, 0 points decrease in error
Applied egg-rr0.0
\[\leadsto \mathsf{fma}\left(y, y, \color{blue}{\left(y \cdot 2\right) \cdot x + x \cdot x}\right)
\]
Final simplification0.0
\[\leadsto \mathsf{fma}\left(y, y, \left(y \cdot 2\right) \cdot x + x \cdot x\right)
\]