\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 r2177612 = 1.0;
double r2177613 = x;
double r2177614 = cos(r2177613);
double r2177615 = r2177612 - r2177614;
double r2177616 = r2177613 * r2177613;
double r2177617 = r2177615 / r2177616;
return r2177617;
}
double f(double x) {
double r2177618 = x;
double r2177619 = 2.0;
double r2177620 = r2177618 / r2177619;
double r2177621 = tan(r2177620);
double r2177622 = r2177621 / r2177618;
double r2177623 = sin(r2177618);
double r2177624 = r2177623 / r2177618;
double r2177625 = r2177622 * r2177624;
return r2177625;
}



Bits error versus x
Results
Initial program 30.9
rmApplied flip--31.0
Applied associate-/l/31.0
Simplified15.3
Taylor expanded around -inf 15.3
Simplified0.3
Taylor expanded around -inf 0.3
Simplified0.1
Final simplification0.1
herbie shell --seed 2019124 +o rules:numerics
(FPCore (x)
:name "cos2 (problem 3.4.1)"
(/ (- 1 (cos x)) (* x x)))