Average Error: 0.3 → 0.2
Time: 1.6s
Precision: 64
\[\frac{x \cdot 100}{x + y}\]
\[\frac{x}{x + y} \cdot 100\]
\frac{x \cdot 100}{x + y}
\frac{x}{x + y} \cdot 100
double f(double x, double y) {
        double r721756 = x;
        double r721757 = 100.0;
        double r721758 = r721756 * r721757;
        double r721759 = y;
        double r721760 = r721756 + r721759;
        double r721761 = r721758 / r721760;
        return r721761;
}

double f(double x, double y) {
        double r721762 = x;
        double r721763 = y;
        double r721764 = r721762 + r721763;
        double r721765 = r721762 / r721764;
        double r721766 = 100.0;
        double r721767 = r721765 * r721766;
        return r721767;
}

Error

Bits error versus x

Bits error versus y

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original0.3
Target0.2
Herbie0.2
\[\frac{x}{1} \cdot \frac{100}{x + y}\]

Derivation

  1. Initial program 0.3

    \[\frac{x \cdot 100}{x + y}\]
  2. Using strategy rm
  3. Applied associate-/l*0.2

    \[\leadsto \color{blue}{\frac{x}{\frac{x + y}{100}}}\]
  4. Using strategy rm
  5. Applied associate-/r/0.2

    \[\leadsto \color{blue}{\frac{x}{x + y} \cdot 100}\]
  6. Final simplification0.2

    \[\leadsto \frac{x}{x + y} \cdot 100\]

Reproduce

herbie shell --seed 2020062 
(FPCore (x y)
  :name "Development.Shake.Progress:message from shake-0.15.5"
  :precision binary64

  :herbie-target
  (* (/ x 1) (/ 100 (+ x y)))

  (/ (* x 100) (+ x y)))