Average Error: 0.1 → 0.1
Time: 3.3s
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 r147411 = x;
        double r147412 = y;
        double r147413 = sin(r147412);
        double r147414 = r147413 / r147412;
        double r147415 = r147411 * r147414;
        return r147415;
}

double f(double x, double y) {
        double r147416 = y;
        double r147417 = sin(r147416);
        double r147418 = r147417 / r147416;
        double r147419 = x;
        double r147420 = r147418 * r147419;
        return r147420;
}

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