\left(J \cdot \left(e^{\ell} - e^{-\ell}\right)\right) \cdot \cos \left(\frac{K}{2}\right) + UJ \cdot \left(2 \cdot \left(\sinh \ell \cdot \cos \left(\frac{K}{2}\right)\right)\right) + Udouble code(double J, double l, double K, double U) {
return ((double) (((double) (((double) (J * ((double) (((double) exp(l)) - ((double) exp(((double) -(l)))))))) * ((double) cos((K / 2.0))))) + U));
}
double code(double J, double l, double K, double U) {
return ((double) (((double) (J * ((double) (2.0 * ((double) (((double) sinh(l)) * ((double) cos((K / 2.0))))))))) + U));
}



Bits error versus J



Bits error versus l



Bits error versus K



Bits error versus U
Results
Initial program 16.8
rmApplied sinh-undef0.1
rmApplied associate-*l*0.1
Simplified0.1
Final simplification0.1
herbie shell --seed 2020196
(FPCore (J l K U)
:name "Maksimov and Kolovsky, Equation (4)"
:precision binary64
(+ (* (* J (- (exp l) (exp (- l)))) (cos (/ K 2.0))) U))