Average Error: 24.7 → 2.6
Time: 2.0m
Precision: 64
Internal Precision: 1408
\[\left(J \cdot \left(e^{\ell} - e^{-\ell}\right)\right) \cdot \cos \left(\frac{K}{2}\right) + U\]
\[\left(J \cdot \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\]

Error

Bits error versus J

Bits error versus l

Bits error versus K

Bits error versus U

Derivation

  1. Initial program 24.7

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

    \[\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. Removed slow pow expressions.

Runtime

Time bar (total: 2.0m)Debug log

herbie shell --seed '#(1567391828 2030694642 2833800258 828025724 3004380912 3532991858)' +o setup:early-exit +o reduce:binary-search
(FPCore (J l K U)
  :name "Maksimov and Kolovsky, Equation (4)"
  (+ (* (* J (- (exp l) (exp (- l)))) (cos (/ K 2))) U))