\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 r710692 = 1.0;
double r710693 = x;
double r710694 = cos(r710693);
double r710695 = r710692 - r710694;
double r710696 = r710693 * r710693;
double r710697 = r710695 / r710696;
return r710697;
}
double f(double x) {
double r710698 = x;
double r710699 = 2.0;
double r710700 = r710698 / r710699;
double r710701 = tan(r710700);
double r710702 = r710701 / r710698;
double r710703 = sin(r710698);
double r710704 = r710703 / r710698;
double r710705 = r710702 * r710704;
return r710705;
}



Bits error versus x
Results
Initial program 31.5
rmApplied flip--31.6
Simplified16.1
rmApplied *-un-lft-identity16.1
Applied times-frac16.1
Applied times-frac0.3
Simplified0.3
Simplified0.1
Final simplification0.1
herbie shell --seed 2019134
(FPCore (x)
:name "cos2 (problem 3.4.1)"
(/ (- 1 (cos x)) (* x x)))