Average Error: 0.1 → 0.2
Time: 11.7s
Precision: 64
\[x \cdot \frac{\sin y}{y}\]
\[\frac{x}{\frac{y}{\sin y}}\]
x \cdot \frac{\sin y}{y}
\frac{x}{\frac{y}{\sin y}}
double f(double x, double y) {
        double r7480721 = x;
        double r7480722 = y;
        double r7480723 = sin(r7480722);
        double r7480724 = r7480723 / r7480722;
        double r7480725 = r7480721 * r7480724;
        return r7480725;
}

double f(double x, double y) {
        double r7480726 = x;
        double r7480727 = y;
        double r7480728 = sin(r7480727);
        double r7480729 = r7480727 / r7480728;
        double r7480730 = r7480726 / r7480729;
        return r7480730;
}

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 clear-num0.2

    \[\leadsto \color{blue}{\frac{1}{\frac{y}{\sin y}}} \cdot x\]
  6. Using strategy rm
  7. Applied associate-*l/0.2

    \[\leadsto \color{blue}{\frac{1 \cdot x}{\frac{y}{\sin y}}}\]
  8. Simplified0.2

    \[\leadsto \frac{\color{blue}{x}}{\frac{y}{\sin y}}\]
  9. Final simplification0.2

    \[\leadsto \frac{x}{\frac{y}{\sin y}}\]

Reproduce

herbie shell --seed 2019164 
(FPCore (x y)
  :name "Linear.Quaternion:$cexp from linear-1.19.1.3"
  (* x (/ (sin y) y)))