\frac{1 - \cos x}{x \cdot x}\frac{\frac{\tan \left(\frac{x}{2}\right)}{x} \cdot \sin x}{x}double f(double x) {
double r699635 = 1.0;
double r699636 = x;
double r699637 = cos(r699636);
double r699638 = r699635 - r699637;
double r699639 = r699636 * r699636;
double r699640 = r699638 / r699639;
return r699640;
}
double f(double x) {
double r699641 = x;
double r699642 = 2.0;
double r699643 = r699641 / r699642;
double r699644 = tan(r699643);
double r699645 = r699644 / r699641;
double r699646 = sin(r699641);
double r699647 = r699645 * r699646;
double r699648 = r699647 / r699641;
return r699648;
}



Bits error versus x
Results
Initial program 30.9
rmApplied flip--31.0
Simplified15.5
rmApplied *-un-lft-identity15.5
Applied times-frac15.5
Applied times-frac0.3
Simplified0.3
Simplified0.1
rmApplied associate-*l/0.1
Final simplification0.1
herbie shell --seed 2019162 +o rules:numerics
(FPCore (x)
:name "cos2 (problem 3.4.1)"
(/ (- 1 (cos x)) (* x x)))