Average Error: 0.1 → 0.2
Time: 5.7s
Precision: 64
\[\cosh x \cdot \frac{\sin y}{y}\]
\[\mathsf{expm1}\left(\mathsf{log1p}\left(\cosh x \cdot \frac{\sin y}{y}\right)\right)\]
\cosh x \cdot \frac{\sin y}{y}
\mathsf{expm1}\left(\mathsf{log1p}\left(\cosh x \cdot \frac{\sin y}{y}\right)\right)
double f(double x, double y) {
        double r496911 = x;
        double r496912 = cosh(r496911);
        double r496913 = y;
        double r496914 = sin(r496913);
        double r496915 = r496914 / r496913;
        double r496916 = r496912 * r496915;
        return r496916;
}

double f(double x, double y) {
        double r496917 = x;
        double r496918 = cosh(r496917);
        double r496919 = y;
        double r496920 = sin(r496919);
        double r496921 = r496920 / r496919;
        double r496922 = r496918 * r496921;
        double r496923 = log1p(r496922);
        double r496924 = expm1(r496923);
        return r496924;
}

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.2
\[\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.2

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

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

Reproduce

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

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

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