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

    \[\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_binary64_9530.1

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

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

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

    \[\leadsto \left(J \cdot \left(\color{blue}{{2}^{1}} \cdot {\sinh \ell}^{1}\right)\right) \cdot {\cos \left(\frac{K}{2}\right)}^{1} + U\]
  8. Applied pow-prod-down_binary64_8310.1

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

    \[\leadsto \left(\color{blue}{{J}^{1}} \cdot {\left(2 \cdot \sinh \ell\right)}^{1}\right) \cdot {\cos \left(\frac{K}{2}\right)}^{1} + U\]
  10. Applied pow-prod-down_binary64_8310.1

    \[\leadsto \color{blue}{{\left(J \cdot \left(2 \cdot \sinh \ell\right)\right)}^{1}} \cdot {\cos \left(\frac{K}{2}\right)}^{1} + U\]
  11. Applied pow-prod-down_binary64_8310.1

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

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

Reproduce

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