Average Error: 0.1 → 0.1
Time: 13.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 r6920311 = x;
        double r6920312 = y;
        double r6920313 = sin(r6920312);
        double r6920314 = r6920313 / r6920312;
        double r6920315 = r6920311 * r6920314;
        return r6920315;
}

double f(double x, double y) {
        double r6920316 = y;
        double r6920317 = sin(r6920316);
        double r6920318 = r6920317 / r6920316;
        double r6920319 = x;
        double r6920320 = r6920318 * r6920319;
        return r6920320;
}

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