\frac{\cos \left(2 \cdot x\right)}{{c}^{2} \cdot \left(\left(x \cdot {s}^{2}\right) \cdot x\right)}
\begin{array}{l}
t_0 := \left|x \cdot s\right|\\
\frac{\frac{\frac{\cos \left(2 \cdot x\right)}{c}}{t_0}}{c \cdot t_0}
\end{array}
(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 (let* ((t_0 (fabs (* x s)))) (/ (/ (/ (cos (* 2.0 x)) c) t_0) (* c t_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) {
double t_0 = fabs((x * s));
return ((cos((2.0 * x)) / c) / t_0) / (c * t_0);
}



Bits error versus x



Bits error versus c



Bits error versus s
Results
Initial program 28.2
Applied add-sqr-sqrt_binary6428.3
Simplified28.2
Simplified19.9
Applied pow2_binary6419.9
Applied pow-prod-down_binary642.8
Applied unpow2_binary642.8
Applied associate-/r*_binary642.5
Applied associate-/r*_binary642.5
Final simplification2.5
herbie shell --seed 2022125
(FPCore (x c s)
:name "mixedcos"
:precision binary64
(/ (cos (* 2.0 x)) (* (pow c 2.0) (* (* x (pow s 2.0)) x))))