Average Error: 0.4 → 0.2
Time: 13.7s
Precision: 64
\[\frac{x \cdot 100}{x + y}\]
\[\frac{x}{\frac{y + x}{100}}\]
\frac{x \cdot 100}{x + y}
\frac{x}{\frac{y + x}{100}}
double f(double x, double y) {
        double r39185542 = x;
        double r39185543 = 100.0;
        double r39185544 = r39185542 * r39185543;
        double r39185545 = y;
        double r39185546 = r39185542 + r39185545;
        double r39185547 = r39185544 / r39185546;
        return r39185547;
}

double f(double x, double y) {
        double r39185548 = x;
        double r39185549 = y;
        double r39185550 = r39185549 + r39185548;
        double r39185551 = 100.0;
        double r39185552 = r39185550 / r39185551;
        double r39185553 = r39185548 / r39185552;
        return r39185553;
}

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.4
Target0.2
Herbie0.2
\[\frac{x}{1} \cdot \frac{100}{x + y}\]

Derivation

  1. Initial program 0.4

    \[\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. Final simplification0.2

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

Reproduce

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

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

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