\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 r327955 = 1.0;
double r327956 = x;
double r327957 = cos(r327956);
double r327958 = r327955 - r327957;
double r327959 = r327956 * r327956;
double r327960 = r327958 / r327959;
return r327960;
}
double f(double x) {
double r327961 = x;
double r327962 = 2.0;
double r327963 = r327961 / r327962;
double r327964 = tan(r327963);
double r327965 = r327964 / r327961;
double r327966 = sin(r327961);
double r327967 = r327966 / r327961;
double r327968 = r327965 * r327967;
return r327968;
}



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