\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 r775906 = 1.0;
double r775907 = x;
double r775908 = cos(r775907);
double r775909 = r775906 - r775908;
double r775910 = r775907 * r775907;
double r775911 = r775909 / r775910;
return r775911;
}
double f(double x) {
double r775912 = x;
double r775913 = 2.0;
double r775914 = r775912 / r775913;
double r775915 = tan(r775914);
double r775916 = r775915 / r775912;
double r775917 = sin(r775912);
double r775918 = r775917 / r775912;
double r775919 = r775916 * r775918;
return r775919;
}



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