Average Error: 0.1 → 0.1
Time: 16.0s
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 r7258268 = x;
        double r7258269 = y;
        double r7258270 = sin(r7258269);
        double r7258271 = r7258270 / r7258269;
        double r7258272 = r7258268 * r7258271;
        return r7258272;
}

double f(double x, double y) {
        double r7258273 = y;
        double r7258274 = sin(r7258273);
        double r7258275 = r7258274 / r7258273;
        double r7258276 = x;
        double r7258277 = r7258275 * r7258276;
        return r7258277;
}

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