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




Bits error versus J




Bits error versus l




Bits error versus K




Bits error versus U
Results
| Alternative 1 | |
|---|---|
| Accuracy | 17.6 |
| Cost | 960 |
Initial program 17.6
rmApplied sinh-undef_binary64_9530.1
Taylor expanded around inf 17.6
Simplified0.1
Final simplification0.1
herbie shell --seed 2020322
(FPCore (J l K U)
:name "Maksimov and Kolovsky, Equation (4)"
:precision binary64
(+ (* (* J (- (exp l) (exp (- l)))) (cos (/ K 2.0))) U))