Average Error: 0.3 → 0.2
Time: 10.6s
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 r33359363 = x;
        double r33359364 = 100.0;
        double r33359365 = r33359363 * r33359364;
        double r33359366 = y;
        double r33359367 = r33359363 + r33359366;
        double r33359368 = r33359365 / r33359367;
        return r33359368;
}

double f(double x, double y) {
        double r33359369 = x;
        double r33359370 = y;
        double r33359371 = r33359370 + r33359369;
        double r33359372 = r33359369 / r33359371;
        double r33359373 = 100.0;
        double r33359374 = r33359372 * r33359373;
        return r33359374;
}

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 2019163 
(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)))