double f(double x) {
double r1996743 = 1.0;
double r1996744 = x;
double r1996745 = cos(r1996744);
double r1996746 = r1996743 - r1996745;
double r1996747 = r1996744 * r1996744;
double r1996748 = r1996746 / r1996747;
return r1996748;
}
double f(double x) {
double r1996749 = x;
double r1996750 = sin(r1996749);
double r1996751 = r1996750 / r1996749;
double r1996752 = r1996751 * r1996751;
double r1996753 = 1.0;
double r1996754 = cos(r1996749);
double r1996755 = r1996753 + r1996754;
double r1996756 = log(r1996755);
double r1996757 = exp(r1996756);
double r1996758 = r1996752 / r1996757;
return r1996758;
}
\frac{1 - \cos x}{x \cdot x}\frac{\frac{\sin x}{x} \cdot \frac{\sin x}{x}}{e^{\log \left(1 + \cos x\right)}}


Bits error versus x
Initial program 30.8
rmApplied flip--30.9
Applied associate-/l/30.9
Simplified15.2
Taylor expanded around -inf 15.2
Simplified0.3
rmApplied add-exp-log0.3
Final simplification0.3
herbie shell --seed 2019102 +o rules:numerics
(FPCore (x)
:name "cos2 (problem 3.4.1)"
(/ (- 1 (cos x)) (* x x)))