Average Error: 17.6 → 0.7
Time: 7.2s
Precision: binary64
\[\left(J \cdot \left(e^{\ell} - e^{-\ell}\right)\right) \cdot \cos \left(\frac{K}{2}\right) + U\]
\[2 \cdot \left(J \cdot \left(\cos \left(0.5 \cdot K\right) \cdot \ell\right)\right) + U\]

Error

Bits error versus J

Bits error versus l

Bits error versus K

Bits error versus U

Derivation

  1. Initial program 17.6

    \[\left(J \cdot \left(e^{\ell} - e^{-\ell}\right)\right) \cdot \cos \left(\frac{K}{2}\right) + U\]
  2. Taylor expanded around 0 0.7

    \[\leadsto \color{blue}{\left(2 \cdot \left(J \cdot \ell\right)\right)} \cdot \cos \left(\frac{K}{2}\right) + U\]
  3. Taylor expanded around inf 0.7

    \[\leadsto \color{blue}{2 \cdot \left(J \cdot \left(\cos \left(0.5 \cdot K\right) \cdot \ell\right)\right)} + U\]
  4. Final simplification0.7

    \[\leadsto 2 \cdot \left(J \cdot \left(\cos \left(0.5 \cdot K\right) \cdot \ell\right)\right) + U\]

Reproduce

herbie shell --seed 2020174 
(FPCore (J l K U)
  :name "Maksimov and Kolovsky, Equation (4)"
  :precision binary64
  (+ (* (* J (- (exp l) (exp (neg l)))) (cos (/ K 2.0))) U))