Average Error: 0.3 → 0.2
Time: 5.6s
Precision: 64
\[\frac{x \cdot 100}{x + y}\]
\[\frac{x}{y + x} \cdot 100\]
\frac{x \cdot 100}{x + y}
\frac{x}{y + x} \cdot 100
double f(double x, double y) {
        double r1210987 = x;
        double r1210988 = 100.0;
        double r1210989 = r1210987 * r1210988;
        double r1210990 = y;
        double r1210991 = r1210987 + r1210990;
        double r1210992 = r1210989 / r1210991;
        return r1210992;
}

double f(double x, double y) {
        double r1210993 = x;
        double r1210994 = y;
        double r1210995 = r1210994 + r1210993;
        double r1210996 = r1210993 / r1210995;
        double r1210997 = 100.0;
        double r1210998 = r1210996 * r1210997;
        return r1210998;
}

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. Simplified0.3

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

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

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

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

Reproduce

herbie shell --seed 2019179 
(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)))