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

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 frac-2neg0.1

    \[\leadsto \cosh x \cdot \color{blue}{\frac{-\sin y}{-y}}\]
  4. Applied cosh-def0.1

    \[\leadsto \color{blue}{\frac{e^{x} + e^{-x}}{2}} \cdot \frac{-\sin y}{-y}\]
  5. Applied frac-times0.2

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

    \[\leadsto \frac{\color{blue}{\frac{-\sin y}{\frac{1}{2}} \cdot \cosh x}}{2 \cdot \left(-y\right)}\]
  7. Final simplification0.2

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

Reproduce

herbie shell --seed 2020113 
(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)))