Average Error: 0.3 → 0.2
Time: 11.0s
Precision: 64
\[\frac{x \cdot 100.0}{x + y}\]
\[\frac{x}{y + x} \cdot 100.0\]
\frac{x \cdot 100.0}{x + y}
\frac{x}{y + x} \cdot 100.0
double f(double x, double y) {
        double r35012523 = x;
        double r35012524 = 100.0;
        double r35012525 = r35012523 * r35012524;
        double r35012526 = y;
        double r35012527 = r35012523 + r35012526;
        double r35012528 = r35012525 / r35012527;
        return r35012528;
}

double f(double x, double y) {
        double r35012529 = x;
        double r35012530 = y;
        double r35012531 = r35012530 + r35012529;
        double r35012532 = r35012529 / r35012531;
        double r35012533 = 100.0;
        double r35012534 = r35012532 * r35012533;
        return r35012534;
}

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.0}{x + y}\]

Derivation

  1. Initial program 0.3

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

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

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

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

Reproduce

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

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

  (/ (* x 100.0) (+ x y)))