Average Error: 0.1 → 0.2
Time: 5.7s
Precision: 64
\[\cosh x \cdot \frac{\sin y}{y}\]
\[\frac{\frac{1}{2}}{\frac{y}{\sin y \cdot \left(e^{-1 \cdot x} + e^{x}\right)}}\]
\cosh x \cdot \frac{\sin y}{y}
\frac{\frac{1}{2}}{\frac{y}{\sin y \cdot \left(e^{-1 \cdot x} + e^{x}\right)}}
double code(double x, double y) {
	return (cosh(x) * (sin(y) / y));
}
double code(double x, double y) {
	return (0.5 / (y / (sin(y) * (exp((-1.0 * x)) + exp(x)))));
}

Error

Bits error versus x

Bits error versus y

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original0.1
Target0.1
Herbie0.2
\[\frac{\cosh x \cdot \sin y}{y}\]

Derivation

  1. Initial program 0.1

    \[\cosh x \cdot \frac{\sin y}{y}\]
  2. Using strategy rm
  3. Applied *-commutative0.1

    \[\leadsto \color{blue}{\frac{\sin y}{y} \cdot \cosh x}\]
  4. Using strategy rm
  5. Applied add-cube-cbrt0.2

    \[\leadsto \frac{\sin y}{y} \cdot \color{blue}{\left(\left(\sqrt[3]{\cosh x} \cdot \sqrt[3]{\cosh x}\right) \cdot \sqrt[3]{\cosh x}\right)}\]
  6. Applied associate-*r*0.2

    \[\leadsto \color{blue}{\left(\frac{\sin y}{y} \cdot \left(\sqrt[3]{\cosh x} \cdot \sqrt[3]{\cosh x}\right)\right) \cdot \sqrt[3]{\cosh x}}\]
  7. Taylor expanded around inf 0.1

    \[\leadsto \color{blue}{\frac{\frac{1}{2} \cdot \left(\sin y \cdot e^{x}\right) + \frac{1}{2} \cdot \left(\sin y \cdot e^{-x}\right)}{y}}\]
  8. Simplified0.2

    \[\leadsto \color{blue}{\frac{\frac{1}{2}}{\frac{y}{\sin y \cdot \left(e^{-1 \cdot x} + e^{x}\right)}}}\]
  9. Final simplification0.2

    \[\leadsto \frac{\frac{1}{2}}{\frac{y}{\sin y \cdot \left(e^{-1 \cdot x} + e^{x}\right)}}\]

Reproduce

herbie shell --seed 2020078 +o rules:numerics
(FPCore (x y)
  :name "Linear.Quaternion:$csinh from linear-1.19.1.3"
  :precision binary64

  :herbie-target
  (/ (* (cosh x) (sin y)) y)

  (* (cosh x) (/ (sin y) y)))