Average Error: 13.8 → 0.2
Time: 4.2s
Precision: 64
\[\frac{\sin x \cdot \sinh y}{x}\]
\[\frac{\left(\sin x \cdot \frac{1}{x}\right) \cdot \left(2 \cdot \sinh y\right)}{2}\]
\frac{\sin x \cdot \sinh y}{x}
\frac{\left(\sin x \cdot \frac{1}{x}\right) \cdot \left(2 \cdot \sinh y\right)}{2}
double code(double x, double y) {
	return ((sin(x) * sinh(y)) / x);
}
double code(double x, double y) {
	return (((sin(x) * (1.0 / x)) * (2.0 * sinh(y))) / 2.0);
}

Error

Bits error versus x

Bits error versus y

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original13.8
Target0.2
Herbie0.2
\[\sin x \cdot \frac{\sinh y}{x}\]

Derivation

  1. Initial program 13.8

    \[\frac{\sin x \cdot \sinh y}{x}\]
  2. Using strategy rm
  3. Applied *-un-lft-identity13.8

    \[\leadsto \frac{\sin x \cdot \sinh y}{\color{blue}{1 \cdot x}}\]
  4. Applied times-frac0.2

    \[\leadsto \color{blue}{\frac{\sin x}{1} \cdot \frac{\sinh y}{x}}\]
  5. Simplified0.2

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

    \[\leadsto \sin x \cdot \color{blue}{\left(\sinh y \cdot \frac{1}{x}\right)}\]
  8. Using strategy rm
  9. Applied sinh-def43.3

    \[\leadsto \sin x \cdot \left(\color{blue}{\frac{e^{y} - e^{-y}}{2}} \cdot \frac{1}{x}\right)\]
  10. Applied associate-*l/43.3

    \[\leadsto \sin x \cdot \color{blue}{\frac{\left(e^{y} - e^{-y}\right) \cdot \frac{1}{x}}{2}}\]
  11. Applied associate-*r/43.3

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

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

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

Reproduce

herbie shell --seed 2020092 +o rules:numerics
(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))