Average Error: 0.1 → 0.1
Time: 21.1s
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 r18917112 = x;
        double r18917113 = cosh(r18917112);
        double r18917114 = y;
        double r18917115 = sin(r18917114);
        double r18917116 = r18917115 / r18917114;
        double r18917117 = r18917113 * r18917116;
        return r18917117;
}

double f(double x, double y) {
        double r18917118 = y;
        double r18917119 = sin(r18917118);
        double r18917120 = r18917119 / r18917118;
        double r18917121 = log1p(r18917120);
        double r18917122 = expm1(r18917121);
        double r18917123 = x;
        double r18917124 = cosh(r18917123);
        double r18917125 = r18917122 * r18917124;
        return r18917125;
}

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)))