\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 r1084989 = 1.0;
double r1084990 = x;
double r1084991 = cos(r1084990);
double r1084992 = r1084989 - r1084991;
double r1084993 = r1084990 * r1084990;
double r1084994 = r1084992 / r1084993;
return r1084994;
}
double f(double x) {
double r1084995 = x;
double r1084996 = 2.0;
double r1084997 = r1084995 / r1084996;
double r1084998 = tan(r1084997);
double r1084999 = r1084998 / r1084995;
double r1085000 = sin(r1084995);
double r1085001 = r1085000 / r1084995;
double r1085002 = r1084999 * r1085001;
return r1085002;
}



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