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



Bits error versus x



Bits error versus c



Bits error versus s
Results
Initial program 27.7
Applied unpow2_binary6427.7
Applied associate-*l*_binary6423.0
Applied add-sqr-sqrt_binary6423.1
Simplified29.1
Simplified2.8
Applied *-un-lft-identity_binary642.8
Applied times-frac_binary642.5
Simplified4.6
Simplified2.6
Applied associate-/r*_binary642.6
Final simplification2.6
herbie shell --seed 2022077
(FPCore (x c s)
:name "mixedcos"
:precision binary64
(/ (cos (* 2.0 x)) (* (pow c 2.0) (* (* x (pow s 2.0)) x))))