double f(double x) {
double r2654105 = 1.0;
double r2654106 = x;
double r2654107 = cos(r2654106);
double r2654108 = r2654105 - r2654107;
double r2654109 = r2654106 * r2654106;
double r2654110 = r2654108 / r2654109;
return r2654110;
}
double f(double x) {
double r2654111 = 1.0;
double r2654112 = x;
double r2654113 = 2.0;
double r2654114 = r2654112 / r2654113;
double r2654115 = tan(r2654114);
double r2654116 = r2654112 / r2654115;
double r2654117 = r2654111 / r2654116;
double r2654118 = sin(r2654112);
double r2654119 = r2654118 / r2654112;
double r2654120 = r2654117 * r2654119;
return r2654120;
}
\frac{1 - \cos x}{x \cdot x}\frac{1}{\frac{x}{\tan \left(\frac{x}{2}\right)}} \cdot \frac{\sin x}{x}


Bits error versus x
Initial program 30.9
rmApplied flip--31.0
Applied associate-/l/31.0
Simplified14.7
Taylor expanded around inf 14.7
Simplified14.9
rmApplied times-frac0.3
Simplified0.1
rmApplied *-un-lft-identity0.1
Applied associate-/l*0.1
Final simplification0.1
herbie shell --seed 2019101
(FPCore (x)
:name "cos2 (problem 3.4.1)"
(/ (- 1 (cos x)) (* x x)))