Average Error: 0.6 → 0.3
Time: 21.2s
Precision: 64
Internal Precision: 576
$\left(x \cdot {\left(\cos a\right)}^{2} - \left(\left(\sin a \cdot \cos a\right) \cdot z\right) \cdot 2\right) + {\left(\sin a\right)}^{2} \cdot y$
$\cos a \cdot \left(\left({\left(\cos a \cdot \cos a\right)}^{\frac{1}{3}} \cdot x\right) \cdot \sqrt[3]{\cos a}\right) - \sin a \cdot \left(\left(2 \cdot z\right) \cdot \cos a - \sin a \cdot y\right)$

# Try it out

Results

 In Out
Enter valid numbers for all inputs

# Derivation

1. Initial program 0.6

$\left(x \cdot {\left(\cos a\right)}^{2} - \left(\left(\sin a \cdot \cos a\right) \cdot z\right) \cdot 2\right) + {\left(\sin a\right)}^{2} \cdot y$
2. Initial simplification0.3

$\leadsto \left(x \cdot \cos a\right) \cdot \cos a - \sin a \cdot \left(\left(2 \cdot z\right) \cdot \cos a - \sin a \cdot y\right)$
3. Using strategy rm

$\leadsto \left(x \cdot \color{blue}{\left(\left(\sqrt[3]{\cos a} \cdot \sqrt[3]{\cos a}\right) \cdot \sqrt[3]{\cos a}\right)}\right) \cdot \cos a - \sin a \cdot \left(\left(2 \cdot z\right) \cdot \cos a - \sin a \cdot y\right)$
5. Applied associate-*r*0.4

$\leadsto \color{blue}{\left(\left(x \cdot \left(\sqrt[3]{\cos a} \cdot \sqrt[3]{\cos a}\right)\right) \cdot \sqrt[3]{\cos a}\right)} \cdot \cos a - \sin a \cdot \left(\left(2 \cdot z\right) \cdot \cos a - \sin a \cdot y\right)$
6. Using strategy rm
7. Applied pow1/315.3

$\leadsto \left(\left(x \cdot \left(\sqrt[3]{\cos a} \cdot \color{blue}{{\left(\cos a\right)}^{\frac{1}{3}}}\right)\right) \cdot \sqrt[3]{\cos a}\right) \cdot \cos a - \sin a \cdot \left(\left(2 \cdot z\right) \cdot \cos a - \sin a \cdot y\right)$
8. Applied pow1/315.3

$\leadsto \left(\left(x \cdot \left(\color{blue}{{\left(\cos a\right)}^{\frac{1}{3}}} \cdot {\left(\cos a\right)}^{\frac{1}{3}}\right)\right) \cdot \sqrt[3]{\cos a}\right) \cdot \cos a - \sin a \cdot \left(\left(2 \cdot z\right) \cdot \cos a - \sin a \cdot y\right)$
9. Applied pow-prod-down0.3

$\leadsto \left(\left(x \cdot \color{blue}{{\left(\cos a \cdot \cos a\right)}^{\frac{1}{3}}}\right) \cdot \sqrt[3]{\cos a}\right) \cdot \cos a - \sin a \cdot \left(\left(2 \cdot z\right) \cdot \cos a - \sin a \cdot y\right)$
10. Final simplification0.3

$\leadsto \cos a \cdot \left(\left({\left(\cos a \cdot \cos a\right)}^{\frac{1}{3}} \cdot x\right) \cdot \sqrt[3]{\cos a}\right) - \sin a \cdot \left(\left(2 \cdot z\right) \cdot \cos a - \sin a \cdot y\right)$

# Runtime

Time bar (total: 21.2s)Debug log

herbie shell --seed '#(2775764126 3555076145 3898259844 1891440260 2599947619 1948460636)'
(FPCore (x a z y)
:name "x*pow(cos(a),2) - sin(a)*cos(a)*z*2 + pow(sin(a),2)*y"
(+ (- (* x (pow (cos a) 2)) (* (* (* (sin a) (cos a)) z) 2)) (* (pow (sin a) 2) y)))