\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 r3913435 = J;
double r3913436 = l;
double r3913437 = exp(r3913436);
double r3913438 = -r3913436;
double r3913439 = exp(r3913438);
double r3913440 = r3913437 - r3913439;
double r3913441 = r3913435 * r3913440;
double r3913442 = K;
double r3913443 = 2.0;
double r3913444 = r3913442 / r3913443;
double r3913445 = cos(r3913444);
double r3913446 = r3913441 * r3913445;
double r3913447 = U;
double r3913448 = r3913446 + r3913447;
return r3913448;
}
double f(double J, double l, double K, double U) {
double r3913449 = 2.0;
double r3913450 = J;
double r3913451 = r3913449 * r3913450;
double r3913452 = 0.5;
double r3913453 = K;
double r3913454 = r3913452 * r3913453;
double r3913455 = cos(r3913454);
double r3913456 = l;
double r3913457 = r3913455 * r3913456;
double r3913458 = r3913451 * r3913457;
double r3913459 = U;
double r3913460 = r3913458 + r3913459;
return r3913460;
}



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))