Average Error: 23.1 → 23.2
Time: 21.0s
Precision: 64
$e^{\sin \left({\left(\cos x\right)}^{2}\right)}$
${\left(e^{\sqrt{\sin \left({\left(\cos x\right)}^{2}\right)}}\right)}^{\left(\sqrt{\sin \left(\log \left(e^{{\left(\cos x\right)}^{2}}\right)\right)}\right)}$
e^{\sin \left({\left(\cos x\right)}^{2}\right)}
{\left(e^{\sqrt{\sin \left({\left(\cos x\right)}^{2}\right)}}\right)}^{\left(\sqrt{\sin \left(\log \left(e^{{\left(\cos x\right)}^{2}}\right)\right)}\right)}
double f(double x) {
double r184078 = x;
double r184079 = cos(r184078);
double r184080 = 2.0;
double r184081 = pow(r184079, r184080);
double r184082 = sin(r184081);
double r184083 = exp(r184082);
return r184083;
}


double f(double x) {
double r184084 = x;
double r184085 = cos(r184084);
double r184086 = 2.0;
double r184087 = pow(r184085, r184086);
double r184088 = sin(r184087);
double r184089 = sqrt(r184088);
double r184090 = exp(r184089);
double r184091 = exp(r184087);
double r184092 = log(r184091);
double r184093 = sin(r184092);
double r184094 = sqrt(r184093);
double r184095 = pow(r184090, r184094);
return r184095;
}



# Try it out

Results

 In Out
Enter valid numbers for all inputs

# Derivation

1. Initial program 23.1

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

$\leadsto e^{\sin \color{blue}{\left(\log \left(e^{{\left(\cos x\right)}^{2}}\right)\right)}}$
4. Using strategy rm

$\leadsto e^{\color{blue}{\sqrt{\sin \left(\log \left(e^{{\left(\cos x\right)}^{2}}\right)\right)} \cdot \sqrt{\sin \left(\log \left(e^{{\left(\cos x\right)}^{2}}\right)\right)}}}$
6. Applied exp-prod23.2

$\leadsto \color{blue}{{\left(e^{\sqrt{\sin \left(\log \left(e^{{\left(\cos x\right)}^{2}}\right)\right)}}\right)}^{\left(\sqrt{\sin \left(\log \left(e^{{\left(\cos x\right)}^{2}}\right)\right)}\right)}}$
7. Simplified23.2

$\leadsto {\color{blue}{\left(e^{\sqrt{\sin \left({\left(\cos x\right)}^{2}\right)}}\right)}}^{\left(\sqrt{\sin \left(\log \left(e^{{\left(\cos x\right)}^{2}}\right)\right)}\right)}$
8. Final simplification23.2

$\leadsto {\left(e^{\sqrt{\sin \left({\left(\cos x\right)}^{2}\right)}}\right)}^{\left(\sqrt{\sin \left(\log \left(e^{{\left(\cos x\right)}^{2}}\right)\right)}\right)}$

# Reproduce

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