Average Error: 0.1 → 0.2
Time: 14.7s
Precision: 64
\[x \cdot \frac{\sin y}{y}\]
\[\left(\sin y \cdot \frac{1}{y}\right) \cdot x\]
x \cdot \frac{\sin y}{y}
\left(\sin y \cdot \frac{1}{y}\right) \cdot x
double f(double x, double y) {
        double r8965662 = x;
        double r8965663 = y;
        double r8965664 = sin(r8965663);
        double r8965665 = r8965664 / r8965663;
        double r8965666 = r8965662 * r8965665;
        return r8965666;
}

double f(double x, double y) {
        double r8965667 = y;
        double r8965668 = sin(r8965667);
        double r8965669 = 1.0;
        double r8965670 = r8965669 / r8965667;
        double r8965671 = r8965668 * r8965670;
        double r8965672 = x;
        double r8965673 = r8965671 * r8965672;
        return r8965673;
}

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. Using strategy rm
  5. Applied div-inv0.2

    \[\leadsto \color{blue}{\left(\sin y \cdot \frac{1}{y}\right)} \cdot x\]
  6. Final simplification0.2

    \[\leadsto \left(\sin y \cdot \frac{1}{y}\right) \cdot x\]

Reproduce

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