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



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)))