Average Error: 0.1 → 0.1
Time: 17.4s
Precision: 64
\[x \cdot \frac{\sin y}{y}\]
\[\frac{\sin y}{y} \cdot x\]
x \cdot \frac{\sin y}{y}
\frac{\sin y}{y} \cdot x
double f(double x, double y) {
        double r5999216 = x;
        double r5999217 = y;
        double r5999218 = sin(r5999217);
        double r5999219 = r5999218 / r5999217;
        double r5999220 = r5999216 * r5999219;
        return r5999220;
}

double f(double x, double y) {
        double r5999221 = y;
        double r5999222 = sin(r5999221);
        double r5999223 = r5999222 / r5999221;
        double r5999224 = x;
        double r5999225 = r5999223 * r5999224;
        return r5999225;
}

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 *-commutative0.1

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

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

Reproduce

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