\frac{\cos \left(2 \cdot x\right)}{{c}^{2} \cdot \left(\left(x \cdot {s}^{2}\right) \cdot x\right)}\frac{1}{\left|s \cdot \left(c \cdot x\right)\right|} \cdot \frac{\cos \left(x \cdot 2\right)}{\left|s \cdot \left(c \cdot x\right)\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 (* (/ 1.0 (fabs (* s (* c x)))) (/ (cos (* x 2.0)) (fabs (* s (* c x))))))
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 (1.0 / fabs(s * (c * x))) * (cos(x * 2.0) / fabs(s * (c * x)));
}



Bits error versus x



Bits error versus c



Bits error versus s
Results
Initial program 28.2
rmApplied add-sqr-sqrt_binary6428.3
Simplified28.2
Simplified3.0
rmApplied *-un-lft-identity_binary643.0
Applied times-frac_binary642.7
Simplified2.7
Final simplification2.7
herbie shell --seed 2020232
(FPCore (x c s)
:name "mixedcos"
:precision binary64
(/ (cos (* 2.0 x)) (* (pow c 2.0) (* (* x (pow s 2.0)) x))))