\frac{\cos \left(2 \cdot x\right)}{{cos}^{2} \cdot \left(\left(x \cdot {sin}^{2}\right) \cdot x\right)}\frac{1}{\frac{\left|{cos}^{\left(\frac{2}{2}\right)} \cdot \left(x \cdot {sin}^{\left(\frac{2}{2}\right)}\right)\right| \cdot \left|{cos}^{\left(\frac{2}{2}\right)} \cdot \left(x \cdot {sin}^{\left(\frac{2}{2}\right)}\right)\right|}{\cos \left(2 \cdot x\right)}}double code(double x, double cos, double sin) {
return (cos((2.0 * x)) / (pow(cos, 2.0) * ((x * pow(sin, 2.0)) * x)));
}
double code(double x, double cos, double sin) {
return (1.0 / ((fabs((pow(cos, (2.0 / 2.0)) * (x * pow(sin, (2.0 / 2.0))))) * fabs((pow(cos, (2.0 / 2.0)) * (x * pow(sin, (2.0 / 2.0)))))) / cos((2.0 * x))));
}



Bits error versus x



Bits error versus cos



Bits error versus sin
Results
Initial program 28.1
rmApplied sqr-pow28.1
Applied associate-*r*21.9
rmApplied add-sqr-sqrt21.9
Simplified21.9
Simplified3.0
rmApplied clear-num3.0
Final simplification3.0
herbie shell --seed 2020103 +o rules:numerics
(FPCore (x cos sin)
:name "cos(2*x)/(cos^2(x)*sin^2(x))"
:precision binary64
(/ (cos (* 2 x)) (* (pow cos 2) (* (* x (pow sin 2)) x))))