\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.4
Applied add-sqr-sqrt_binary6428.4
Simplified28.4
Simplified20.3
Applied pow2_binary6420.3
Applied pow-prod-down_binary642.9
Applied unpow2_binary642.9
Applied associate-/r*_binary642.7
Applied associate-/r*_binary642.6
Final simplification2.6
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))))