\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 r402492 = 1.0;
double r402493 = x;
double r402494 = cos(r402493);
double r402495 = r402492 - r402494;
double r402496 = r402493 * r402493;
double r402497 = r402495 / r402496;
return r402497;
}
double f(double x) {
double r402498 = x;
double r402499 = 2.0;
double r402500 = r402498 / r402499;
double r402501 = tan(r402500);
double r402502 = r402501 / r402498;
double r402503 = sin(r402498);
double r402504 = r402503 / r402498;
double r402505 = r402502 * r402504;
return r402505;
}



Bits error versus x
Results
Initial program 31.4
rmApplied flip--31.5
Simplified15.8
rmApplied *-un-lft-identity15.8
Applied times-frac15.8
Applied times-frac0.3
Simplified0.3
Simplified0.1
Final simplification0.1
herbie shell --seed 2019154
(FPCore (x)
:name "cos2 (problem 3.4.1)"
(/ (- 1 (cos x)) (* x x)))