Average Error: 24.8 → 2.7
Time: 2.8m
Precision: 64
Internal Precision: 1408
\[\left(J \cdot \left(e^{\ell} - e^{-\ell}\right)\right) \cdot \cos \left(\frac{K}{2}\right) + U\]
\[J \cdot \left(\left(\frac{1}{3} \cdot {\ell}^{3} + \left(2 \cdot \ell + \frac{1}{60} \cdot {\ell}^{5}\right)\right) \cdot \cos \left(\frac{K}{2}\right)\right) + U\]

Error

Bits error versus J

Bits error versus l

Bits error versus K

Bits error versus U

Derivation

  1. Initial program 24.8

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

    \[\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. Using strategy rm
  4. Applied associate-*l*2.7

    \[\leadsto \color{blue}{J \cdot \left(\left(\frac{1}{3} \cdot {\ell}^{3} + \left(2 \cdot \ell + \frac{1}{60} \cdot {\ell}^{5}\right)\right) \cdot \cos \left(\frac{K}{2}\right)\right)} + U\]
  5. Removed slow pow expressions.

Runtime

Time bar (total: 2.8m)Debug logProfile

herbie shell --seed '#(1063027428 1192549564 1443466578 604016274 3637110559 1698629644)' 
(FPCore (J l K U)
  :name "Maksimov and Kolovsky, Equation (4)"
  (+ (* (* J (- (exp l) (exp (- l)))) (cos (/ K 2))) U))