\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 r759683 = 1.0;
double r759684 = x;
double r759685 = cos(r759684);
double r759686 = r759683 - r759685;
double r759687 = r759684 * r759684;
double r759688 = r759686 / r759687;
return r759688;
}
double f(double x) {
double r759689 = x;
double r759690 = 2.0;
double r759691 = r759689 / r759690;
double r759692 = tan(r759691);
double r759693 = r759692 / r759689;
double r759694 = sin(r759689);
double r759695 = r759694 / r759689;
double r759696 = r759693 * r759695;
return r759696;
}



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