Average Error: 0.1 → 0.2
Time: 12.5s
Precision: 64
\[x \cdot \frac{\sin y}{y}\]
\[\left(\frac{1}{y} \cdot \sin y\right) \cdot x\]
x \cdot \frac{\sin y}{y}
\left(\frac{1}{y} \cdot \sin y\right) \cdot x
double f(double x, double y) {
        double r9255719 = x;
        double r9255720 = y;
        double r9255721 = sin(r9255720);
        double r9255722 = r9255721 / r9255720;
        double r9255723 = r9255719 * r9255722;
        return r9255723;
}

double f(double x, double y) {
        double r9255724 = 1.0;
        double r9255725 = y;
        double r9255726 = r9255724 / r9255725;
        double r9255727 = sin(r9255725);
        double r9255728 = r9255726 * r9255727;
        double r9255729 = x;
        double r9255730 = r9255728 * r9255729;
        return r9255730;
}

Error

Bits error versus x

Bits error versus y

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.1

    \[x \cdot \frac{\sin y}{y}\]
  2. Using strategy rm
  3. Applied div-inv0.2

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

    \[\leadsto \left(\frac{1}{y} \cdot \sin y\right) \cdot x\]

Reproduce

herbie shell --seed 2019174 
(FPCore (x y)
  :name "Linear.Quaternion:$cexp from linear-1.19.1.3"
  (* x (/ (sin y) y)))