Average Error: 0.1 → 0.2
Time: 33.0s
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 r4480857 = x;
        double r4480858 = y;
        double r4480859 = sin(r4480858);
        double r4480860 = r4480859 / r4480858;
        double r4480861 = r4480857 * r4480860;
        return r4480861;
}

double f(double x, double y) {
        double r4480862 = 1.0;
        double r4480863 = y;
        double r4480864 = r4480862 / r4480863;
        double r4480865 = sin(r4480863);
        double r4480866 = r4480864 * r4480865;
        double r4480867 = x;
        double r4480868 = r4480866 * r4480867;
        return r4480868;
}

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 2019168 +o rules:numerics
(FPCore (x y)
  :name "Linear.Quaternion:$cexp from linear-1.19.1.3"
  (* x (/ (sin y) y)))