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









Bits error versus J









Bits error versus l









Bits error versus K









Bits error versus U
Results
| Alternative 1 | |
|---|---|
| Error | 0.1 |
| Cost | 13504 |
| Alternative 2 | |
|---|---|
| Error | 0.6 |
| Cost | 7104 |
| Alternative 3 | |
|---|---|
| Error | 0.6 |
| Cost | 7104 |
| Alternative 4 | |
|---|---|
| Error | 8.9 |
| Cost | 6848 |
| Alternative 5 | |
|---|---|
| Error | 9.1 |
| Cost | 448 |
| Alternative 6 | |
|---|---|
| Error | 61.7 |
| Cost | 64 |

Initial program 17.6
rmApplied sinh-undef_binary64_12940.1
Applied associate-*r*_binary64_10410.1
rmApplied pow1_binary64_11620.1
Simplified0.1
Final simplification0.1
herbie shell --seed 2021014
(FPCore (J l K U)
:name "Maksimov and Kolovsky, Equation (4)"
:precision binary64
(+ (* (* J (- (exp l) (exp (- l)))) (cos (/ K 2.0))) U))