\left(J \cdot \left(e^{\ell} - e^{-\ell}\right)\right) \cdot \cos \left(\frac{K}{2}\right) + U\cos \left(\frac{K}{2}\right) \cdot \left(\left(2 \cdot J\right) \cdot \sinh \ell\right) + U(FPCore (J l K U) :precision binary64 (+ (* (* J (- (exp l) (exp (- l)))) (cos (/ K 2.0))) U))
(FPCore (J l K U) :precision binary64 (+ (* (cos (/ K 2.0)) (* (* 2.0 J) (sinh l))) U))
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 (cos(K / 2.0) * ((2.0 * J) * sinh(l))) + U;
}









Bits error versus J









Bits error versus l









Bits error versus K









Bits error versus U
Results
| Alternative 1 | |
|---|---|
| Error | 0.5 |
| Cost | 7104 |
| Alternative 2 | |
|---|---|
| Error | 8.8 |
| Cost | 7939 |
| Alternative 3 | |
|---|---|
| Error | 8.5 |
| Cost | 6848 |
| Alternative 4 | |
|---|---|
| Error | 8.8 |
| Cost | 448 |
| Alternative 5 | |
|---|---|
| Error | 18.3 |
| Cost | 1101 |
| Alternative 6 | |
|---|---|
| Error | 18.5 |
| Cost | 64 |


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