Average Error: 0.1 → 0.1
Time: 3.8s
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 r127947 = x;
        double r127948 = y;
        double r127949 = sin(r127948);
        double r127950 = r127949 / r127948;
        double r127951 = r127947 * r127950;
        return r127951;
}

double f(double x, double y) {
        double r127952 = y;
        double r127953 = sin(r127952);
        double r127954 = r127953 / r127952;
        double r127955 = x;
        double r127956 = r127954 * r127955;
        return r127956;
}

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