Average Error: 14.2 → 0.1
Time: 22.1s
Precision: 64
\[\frac{\sin x \cdot \sinh y}{x}\]
\[\frac{\sinh y}{\frac{1}{\frac{\sin x}{x}}}\]
\frac{\sin x \cdot \sinh y}{x}
\frac{\sinh y}{\frac{1}{\frac{\sin x}{x}}}
double f(double x, double y) {
        double r102656618 = x;
        double r102656619 = sin(r102656618);
        double r102656620 = y;
        double r102656621 = sinh(r102656620);
        double r102656622 = r102656619 * r102656621;
        double r102656623 = r102656622 / r102656618;
        return r102656623;
}

double f(double x, double y) {
        double r102656624 = y;
        double r102656625 = sinh(r102656624);
        double r102656626 = 1.0;
        double r102656627 = x;
        double r102656628 = sin(r102656627);
        double r102656629 = r102656628 / r102656627;
        double r102656630 = r102656626 / r102656629;
        double r102656631 = r102656625 / r102656630;
        return r102656631;
}

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

Derivation

  1. Initial program 14.2

    \[\frac{\sin x \cdot \sinh y}{x}\]
  2. Taylor expanded around inf 43.2

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

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

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

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

Reproduce

herbie shell --seed 2019173 +o rules:numerics
(FPCore (x y)
  :name "Linear.Quaternion:$ccosh from linear-1.19.1.3"

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

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