Average Error: 30.1 → 30.2
Time: 17.3s
Precision: 64
$\cos \left({x}^{2}\right)$
$\left(\sqrt[3]{\cos \left({x}^{2}\right)} \cdot \sqrt[3]{\cos \left({x}^{2}\right)}\right) \cdot \left(\left(\sqrt[3]{\sqrt[3]{\cos \left({x}^{2}\right)}} \cdot \sqrt[3]{\sqrt[3]{\cos \left({x}^{2}\right)}}\right) \cdot \sqrt[3]{\sqrt[3]{\cos \left({x}^{2}\right)}}\right)$
\cos \left({x}^{2}\right)
\left(\sqrt[3]{\cos \left({x}^{2}\right)} \cdot \sqrt[3]{\cos \left({x}^{2}\right)}\right) \cdot \left(\left(\sqrt[3]{\sqrt[3]{\cos \left({x}^{2}\right)}} \cdot \sqrt[3]{\sqrt[3]{\cos \left({x}^{2}\right)}}\right) \cdot \sqrt[3]{\sqrt[3]{\cos \left({x}^{2}\right)}}\right)
double f(double x) {
double r646778 = x;
double r646779 = 2.0;
double r646780 = pow(r646778, r646779);
double r646781 = cos(r646780);
return r646781;
}


double f(double x) {
double r646782 = x;
double r646783 = 2.0;
double r646784 = pow(r646782, r646783);
double r646785 = cos(r646784);
double r646786 = cbrt(r646785);
double r646787 = r646786 * r646786;
double r646788 = cbrt(r646786);
double r646789 = r646788 * r646788;
double r646790 = r646789 * r646788;
double r646791 = r646787 * r646790;
return r646791;
}



# Try it out

Results

 In Out
Enter valid numbers for all inputs

# Derivation

1. Initial program 30.1

$\cos \left({x}^{2}\right)$
2. Using strategy rm

$\leadsto \color{blue}{\left(\sqrt[3]{\cos \left({x}^{2}\right)} \cdot \sqrt[3]{\cos \left({x}^{2}\right)}\right) \cdot \sqrt[3]{\cos \left({x}^{2}\right)}}$
4. Using strategy rm

$\leadsto \left(\sqrt[3]{\cos \left({x}^{2}\right)} \cdot \sqrt[3]{\cos \left({x}^{2}\right)}\right) \cdot \color{blue}{\left(\left(\sqrt[3]{\sqrt[3]{\cos \left({x}^{2}\right)}} \cdot \sqrt[3]{\sqrt[3]{\cos \left({x}^{2}\right)}}\right) \cdot \sqrt[3]{\sqrt[3]{\cos \left({x}^{2}\right)}}\right)}$
6. Final simplification30.2

$\leadsto \left(\sqrt[3]{\cos \left({x}^{2}\right)} \cdot \sqrt[3]{\cos \left({x}^{2}\right)}\right) \cdot \left(\left(\sqrt[3]{\sqrt[3]{\cos \left({x}^{2}\right)}} \cdot \sqrt[3]{\sqrt[3]{\cos \left({x}^{2}\right)}}\right) \cdot \sqrt[3]{\sqrt[3]{\cos \left({x}^{2}\right)}}\right)$

# Reproduce

herbie shell --seed 1
(FPCore (x)
:name "cos(x^2)"
:precision binary64
(cos (pow x 2)))