Average Error: 0.2 → 0.3
Time: 20.8s
Precision: 64
$e^{\cos x + \sin y}$
$e^{\cos x} \cdot {e}^{\left(\sin y\right)}$
e^{\cos x + \sin y}
e^{\cos x} \cdot {e}^{\left(\sin y\right)}
double f(double x, double y) {
double r1235357 = x;
double r1235358 = cos(r1235357);
double r1235359 = y;
double r1235360 = sin(r1235359);
double r1235361 = r1235358 + r1235360;
double r1235362 = exp(r1235361);
return r1235362;
}


double f(double x, double y) {
double r1235363 = x;
double r1235364 = cos(r1235363);
double r1235365 = exp(r1235364);
double r1235366 = exp(1.0);
double r1235367 = y;
double r1235368 = sin(r1235367);
double r1235369 = pow(r1235366, r1235368);
double r1235370 = r1235365 * r1235369;
return r1235370;
}



# Try it out

Results

 In Out
Enter valid numbers for all inputs

# Derivation

1. Initial program 0.2

$e^{\cos x + \sin y}$
2. Using strategy rm
3. Applied exp-sum0.2

$\leadsto \color{blue}{e^{\cos x} \cdot e^{\sin y}}$
4. Using strategy rm
5. Applied *-un-lft-identity0.2

$\leadsto e^{\cos x} \cdot e^{\color{blue}{1 \cdot \sin y}}$
6. Applied exp-prod0.3

$\leadsto e^{\cos x} \cdot \color{blue}{{\left(e^{1}\right)}^{\left(\sin y\right)}}$
7. Simplified0.3

$\leadsto e^{\cos x} \cdot {\color{blue}{e}}^{\left(\sin y\right)}$
8. Final simplification0.3

$\leadsto e^{\cos x} \cdot {e}^{\left(\sin y\right)}$

# Reproduce

herbie shell --seed 1
(FPCore (x y)
:name "exp(cos(x) + sin(y))"
:precision binary64
(exp (+ (cos x) (sin y))))