Average Error: 17.5 → 0.1
Time: 7.8s
Precision: binary64
\[\left(J \cdot \left(e^{\ell} - e^{-\ell}\right)\right) \cdot \cos \left(\frac{K}{2}\right) + U \]
\[\frac{\left(4 \cdot \sinh \ell\right) \cdot \left(\cos \left(0.5 \cdot K\right) \cdot J\right)}{2} + U \]
\left(J \cdot \left(e^{\ell} - e^{-\ell}\right)\right) \cdot \cos \left(\frac{K}{2}\right) + U
\frac{\left(4 \cdot \sinh \ell\right) \cdot \left(\cos \left(0.5 \cdot K\right) \cdot J\right)}{2} + 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
 (+ (/ (* (* 4.0 (sinh l)) (* (cos (* 0.5 K)) J)) 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 (((4.0 * sinh(l)) * (cos(0.5 * K) * J)) / 2.0) + U;
}

Error

Bits error versus J

Bits error versus l

Bits error versus K

Bits error versus U

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 17.5

    \[\left(J \cdot \left(e^{\ell} - e^{-\ell}\right)\right) \cdot \cos \left(\frac{K}{2}\right) + U \]
  2. Using strategy rm
  3. Applied sinh-undef_binary640.1

    \[\leadsto \left(J \cdot \color{blue}{\left(2 \cdot \sinh \ell\right)}\right) \cdot \cos \left(\frac{K}{2}\right) + U \]
  4. Applied associate-*r*_binary640.1

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

    \[\leadsto \left(\color{blue}{\left(2 \cdot J\right)} \cdot \sinh \ell\right) \cdot \cos \left(\frac{K}{2}\right) + U \]
  6. Using strategy rm
  7. Applied sinh-def_binary6417.5

    \[\leadsto \left(\left(2 \cdot J\right) \cdot \color{blue}{\frac{e^{\ell} - e^{-\ell}}{2}}\right) \cdot \cos \left(\frac{K}{2}\right) + U \]
  8. Applied associate-*r/_binary6417.5

    \[\leadsto \color{blue}{\frac{\left(2 \cdot J\right) \cdot \left(e^{\ell} - e^{-\ell}\right)}{2}} \cdot \cos \left(\frac{K}{2}\right) + U \]
  9. Applied associate-*l/_binary6417.5

    \[\leadsto \color{blue}{\frac{\left(\left(2 \cdot J\right) \cdot \left(e^{\ell} - e^{-\ell}\right)\right) \cdot \cos \left(\frac{K}{2}\right)}{2}} + U \]
  10. Simplified0.1

    \[\leadsto \frac{\color{blue}{2 \cdot \left(J \cdot \left(2 \cdot \left(\sinh \ell \cdot \cos \left(\frac{K}{2}\right)\right)\right)\right)}}{2} + U \]
  11. Taylor expanded around 0 17.5

    \[\leadsto \frac{2 \cdot \color{blue}{\left(\left(\cos \left(0.5 \cdot K\right) \cdot e^{\ell} - \cos \left(0.5 \cdot K\right) \cdot e^{-\ell}\right) \cdot J\right)}}{2} + U \]
  12. Simplified0.1

    \[\leadsto \frac{2 \cdot \color{blue}{\left(\left(2 \cdot \sinh \ell\right) \cdot \left(\cos \left(0.5 \cdot K\right) \cdot J\right)\right)}}{2} + U \]
  13. Using strategy rm
  14. Applied associate-*r*_binary640.1

    \[\leadsto \frac{\color{blue}{\left(2 \cdot \left(2 \cdot \sinh \ell\right)\right) \cdot \left(\cos \left(0.5 \cdot K\right) \cdot J\right)}}{2} + U \]
  15. Simplified0.1

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

    \[\leadsto \frac{\left(4 \cdot \sinh \ell\right) \cdot \left(\cos \left(0.5 \cdot K\right) \cdot J\right)}{2} + U \]

Reproduce

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