\frac{1 - \cos x}{x \cdot x}\frac{\frac{\sin x}{x} \cdot \frac{\sin x}{x}}{\log \left(e^{1 + \cos x}\right)}double f(double x) {
double r1991115 = 1.0;
double r1991116 = x;
double r1991117 = cos(r1991116);
double r1991118 = r1991115 - r1991117;
double r1991119 = r1991116 * r1991116;
double r1991120 = r1991118 / r1991119;
return r1991120;
}
double f(double x) {
double r1991121 = x;
double r1991122 = sin(r1991121);
double r1991123 = r1991122 / r1991121;
double r1991124 = r1991123 * r1991123;
double r1991125 = 1.0;
double r1991126 = cos(r1991121);
double r1991127 = r1991125 + r1991126;
double r1991128 = exp(r1991127);
double r1991129 = log(r1991128);
double r1991130 = r1991124 / r1991129;
return r1991130;
}



Bits error versus x
Results
Initial program 31.2
rmApplied flip--31.3
Applied associate-/l/31.3
Simplified15.5
Taylor expanded around -inf 15.5
Simplified0.3
rmApplied add-log-exp0.4
Final simplification0.4
herbie shell --seed 2019112
(FPCore (x)
:name "cos2 (problem 3.4.1)"
(/ (- 1 (cos x)) (* x x)))