Average Error: 0.1 → 0.2
Time: 11.4s
Precision: 64
\[x \cdot \frac{\sin y}{y}\]
\[\frac{1}{\frac{y}{\sin y}} \cdot x\]
x \cdot \frac{\sin y}{y}
\frac{1}{\frac{y}{\sin y}} \cdot x
double f(double x, double y) {
        double r152549 = x;
        double r152550 = y;
        double r152551 = sin(r152550);
        double r152552 = r152551 / r152550;
        double r152553 = r152549 * r152552;
        return r152553;
}

double f(double x, double y) {
        double r152554 = 1.0;
        double r152555 = y;
        double r152556 = sin(r152555);
        double r152557 = r152555 / r152556;
        double r152558 = r152554 / r152557;
        double r152559 = x;
        double r152560 = r152558 * r152559;
        return r152560;
}

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. Simplified0.1

    \[\leadsto \color{blue}{\frac{\sin y}{y} \cdot x}\]
  3. Using strategy rm
  4. Applied clear-num0.2

    \[\leadsto \color{blue}{\frac{1}{\frac{y}{\sin y}}} \cdot x\]
  5. Final simplification0.2

    \[\leadsto \frac{1}{\frac{y}{\sin y}} \cdot x\]

Reproduce

herbie shell --seed 2019194 +o rules:numerics
(FPCore (x y)
  :name "Linear.Quaternion:$cexp from linear-1.19.1.3"
  (* x (/ (sin y) y)))