Average Error: 14.4 → 0.3
Time: 30.2s
Precision: 64
\[\frac{\sin x \cdot \sinh y}{x}\]
\[\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{\sin x}{x} \cdot \sinh y\right)\right)\]
\frac{\sin x \cdot \sinh y}{x}
\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{\sin x}{x} \cdot \sinh y\right)\right)
double f(double x, double y) {
        double r384899 = x;
        double r384900 = sin(r384899);
        double r384901 = y;
        double r384902 = sinh(r384901);
        double r384903 = r384900 * r384902;
        double r384904 = r384903 / r384899;
        return r384904;
}

double f(double x, double y) {
        double r384905 = x;
        double r384906 = sin(r384905);
        double r384907 = r384906 / r384905;
        double r384908 = y;
        double r384909 = sinh(r384908);
        double r384910 = r384907 * r384909;
        double r384911 = log1p(r384910);
        double r384912 = expm1(r384911);
        return r384912;
}

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.4
Target0.2
Herbie0.3
\[\sin x \cdot \frac{\sinh y}{x}\]

Derivation

  1. Initial program 14.4

    \[\frac{\sin x \cdot \sinh y}{x}\]
  2. Using strategy rm
  3. Applied associate-/l*0.8

    \[\leadsto \color{blue}{\frac{\sin x}{\frac{x}{\sinh y}}}\]
  4. Using strategy rm
  5. Applied clear-num0.9

    \[\leadsto \color{blue}{\frac{1}{\frac{\frac{x}{\sinh y}}{\sin x}}}\]
  6. Using strategy rm
  7. Applied expm1-log1p-u1.1

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

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

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

Reproduce

herbie shell --seed 2019303 +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))