Average Error: 14.4 → 0.3
Time: 29.1s
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 r335770 = x;
        double r335771 = sin(r335770);
        double r335772 = y;
        double r335773 = sinh(r335772);
        double r335774 = r335771 * r335773;
        double r335775 = r335774 / r335770;
        return r335775;
}

double f(double x, double y) {
        double r335776 = x;
        double r335777 = sin(r335776);
        double r335778 = r335777 / r335776;
        double r335779 = y;
        double r335780 = sinh(r335779);
        double r335781 = r335778 * r335780;
        double r335782 = log1p(r335781);
        double r335783 = expm1(r335782);
        return r335783;
}

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