\left(J \cdot \left(e^{\ell} - e^{-\ell}\right)\right) \cdot \cos \left(\frac{K}{2}\right) + U\left(2 \cdot J\right) \cdot \left(\cos \left(\frac{1}{2} \cdot K\right) \cdot \ell\right) + Udouble f(double J, double l, double K, double U) {
double r3914803 = J;
double r3914804 = l;
double r3914805 = exp(r3914804);
double r3914806 = -r3914804;
double r3914807 = exp(r3914806);
double r3914808 = r3914805 - r3914807;
double r3914809 = r3914803 * r3914808;
double r3914810 = K;
double r3914811 = 2.0;
double r3914812 = r3914810 / r3914811;
double r3914813 = cos(r3914812);
double r3914814 = r3914809 * r3914813;
double r3914815 = U;
double r3914816 = r3914814 + r3914815;
return r3914816;
}
double f(double J, double l, double K, double U) {
double r3914817 = 2.0;
double r3914818 = J;
double r3914819 = r3914817 * r3914818;
double r3914820 = 0.5;
double r3914821 = K;
double r3914822 = r3914820 * r3914821;
double r3914823 = cos(r3914822);
double r3914824 = l;
double r3914825 = r3914823 * r3914824;
double r3914826 = r3914819 * r3914825;
double r3914827 = U;
double r3914828 = r3914826 + r3914827;
return r3914828;
}



Bits error versus J



Bits error versus l



Bits error versus K



Bits error versus U
Results
Initial program 17.2
Taylor expanded around 0 0.7
rmApplied add-sqr-sqrt1.0
Applied associate-*l*0.9
rmApplied pow10.9
Applied pow10.9
Applied pow10.9
Applied pow-prod-down0.9
Applied pow10.9
Applied pow-prod-down0.9
Applied pow10.9
Applied pow-prod-down0.9
Applied pow-prod-down0.9
Simplified0.7
rmApplied *-un-lft-identity0.7
Applied *-un-lft-identity0.7
Applied distribute-lft-out0.7
Simplified0.7
Final simplification0.7
herbie shell --seed 2019162
(FPCore (J l K U)
:name "Maksimov and Kolovsky, Equation (4)"
(+ (* (* J (- (exp l) (exp (- l)))) (cos (/ K 2))) U))