Average Error: 0.2 → 0.2
Time: 10.1s
Precision: binary64
\[\cosh x \cdot \frac{\sin y}{y}\]
\[\left(0.5 \cdot \left(e^{x} + e^{-x}\right)\right) \cdot \frac{\sin y}{y}\]
\cosh x \cdot \frac{\sin y}{y}
\left(0.5 \cdot \left(e^{x} + e^{-x}\right)\right) \cdot \frac{\sin y}{y}
(FPCore (x y) :precision binary64 (* (cosh x) (/ (sin y) y)))
(FPCore (x y)
 :precision binary64
 (* (* 0.5 (+ (exp x) (exp (- x)))) (/ (sin y) y)))
double code(double x, double y) {
	return cosh(x) * (sin(y) / y);
}
double code(double x, double y) {
	return (0.5 * (exp(x) + exp(-x))) * (sin(y) / 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.2
Target0.2
Herbie0.2
\[\frac{\cosh x \cdot \sin y}{y}\]

Derivation

  1. Initial program 0.2

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

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

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

Reproduce

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