\frac{1 - \cos x}{x \cdot x}\frac{\frac{\sin x}{x} \cdot \tan \left(\frac{x}{2}\right)}{x}double f(double x) {
double r612088 = 1.0;
double r612089 = x;
double r612090 = cos(r612089);
double r612091 = r612088 - r612090;
double r612092 = r612089 * r612089;
double r612093 = r612091 / r612092;
return r612093;
}
double f(double x) {
double r612094 = x;
double r612095 = sin(r612094);
double r612096 = r612095 / r612094;
double r612097 = 2.0;
double r612098 = r612094 / r612097;
double r612099 = tan(r612098);
double r612100 = r612096 * r612099;
double r612101 = r612100 / r612094;
return r612101;
}



Bits error versus x
Results
Initial program 30.6
rmApplied flip--30.7
Simplified15.4
rmApplied associate-/r*15.3
Simplified0.1
Final simplification0.1
herbie shell --seed 2019133 +o rules:numerics
(FPCore (x)
:name "cos2 (problem 3.4.1)"
(/ (- 1 (cos x)) (* x x)))