\frac{\cos \left(2 \cdot x\right)}{{c}^{2} \cdot \left(\left(x \cdot {s}^{2}\right) \cdot x\right)}
{\left(c \cdot \left|s \cdot x\right|\right)}^{-2} \cdot \cos \left(x \cdot 2\right)
(FPCore (x c s) :precision binary64 (/ (cos (* 2.0 x)) (* (pow c 2.0) (* (* x (pow s 2.0)) x))))
(FPCore (x c s) :precision binary64 (* (pow (* c (fabs (* s x))) -2.0) (cos (* x 2.0))))
double code(double x, double c, double s) {
return cos(2.0 * x) / (pow(c, 2.0) * ((x * pow(s, 2.0)) * x));
}
double code(double x, double c, double s) {
return pow((c * fabs(s * x)), -2.0) * cos(x * 2.0);
}



Bits error versus x



Bits error versus c



Bits error versus s
Results
Initial program 28.4
Applied add-sqr-sqrt_binary6428.4
Applied unpow2_binary6428.4
Applied unswap-sqr_binary6423.6
Simplified23.6
Simplified2.9
Taylor expanded in x around inf 20.3
Simplified2.7
Final simplification2.7
herbie shell --seed 2021215
(FPCore (x c s)
:name "mixedcos"
:precision binary64
(/ (cos (* 2.0 x)) (* (pow c 2.0) (* (* x (pow s 2.0)) x))))