Average Error: 13.9 → 0.3
Time: 5.3s
Precision: binary64
\[\frac{\sin x \cdot \sinh y}{x} \]
\[\mathsf{expm1}\left(\mathsf{log1p}\left(\sinh y \cdot \frac{\sin x}{x}\right)\right) \]
\frac{\sin x \cdot \sinh y}{x}
\mathsf{expm1}\left(\mathsf{log1p}\left(\sinh y \cdot \frac{\sin x}{x}\right)\right)
(FPCore (x y) :precision binary64 (/ (* (sin x) (sinh y)) x))
(FPCore (x y) :precision binary64 (expm1 (log1p (* (sinh y) (/ (sin x) x)))))
double code(double x, double y) {
	return (sin(x) * sinh(y)) / x;
}
double code(double x, double y) {
	return expm1(log1p((sinh(y) * (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

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

Derivation

  1. Initial program 13.9

    \[\frac{\sin x \cdot \sinh y}{x} \]
  2. Applied associate-/l*_binary640.8

    \[\leadsto \color{blue}{\frac{\sin x}{\frac{x}{\sinh y}}} \]
  3. Applied expm1-log1p-u_binary640.9

    \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{\sin x}{\frac{x}{\sinh y}}\right)\right)} \]
  4. Simplified0.3

    \[\leadsto \mathsf{expm1}\left(\color{blue}{\mathsf{log1p}\left(\sinh y \cdot \frac{\sin x}{x}\right)}\right) \]
  5. Final simplification0.3

    \[\leadsto \mathsf{expm1}\left(\mathsf{log1p}\left(\sinh y \cdot \frac{\sin x}{x}\right)\right) \]

Reproduce

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