\left(\left(-2 \cdot J\right) \cdot \cos \left(\frac{K}{2}\right)\right) \cdot \sqrt{1 + {\left(\frac{U}{\left(2 \cdot J\right) \cdot \cos \left(\frac{K}{2}\right)}\right)}^{2}}\left(\left(-2 \cdot J\right) \cdot \cos \left(\frac{K}{2}\right)\right) \cdot \mathsf{hypot}\left(\sqrt{1}, {\left(\frac{U}{\left(2 \cdot J\right) \cdot \cos \left(\frac{K}{2}\right)}\right)}^{\left(\frac{2}{2}\right)}\right)double code(double J, double K, double U) {
return (((-2.0 * J) * cos((K / 2.0))) * sqrt((1.0 + pow((U / ((2.0 * J) * cos((K / 2.0)))), 2.0))));
}
double code(double J, double K, double U) {
return (((-2.0 * J) * cos((K / 2.0))) * hypot(sqrt(1.0), pow((U / ((2.0 * J) * cos((K / 2.0)))), (2.0 / 2.0))));
}



Bits error versus J



Bits error versus K



Bits error versus U
Results
Initial program 18.4
rmApplied sqr-pow18.4
Applied add-sqr-sqrt18.4
Applied hypot-def8.2
Final simplification8.2
herbie shell --seed 2020057 +o rules:numerics
(FPCore (J K U)
:name "Maksimov and Kolovsky, Equation (3)"
:precision binary64
(* (* (* -2 J) (cos (/ K 2))) (sqrt (+ 1 (pow (/ U (* (* 2 J) (cos (/ K 2)))) 2)))))