\frac{1 - \cos x}{x \cdot x}\frac{\tan \left(\frac{x}{2}\right)}{x} \cdot \frac{\sin x}{x}double f(double x) {
double r452926 = 1.0;
double r452927 = x;
double r452928 = cos(r452927);
double r452929 = r452926 - r452928;
double r452930 = r452927 * r452927;
double r452931 = r452929 / r452930;
return r452931;
}
double f(double x) {
double r452932 = x;
double r452933 = 2.0;
double r452934 = r452932 / r452933;
double r452935 = tan(r452934);
double r452936 = r452935 / r452932;
double r452937 = sin(r452932);
double r452938 = r452937 / r452932;
double r452939 = r452936 * r452938;
return r452939;
}



Bits error versus x
Results
Initial program 30.7
rmApplied flip--30.8
Simplified15.9
rmApplied *-un-lft-identity15.9
Applied times-frac15.9
Applied times-frac0.3
Simplified0.3
Simplified0.1
Final simplification0.1
herbie shell --seed 2019135 +o rules:numerics
(FPCore (x)
:name "cos2 (problem 3.4.1)"
(/ (- 1 (cos x)) (* x x)))