\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 r1012223 = 1.0;
double r1012224 = x;
double r1012225 = cos(r1012224);
double r1012226 = r1012223 - r1012225;
double r1012227 = r1012224 * r1012224;
double r1012228 = r1012226 / r1012227;
return r1012228;
}
double f(double x) {
double r1012229 = x;
double r1012230 = 2.0;
double r1012231 = r1012229 / r1012230;
double r1012232 = tan(r1012231);
double r1012233 = r1012232 / r1012229;
double r1012234 = sin(r1012229);
double r1012235 = r1012234 / r1012229;
double r1012236 = r1012233 * r1012235;
return r1012236;
}



Bits error versus x
Results
Initial program 30.2
rmApplied flip--30.3
Simplified14.9
rmApplied *-un-lft-identity14.9
Applied times-frac14.9
Applied times-frac0.3
Simplified0.3
Simplified0.1
Final simplification0.1
herbie shell --seed 2019129 +o rules:numerics
(FPCore (x)
:name "cos2 (problem 3.4.1)"
(/ (- 1 (cos x)) (* x x)))