Average Error: 0.1 → 0.1
Time: 21.6s
Precision: 64
\[\cosh x \cdot \frac{\sin y}{y}\]
\[\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{\sin y}{y}\right)\right) \cdot \cosh x\]
\cosh x \cdot \frac{\sin y}{y}
\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{\sin y}{y}\right)\right) \cdot \cosh x
double f(double x, double y) {
        double r19131477 = x;
        double r19131478 = cosh(r19131477);
        double r19131479 = y;
        double r19131480 = sin(r19131479);
        double r19131481 = r19131480 / r19131479;
        double r19131482 = r19131478 * r19131481;
        return r19131482;
}

double f(double x, double y) {
        double r19131483 = y;
        double r19131484 = sin(r19131483);
        double r19131485 = r19131484 / r19131483;
        double r19131486 = log1p(r19131485);
        double r19131487 = expm1(r19131486);
        double r19131488 = x;
        double r19131489 = cosh(r19131488);
        double r19131490 = r19131487 * r19131489;
        return r19131490;
}

Error

Bits error versus x

Bits error versus y

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original0.1
Target0.1
Herbie0.1
\[\frac{\cosh x \cdot \sin y}{y}\]

Derivation

  1. Initial program 0.1

    \[\cosh x \cdot \frac{\sin y}{y}\]
  2. Using strategy rm
  3. Applied expm1-log1p-u0.1

    \[\leadsto \cosh x \cdot \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{\sin y}{y}\right)\right)}\]
  4. Final simplification0.1

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

Reproduce

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

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

  (* (cosh x) (/ (sin y) y)))