\cos \left(\frac{K \cdot \left(m + n\right)}{2} - M\right) \cdot e^{\left(-{\left(\frac{m + n}{2} - M\right)}^{2}\right) - \left(\ell - \left|m - n\right|\right)}
\begin{array}{l}
t_0 := \ell + {\left(\frac{m + n}{2} - M\right)}^{2}\\
\cos M \cdot e^{\left|m - n\right| - \left(2 \cdot \left(0.3333333333333333 \cdot t_0\right) + \log \left(\sqrt[3]{e^{t_0}}\right)\right)}
\end{array}
(FPCore (K m n M l) :precision binary64 (* (cos (- (/ (* K (+ m n)) 2.0) M)) (exp (- (- (pow (- (/ (+ m n) 2.0) M) 2.0)) (- l (fabs (- m n)))))))
(FPCore (K m n M l)
:precision binary64
(let* ((t_0 (+ l (pow (- (/ (+ m n) 2.0) M) 2.0))))
(*
(cos M)
(exp
(-
(fabs (- m n))
(+ (* 2.0 (* 0.3333333333333333 t_0)) (log (cbrt (exp t_0)))))))))double code(double K, double m, double n, double M, double l) {
return cos(((K * (m + n)) / 2.0) - M) * exp(-pow((((m + n) / 2.0) - M), 2.0) - (l - fabs(m - n)));
}
double code(double K, double m, double n, double M, double l) {
double t_0 = l + pow((((m + n) / 2.0) - M), 2.0);
return cos(M) * exp(fabs(m - n) - ((2.0 * (0.3333333333333333 * t_0)) + log(cbrt(exp(t_0)))));
}



Bits error versus K



Bits error versus m



Bits error versus n



Bits error versus M



Bits error versus l
Results
Initial program 15.1
Simplified15.1
Taylor expanded in K around 0 1.5
Simplified1.5
Applied add-log-exp_binary641.5
Applied add-cube-cbrt_binary641.5
Applied log-prod_binary641.5
Simplified1.5
Simplified1.5
Applied pow1/3_binary641.5
Applied log-pow_binary641.5
Simplified1.5
Final simplification1.5
herbie shell --seed 2022087
(FPCore (K m n M l)
:name "Maksimov and Kolovsky, Equation (32)"
:precision binary64
(* (cos (- (/ (* K (+ m n)) 2.0) M)) (exp (- (- (pow (- (/ (+ m n) 2.0) M) 2.0)) (- l (fabs (- m n)))))))