Average Error: 14.9 → 14.9
Time: 18.2s
Precision: 64
$\cos^{-1} \left(\cos x \cdot \cos y\right)$
$e^{\log \left(\log \left(e^{\cos^{-1} \left(\cos x \cdot \cos y\right)}\right)\right)}$
\cos^{-1} \left(\cos x \cdot \cos y\right)
e^{\log \left(\log \left(e^{\cos^{-1} \left(\cos x \cdot \cos y\right)}\right)\right)}
double f(double x, double y) {
double r1409079 = x;
double r1409080 = cos(r1409079);
double r1409081 = y;
double r1409082 = cos(r1409081);
double r1409083 = r1409080 * r1409082;
double r1409084 = acos(r1409083);
return r1409084;
}


double f(double x, double y) {
double r1409085 = x;
double r1409086 = cos(r1409085);
double r1409087 = y;
double r1409088 = cos(r1409087);
double r1409089 = r1409086 * r1409088;
double r1409090 = acos(r1409089);
double r1409091 = exp(r1409090);
double r1409092 = log(r1409091);
double r1409093 = log(r1409092);
double r1409094 = exp(r1409093);
return r1409094;
}



# Try it out

Results

 In Out
Enter valid numbers for all inputs

# Derivation

1. Initial program 14.9

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

$\leadsto \color{blue}{e^{\log \left(\cos^{-1} \left(\cos x \cdot \cos y\right)\right)}}$
4. Using strategy rm

$\leadsto e^{\log \color{blue}{\left(\log \left(e^{\cos^{-1} \left(\cos x \cdot \cos y\right)}\right)\right)}}$
6. Final simplification14.9

$\leadsto e^{\log \left(\log \left(e^{\cos^{-1} \left(\cos x \cdot \cos y\right)}\right)\right)}$

# Reproduce

herbie shell --seed 1
(FPCore (x y)
:name "acos(cos(x)*cos(y))"
:precision binary64
(acos (* (cos x) (cos y))))