\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 r807555 = 1.0;
double r807556 = x;
double r807557 = cos(r807556);
double r807558 = r807555 - r807557;
double r807559 = r807556 * r807556;
double r807560 = r807558 / r807559;
return r807560;
}
double f(double x) {
double r807561 = x;
double r807562 = 2.0;
double r807563 = r807561 / r807562;
double r807564 = tan(r807563);
double r807565 = r807564 / r807561;
double r807566 = sin(r807561);
double r807567 = r807566 / r807561;
double r807568 = r807565 * r807567;
return r807568;
}



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