Average Error: 0.1 → 0.1
Time: 51.9s
Precision: binary64
Cost: 1088
\[\cosh x \cdot \frac{\sin y}{y}\]
\[\frac{\sin y \cdot \left(\left(2 \cdot \frac{e^{x} + e^{-x}}{2}\right) \cdot 0.5\right)}{y}\]
\cosh x \cdot \frac{\sin y}{y}
\frac{\sin y \cdot \left(\left(2 \cdot \frac{e^{x} + e^{-x}}{2}\right) \cdot 0.5\right)}{y}
(FPCore (x y) :precision binary64 (* (cosh x) (/ (sin y) y)))
(FPCore (x y)
 :precision binary64
 (/ (* (sin y) (* (* 2.0 (/ (+ (exp x) (exp (- x))) 2.0)) 0.5)) y))
double code(double x, double y) {
	return cosh(x) * (sin(y) / y);
}
double code(double x, double y) {
	return (sin(y) * ((2.0 * ((exp(x) + exp(-x)) / 2.0)) * 0.5)) / 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.1
\[\frac{\cosh x \cdot \sin y}{y}\]
Alternative 1
Accuracy0.1
Cost832
\[\frac{\sin y \cdot \left(\left(2 \cdot e^{\log \cosh x}\right) \cdot 0.5\right)}{y}\]
Alternative 2
Accuracy0.2
Cost1024
\[\frac{\sin y \cdot \left(\sqrt[3]{\cosh x} \cdot \left(\sqrt[3]{\cosh x} \cdot \sqrt[3]{\cosh x}\right)\right)}{y}\]
Alternative 3
Accuracy0.8
Cost1664
\[\sqrt[3]{\frac{\sin y \cdot \cosh x}{y}} \cdot \left(\sqrt[3]{\frac{\sin y \cdot \cosh x}{y}} \cdot \sqrt[3]{\frac{\sin y \cdot \cosh x}{y}}\right)\]

Derivation

  1. Initial program 0.1

    \[\cosh x \cdot \frac{\sin y}{y}\]
  2. Taylor expanded around -inf 0.1

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

    \[\leadsto \color{blue}{\frac{\sin y \cdot \left(\left(e^{x} + e^{-x}\right) \cdot 0.5\right)}{y}}\]
  4. Using strategy rm
  5. Applied cosh-undef_binary64_122070.1

    \[\leadsto \frac{\sin y \cdot \left(\color{blue}{\left(2 \cdot \cosh x\right)} \cdot 0.5\right)}{y}\]
  6. Using strategy rm
  7. Applied cosh-def_binary64_121990.1

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

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

Reproduce

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