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



Bits error versus x



Bits error versus c



Bits error versus s
Results
Initial program 21.8
Applied unpow2_binary6421.8
Applied associate-*l*_binary6417.1
Applied add-sqr-sqrt_binary6417.1
Simplified31.1
Simplified2.1
Applied associate-/r*_binary641.9
Final simplification1.9
herbie shell --seed 2022088
(FPCore (x c s)
:name "mixedcos"
:precision binary64
(/ (cos (* 2.0 x)) (* (pow c 2.0) (* (* x (pow s 2.0)) x))))