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



Bits error versus x



Bits error versus c



Bits error versus s
Results
Initial program 28.1
rmApplied add-sqr-sqrt_binary6428.2
Simplified28.2
Simplified2.7
rmApplied associate-/r*_binary642.4
Simplified2.4
rmApplied add-sqr-sqrt_binary642.5
Applied associate-/r*_binary642.5
Final simplification2.5
herbie shell --seed 2020224
(FPCore (x c s)
:name "mixedcos"
:precision binary64
(/ (cos (* 2.0 x)) (* (pow c 2.0) (* (* x (pow s 2.0)) x))))