\frac{1 - \cos x}{x \cdot x}\frac{\frac{\sin x}{x}}{\frac{x}{\tan \left(\frac{x}{2}\right)}}double f(double x) {
double r602195 = 1.0;
double r602196 = x;
double r602197 = cos(r602196);
double r602198 = r602195 - r602197;
double r602199 = r602196 * r602196;
double r602200 = r602198 / r602199;
return r602200;
}
double f(double x) {
double r602201 = x;
double r602202 = sin(r602201);
double r602203 = r602202 / r602201;
double r602204 = 2.0;
double r602205 = r602201 / r602204;
double r602206 = tan(r602205);
double r602207 = r602201 / r602206;
double r602208 = r602203 / r602207;
return r602208;
}



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