Initial program 100.0%
\[2 \cdot \left(x \cdot x - x \cdot y\right)
\]
Applied egg-rr100.0%
\[\leadsto 2 \cdot \color{blue}{\left(x \cdot \left(-y\right) + \left(x \cdot x + \mathsf{fma}\left(-x, y, x \cdot y\right)\right)\right)}
\]
Proof
[Start]100.0 | \[ 2 \cdot \left(x \cdot x - x \cdot y\right)
\] |
|---|
*-commutative [=>]100.0 | \[ 2 \cdot \left(x \cdot x - \color{blue}{y \cdot x}\right)
\] |
|---|
prod-diff [=>]100.0 | \[ 2 \cdot \color{blue}{\left(\mathsf{fma}\left(x, x, -x \cdot y\right) + \mathsf{fma}\left(-x, y, x \cdot y\right)\right)}
\] |
|---|
fma-def [<=]100.0 | \[ 2 \cdot \left(\color{blue}{\left(x \cdot x + \left(-x \cdot y\right)\right)} + \mathsf{fma}\left(-x, y, x \cdot y\right)\right)
\] |
|---|
+-commutative [=>]100.0 | \[ 2 \cdot \left(\color{blue}{\left(\left(-x \cdot y\right) + x \cdot x\right)} + \mathsf{fma}\left(-x, y, x \cdot y\right)\right)
\] |
|---|
associate-+l+ [=>]100.0 | \[ 2 \cdot \color{blue}{\left(\left(-x \cdot y\right) + \left(x \cdot x + \mathsf{fma}\left(-x, y, x \cdot y\right)\right)\right)}
\] |
|---|
distribute-rgt-neg-in [=>]100.0 | \[ 2 \cdot \left(\color{blue}{x \cdot \left(-y\right)} + \left(x \cdot x + \mathsf{fma}\left(-x, y, x \cdot y\right)\right)\right)
\] |
|---|
Taylor expanded in x around 0 99.9%
\[\leadsto 2 \cdot \color{blue}{\left(\left(-2 \cdot y + y\right) \cdot x + {x}^{2}\right)}
\]
Simplified100.0%
\[\leadsto 2 \cdot \color{blue}{\mathsf{fma}\left(-y, x, x \cdot x\right)}
\]
Proof
[Start]99.9 | \[ 2 \cdot \left(\left(-2 \cdot y + y\right) \cdot x + {x}^{2}\right)
\] |
|---|
distribute-lft1-in [=>]100.0 | \[ 2 \cdot \left(\color{blue}{\left(\left(-2 + 1\right) \cdot y\right)} \cdot x + {x}^{2}\right)
\] |
|---|
metadata-eval [=>]100.0 | \[ 2 \cdot \left(\left(\color{blue}{-1} \cdot y\right) \cdot x + {x}^{2}\right)
\] |
|---|
fma-def [=>]100.0 | \[ 2 \cdot \color{blue}{\mathsf{fma}\left(-1 \cdot y, x, {x}^{2}\right)}
\] |
|---|
mul-1-neg [=>]100.0 | \[ 2 \cdot \mathsf{fma}\left(\color{blue}{-y}, x, {x}^{2}\right)
\] |
|---|
unpow2 [=>]100.0 | \[ 2 \cdot \mathsf{fma}\left(-y, x, \color{blue}{x \cdot x}\right)
\] |
|---|
Final simplification100.0%
\[\leadsto 2 \cdot \mathsf{fma}\left(-y, x, x \cdot x\right)
\]