Average Error: 14.7 → 0.1
Time: 4.1s
Precision: binary64
\[\frac{\sin x \cdot \sinh y}{x}\]
\[\sinh y \cdot \frac{\sin x}{x}\]
\frac{\sin x \cdot \sinh y}{x}
\sinh y \cdot \frac{\sin x}{x}
double code(double x, double y) {
	return (((double) (((double) sin(x)) * ((double) sinh(y)))) / x);
}
double code(double x, double y) {
	return ((double) (((double) sinh(y)) * (((double) sin(x)) / 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

Original14.7
Target0.2
Herbie0.1
\[\sin x \cdot \frac{\sinh y}{x}\]

Derivation

  1. Initial program 14.7

    \[\frac{\sin x \cdot \sinh y}{x}\]
  2. Simplified0.2

    \[\leadsto \color{blue}{\sin x \cdot \frac{\sinh y}{x}}\]
  3. Using strategy rm
  4. Applied div-inv0.4

    \[\leadsto \sin x \cdot \color{blue}{\left(\sinh y \cdot \frac{1}{x}\right)}\]
  5. Taylor expanded around inf 43.8

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

    \[\leadsto \color{blue}{\sinh y \cdot \frac{\sin x}{x}}\]
  7. Final simplification0.1

    \[\leadsto \sinh y \cdot \frac{\sin x}{x}\]

Reproduce

herbie shell --seed 2020196 
(FPCore (x y)
  :name "Linear.Quaternion:$ccosh from linear-1.19.1.3"
  :precision binary64

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

  (/ (* (sin x) (sinh y)) x))