Average Error: 17.3 → 0.5
Time: 1.2m
Precision: 64
Internal Precision: 1344
\[\left(J \cdot \left(e^{\ell} - e^{-\ell}\right)\right) \cdot \cos \left(\frac{K}{2}\right) + U\]
\[(\left(\cos \left(K \cdot \frac{1}{2}\right)\right) \cdot \left((\left(\left(\ell \cdot \ell\right) \cdot \frac{1}{3}\right) \cdot \left(J \cdot \ell\right) + \left(\left(2 \cdot J\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.3

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

    \[\leadsto \left(J \cdot \color{blue}{\left(\frac{1}{3} \cdot {\ell}^{3} + \left(2 \cdot \ell + \frac{1}{60} \cdot {\ell}^{5}\right)\right)}\right) \cdot \cos \left(\frac{K}{2}\right) + U\]
  3. Applied simplify0.4

    \[\leadsto \color{blue}{(\left(\cos \left(\frac{K}{2}\right) \cdot J\right) \cdot \left((\ell \cdot \left((\left(\ell \cdot \frac{1}{3}\right) \cdot \ell + 2)_*\right) + \left({\ell}^{5} \cdot \frac{1}{60}\right))_*\right) + U)_*}\]
  4. Taylor expanded around inf 0.4

    \[\leadsto \color{blue}{2 \cdot \left(\cos \left(\frac{1}{2} \cdot K\right) \cdot \left(\ell \cdot J\right)\right) + \left(\frac{1}{3} \cdot \left(\cos \left(\frac{1}{2} \cdot K\right) \cdot \left({\ell}^{3} \cdot J\right)\right) + U\right)}\]
  5. Applied simplify0.5

    \[\leadsto \color{blue}{(\left(\cos \left(K \cdot \frac{1}{2}\right)\right) \cdot \left((\left(\left(\ell \cdot \ell\right) \cdot \frac{1}{3}\right) \cdot \left(J \cdot \ell\right) + \left(\left(2 \cdot J\right) \cdot \ell\right))_*\right) + U)_*}\]

Runtime

Time bar (total: 1.2m)Debug logProfile

herbie shell --seed '#(1072361757 3390613284 2339397988 1175251238 145061547 3101881848)' +o rules:numerics
(FPCore (J l K U)
  :name "Maksimov and Kolovsky, Equation (4)"
  (+ (* (* J (- (exp l) (exp (- l)))) (cos (/ K 2))) U))